Menu

#4 API changed

open
nobody
None
5
2013-05-11
2013-03-11
Anonymous
No

Recently I noticed that googlemaps doesn't work any more. It could be due to an API change (I noticed that geopy doesn't work either).

>>> import googlemaps
>>> g = googlemaps.GoogleMaps()
>>> g.address_to_latlng('Mountain View, CA')
GoogleMapsError: Error 610: G_GEO_BAD_KEY

I did some googling and the correct API for geocoding (and similar services) seems to be the one documented at https://developers.google.com/maps/documentation/geocoding/ and an example of using it is http://maps.googleapis.com/maps/api/geocode/json?address=Mountain+View+CA&sensor=false&region=us

I would try to cook up a patch myself, but frankly I don't feel like using SourceForge and SVN.

Discussion

  • Doctor J

    Doctor J - 2013-05-11

    You're right, the V2 API is deprecated. Fortunately, pygeocoder has got you covered with V3:

    https://pypi.python.org/pypi/pygeocoder

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.