I\'m trying to use the Google Places autocomplete API to pre-fill a form on a web application with Establishment data to ease data-entry. The API is pretty straightforward,
You can bypass this issue by using PHP.
In your PHP script use file_get_contents to query the URL like this:
$suggestions = json_decode(file_get_contents('https://maps.googleapis.com/maps/api/place/autocomplete/json?input=blabla&sensor=false&types=establishment&radius=10000')
You can then just use an AJAX request to your PHP script which will return the results effectively bypassing the cross domain constraint.
The Google probably allows this API only called through its own Javascript API which you load from maps.google.com served Javascript file. The lack of Access-Control-Allow-Origin header tells that you should not use the API otherwise through Javascript.
Alternatively you can simply write a server-side proxy function which calls Google API and passes the result forward to your own $.getJSON call, but this would be probably against the Terms of Service.
http://www.daniweb.com/web-development/php/code/216729
(disclaimer: I have not read the API spec for this particular function call)