android - Adding the annotation on map is leading to app crash [Titanium] -



android - Adding the annotation on map is leading to app crash [Titanium] -

i need add together around 1000 annotation on map. here code snippet:

nsnearby.markerssetup = function() { var location = alloy.globals.playgrounglocationlist.locations; var annotationdata = []; (var = 0, len = alloy.globals.playgrounglocationlist.locations.length; < len; i++) { var mapannotation = nsnearby.mapmodule.createannotation({ latitude : location[i].latitude, longitude : location[i].longitude, title : location[i].name, subtitle : location[i].street }); if (titanium.platform.osname === "android") { mapannotation.pincolor = nsnearby.mapmodule.annotation_blue; } else { mapannotation.pincolor = nsnearby.mapmodule.annotation_purple; } nsnearby.mapview1.region = { latitude : location[i].latitude, longitude : location[i].longitude, latitudedelta : 1, longitudedelta : 1 }; annotationdata.push(mapannotation); } nsnearby.mapview1.setannotations(annotationdata); };

in ios, working fine, in android, app crashing while adding annotation.

if set specific numbers of annotation, works.

it might because of load while placing annotations. but, there way accomplish this?

thanks in advance!

android ios titanium google-maps-android-api-2

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -