Does anyone know how to load more than one XML files using
GDownloadURL? The code I have to load one is below and works
correctly. I just don't know how to load multiple. (I have two XML
files created from two different mysql tables) Thanks so much for any
guidance anyone can give.
GDownloadUrl("phpsqlajax_genxml2.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 date = markers[i].getAttribute("date");
var location = markers[i].getAttribute("location");
var type = markers[i].getAttribute("type");
var lat = markers[i].getAttribute("lat");
var lng = markers[i].getAttribute("lng");
var point = new GLatLng(parseFloat(markers[i].getAttribute
("lat")),
parseFloat(markers[i].getAttribute("lng")));
var marker = createMarker(point, name, date, location, type);
map.addOverlay(marker);
}
});
}
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---