Hi all,
In my website i need to load nearly 50, 000 markers in a map and its
taking more tim to execute the page. Please check the following code
which i am using to load the markers,
if (GBrowserIsCompatible()) {
document.getElementById(div).style.visibility = '';
map = new GMap2(document.getElementById(div));
map.addControl(new GScaleControl());
map.addControl(new TextualZoomControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(37.775196, -122.419204), 13);
// var marker = new GMarker(new GLatLng(37.775196, -122.419204),
{icon:icon,title:faddress,draggable: true});
// map.addOverlay(marker);
for(var i=0;i<lat.length;i++){
if(i==0){
var marker = new GMarker(new GLatLng(lat[i], lon[i]),
{icon:icon,title:locations[i],draggable: true});
}else{
marker = new GMarker(new GLatLng(lat[i], lon[i]),
{icon:icon,title:locations[i],draggable: true});
}
map.addOverlay(marker);
handleEvents(marker,locations[i],lat[i],lon[i],map);
}
}
Are there any other methods available to load multiple markers in a
map with less script execution time ? Please provide your valuable
suggestions.
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.