The Google Maps API Geocoding Developers Guide page shows an example of how to geocode an address.
How can I return multiple address suggestions, so that I can pick the correct response?
For example, a search for "Richmond" should return multiple Richmonds across the world. However, this request only returns a single response (when I use a valid API key):
https://maps.googleapis.com/maps/api/geocode/json?address=Richmond&key=YOUR_API_KEY
The example given at https://developers.google.com/maps/documentation/geocoding/intro#RegionCodes even suggests that multiple results should be returned for address=Toledo
but I'm still only seeing one result for Toledo.
Is there a parameter to specify the number of results to return?
1 Answer 1
Looks like someone asked this on SO and didn't get an answer. The Google Maps API blog says:
The Geocoding API is best for handling unambiguous queries such as complete postal address strings... Geocoding API is not recommended if your application handles ambiguous or incomplete queries
and suggests you might want to look at the Places API as the Geocoding API is more for complete postal address strings.
&components=country:au
or®ion=au
still doesn't help, although there are multiple Richmonds in Australia. Also see my edit regarding the Toledo search, which only returns 1 result for me