If I use (obviously the input=value will be based on the content of
the text field once I get it working but just static call for now)...:

$.getJSON("https://maps.googleapis.com/maps/api/place/autocomplete/
json?
sensor=false&key=xxxxxx&location=50.741357,-1.963828&input=bourne",
function(data) {
    alert(data.predictions[0].description);
});

...it fails to load a response but if I manually navigate to the json
web address, download the json file, upload it to my web server as a
static file the following script will work fine (even though both
contain the same content):

$.getJSON("json.js", function(data) {
    alert(data.predictions[0].description);
});

I assume this is because it is trying to cross domains.

Should there not be a json callback function available for use with
this API because I couldn't find one on the documentation page?

The other option I can think might work is to download the json file
using php with each request/keypress from my autocomplete but will
this not mean that the quota limits are against my web server's ip
address rather than the user's ip address if it were a javascript
request?

Col

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to