Hi,

First off, insert this line after your downloadUrl call, within the
closure function(data) { :

  var markersForManager = []; // a addMarkers() Call expects an Array
of Markers, initialize it

Within your "for(var i = 0 ; i < markers.length; i++)", and after your
"var marker = createMarker(markers[i].getAttribute("name"), latlng);
", try adding this :

  markersForManager.push(marker); // Add the marker object to the
array

After your "for(var i = 0 ; i < markers.length; i++)", add this :

  mgr.addMarkers(markersForManager, 1, 22); // 1 is minimum zoom, 22
is maximum zoom, read MarkerManager documentation for more info. You
can add more of these calls, for various zoom levels.
  mgr.refresh(); // This should place your markers on the map

Finally, wrap all your logic with downloadUrl("...") and its closure
within an event (which is triggered after MarkerManager is ready to
go) :

  google.maps.event.addListener(mgr, "loaded",
    function()
    {
       // Your downloadUrl() logic goes here.
     }
   );

Hope it works !

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to