The problem is that your addMarkersFromXML() function is asynchronous. It returns VOID immediately to your addMarkersFromXML(50) call, and you pass that VOID to mgr.addMarkers() which it then tries to use as its "markers" array. Some time later, the data from your XML file arrives and your callback function tries to return that data to the API callback caller, but by then it's far too late.
If you're not familiar with the concept, see: http://econym.org.uk/gmap/async.htm I recommend passing the zoom level to addMarkersFromXML(), and allowing it to call mgr.addMarkers(batch,zoom) once it has successfully obtained the data. -- http://econym.org.uk/gmap The Blackpool Community Church Javascript Team --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
