How to modify google maps code to use sql rather than hard coded xml

Piloto007

New Member
I have 2 google map scripts (both for api V3).One is designed to use data from an xml file which is hard coded.The other is designed to use a 'php' script to create an xml file by drawing the data from a sql database each time the map is loaded.I want to use the first script (it has other map features compared to the second), but want to draw the data from my sql database.When I modify the script in first file to do this it does not work (ie no markers are loaded in the map).here is the xml file code \[code\]downloadUrl("categories.xml", function(doc) {var xml = xmlParse(doc);var markers = xml.documentElement.getElementsByTagName("marker");for (var i = 0; i < markers.length; i++) {var detail = markers.getAttribute("detail");\[/code\]here is the code used with a mysql database\[code\] downloadUrl("genxml.php", function(data) { var xml = parseXml(data); var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var detail = markers.getAttribute("detail"); \[/code\]So I am not sure why using the code from the second script in the first is now working.Is there anyone familiar enough with the google api and using mySql to be able to advise.Thanks.
 
Back
Top