1
votes

The reverse geocoding only returns the nearest 10 results, so, in some cases, the country is not included.

example: https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452

(this should return all the way up to the USA, but it only goes to New York)

Even if I supply the result_type=country parameter, USA won't be in the results, instead, the result array is empty:

https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&result_type=country (note you'll need to add your google api key) I did not find this behaviour documented, nor did I find any mention of it somewhere else.

Is this a limit that is enforced for free api keys or did I miss some documentation about this?

1
That looks like a bug really. 1) It works fine for a good number of other random coordinates that I tried, and 2) It works for the "same" coordinates if they are less precise (2 decimals only in this case) ie. maps.googleapis.com/maps/api/geocode/… - MrUpsidown
Looks like this issue has already been reported: issuetracker.google.com/issues/35830435 you might want to report your case as well. - MrUpsidown

1 Answers

1
votes

I believe this issue for reverse geocoding has already been reported in the public issue tracker:

https://issuetracker.google.com/issues/35829979

Please add your examples in the public issue and star it to receive updates from Google.

Hope it helps!