hey everybody, I was creating a store locator for a client, and ran into a problem where the xml data cannot be accessed.
I followed a tutorial at http://code.google.com/apis/maps/articles/phpsqlsearch.html After spending a few hours trying to debug my own code, I finally just copied and pasted the tutorial into my code and continue to get the same error. I've been tracing the code all day and found a few things out that may be useful. First, when you get to the function SearchLocationsNear(), the latitude, longitude, and radius all can be retrieved and stored in...... var searchUrl = 'phpsqlsearch_genxml.php?lat=' + center.lat() + '&lng=' + center.lng() + '&radius=' + radius; Checking the variables in firebug, the statement correctly executes as something like..... phpsqlsearch_genxml.php?lat=' 44.44'&lng='44.44'&radius='5'; However, on the very next line where the GDownloadUrl function is called, something happens with the markers variable. For whatever reason, the length of markers becomes set to 0, and the sidebar.innerHTML code is executed. I have found another person had a similar problem, and they fixed their code by changing GDownloadUrl(searchUrl, function(data) { var xml = GXml.parse(data); var markers = xml.documentElement.getElementsByTagName('marker'); map.clearOverlays(); With something that looks like this var root_name = xml.documentElement; var markers = root_name.getElementsByTagName('marker'); var markers = xml.documentElement.getElementsByTagName('marker'); map.clearOverlays(); This doesn't fix the problem, and every time I check firebug I get the following error GET http://www.mysite/phpsqlsearch_genxml.php?lat=44.44&lng=44.44&radius=5 500 Internal Server Error It also displays that there was no response from the server. It should be noted that I have two different web sites on two different hosting companies and platforms. One my personal site, the code executes fine and returns results, however, with the EXACT same code on the client's server, this error occurs. Has anybody ever encountered a problem like this, or know of a solution? If the client allows me, I can post the code and website in question for further review -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
