Just to be clear.... this shows NO Map. The scope of everything looks fine to me. Am I making a real newbie error here? Pulling my hair out...
var xmlLoadedMarkers = new Array(); var map = new GMap2(document.getElementById("map")); function load() { map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(-35,174), 5); GDownloadUrl("markers.php", function(data) { var xml = GXml.parse(data); var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute("name"); var address = markers[i].getAttribute("address"); var type = markers[i].getAttribute("type"); var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); xmlLoadedMarkers[i] = createMarker(point, name, address, type); } }); for (var j = 0; j < xmlLoadedMarkers.length; j++) { map.addOverlay(xmlLoadedMarkers[j]); } } On Apr 15, 1:58 am, "i...@noozealand.co.nz" <i...@noozealand.co.nz> wrote: > Hey Larry, > > Yup, tried all that. As soon as I pull any of the "map" declarations > outside of a function, then I lose the map all together. My array of > markers is sitting comfortably outside the functions; but still it > seems to lose it's population outside of the XML importation. > > Cheers, > Todd -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to google-maps-...@googlegroups.com. To unsubscribe from this group, send email to google-maps-api+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.