Support for Google geocoder doesn't handle localities returned as "DependentLocality" #28

Open
wants to merge 1 commit into
from

Projects

None yet

1 participant

@cornerfade

Some cities in my region are no longer being recognized and returned by Graticule:

"Hamilton, Ontario, Canada"
"Stoney Creek, Ontario, Canada"

geocoder = Graticule.service(:google).new mykey
geocoder.locate "Toronto, Ontario, Canada"
=> Toronto, ON CA
geocoder.locate "Hamilton, Ontario, Canada"
=> ON CA
geocoder.locate "Stoney Creek, Ontario, Canada"
=> ON CA
If you perform the queries directly yourself using the "http://maps.google.com/maps/geo" url, you'll see that the missing locality names are identified and returned in the response but they are present in a "DependentLocality" key instead of the usual "Locality" key.

This just started happening recently for the cities mentioned above. I don't know how long Google has been using "DependentLocality" in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment