Google have said they dont support calling the Places API directly from
browser

You either need to use the offical Javascript API.

Or make calls from a server.

Not sure why you are worried about using quota, as the Quota is based on
your API key not IP address.


On Thu, Jun 30, 2011 at 9:54 PM, amnesia7 <[email protected]> wrote:

> 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.
>
>

-- 
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