Reputation: 2331
No result is returned when using the Google Maps API v3. Autocomplete, however when doing a Google Maps Search for the same address will return a result.
Why is this and how can this be resolved?
Example.
Works:
Google maps, finds the address: https://www.google.co.uk/maps?q=1+Oakland+Terrace,+New+Edlington,+Doncaster+DN12+1AA
Fails:
Step 1. Use the example of the Maps API Autocomplete. https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform
Step 2. Start typing or paste in the address:
1 Oakland Terrace, New Edlington, Doncaster DN12 1AA.
No address is found.
Upvotes: 5
Views: 1859
Reputation: 2554
The Google Places API often returns results similar to maps.google.com, but they're not the exact same. I'm unable to reproduce any suggestions for the start of this address using maps.google.com, which matches the experience you're seeing in the Autocomplete API.
That said, this specific address appears to work correctly using the Geocoding API and the Place Text Search API. The Places API has information for that address, it's just not autocompleting. I would recommend designing your application so that if you have a full-looking address and an autocomplete request fails you fall back to a regular Places API text search or geocoding call.
Upvotes: 0