asp classic - geocoding Google Maps & ASP -
i'm trying coordinates of address google map classic asp.
when write address in address bar correct result:
http://maps.google.com/maps/geo?output=xml&q=32822%20usa
but code 602 (bad location google) when try call same address msxml2.serverxmlhttp
the asp codes:
url = "http://maps.google.com/maps/geo?output=xml&q=" & server.urlencode("32822 usa") set xmlhttp = createobject("msxml2.serverxmlhttp") xmlhttp.open "get", url, false xmlhttp.send "" xml = xmlhttp.responsetext set xmlhttp = nothing
your problem here not url, correctly formed, fact cannot cross-domain xmlhttprequest. request google maps geocoding service must done server, fetch xml content , return asp script.
here's do: asp script might call php file queries google geocoding , fetches response curl , returns asp can process it.
if don't want use solution, might @ google maps javascript api provides geocoding methods (link)
Comments
Post a Comment