1
votes

https://maps.googleapis.com/maps/api/geocode/json?address=MA The above url, with the api key returns below response "formatted_address" : "Independence, KS 67301, USA",

I experienced same results in kansas and oklahoma for many state codes I tried. is this a bug?

1

1 Answers

1
votes

We were having the issue to so I created an issue ticket with Google. Their response it that it is a feature not a bug"

https://maps.googleapis.com/maps/api/geocode/json?address=MD&language=en returns Maryland, USA (ChIJ35Dx6etNtokRsfZVdmU3r_I).

However, both MD and VA are, in a worldwide context, extremely ambiguous, which is why the expected result is not guaranteed. Better results can be expected using Component Filtering or Place Autocomplete:

https://maps.googleapis.com/maps/api/geocode/json?components=administrative_area:VA|country:US http://maps.googleapis.com/maps/api/place/autocomplete/json?input=VA&types=(regions)&components=country:US