2
votes

In Google's documentation, it says that Geocoding requests should be sent to the following address:

http://maps.googleapis.com/maps/api/geocode/output?parameters

(Where "output" should be replaced by either "JSON" or "XML" and "parameters" should be something like "address=500+Fifth+Avenue+New+York")

When I try to XmlHTTPRequest that, I (predictably) get a 101 error because Google's server is not within my own domain (of course).

So how am I supposed to get the answer from the server?

Or maybe there's something I don't understand about geocoding with Google.

I would like to stick with Javascript and PHP.

Thanks a lot for your help.

Nicolas

1

1 Answers

3
votes

You shouldn't be using a cross-domain request. You should be using the geocoder within the Maps API (since you are required to have a map anyway, if you use Google's data).

The HTTP interface is provided specifically for use server-side.