Possible Duplicate:
Can Google Maps/Places 'autocomplete' API be used via AJAX?
There seems to be disagreement about whether or not this is even possible. I grabbed the url that its using from console but it is totally un-editable, changing the callback causes an error.
Example: https://maps.googleapis.com/maps/api/js/AutocompletionService.GetPredictions?1sgoo&4sen-US&5sUS&9sestablishment&callback=xdc._y53chi&token=28177
That works (at time of posting) but changing anything causes it to break. If I could control the callback or let jQuery modify the callback for use with jsonp I’d be set. Any ideas?
There are two ways to access the Google Maps Autocomplete API.
The first is via the
google.maps.places.Autocompleteclass. This provides all the necessary implementation in Javascript. However, you have complete control over styling. Use thepac-containerandpac-itemCSS classes.The second is via the Autocomplete Web Service. This is not accessible via the browser because of same origin policy (there is no JSONP API). This is the most flexible way to access Autocomplete results.