0
from googlemaps import GoogleMaps,GoogleMapsError

gmaps = GoogleMaps()
address = "5555 Car Country Drive Carlsbad CA 92008"
result = gmaps.geocode(address)

回溯(最后一次调用):文件“/home/yogesh/workspace/Simple/maps_error.py”,第 10 行,结果 = gmaps.geocode(address) 文件“/usr/local/lib/python2.6/dist -packages/googlemaps.py",第 262 行,在地理编码中引发 GoogleMapsError(status_code, url, response) googlemaps.GoogleMapsError:错误 602:G_GEO_UNKNOWN_ADDRESS

4

1 回答 1

0

删除邮政编码。googlemaps 应该能够在没有它的情况下找到 latlng 值。

这就是我得到的:

gmaps.address_to_latlng('5555 Car Country Drive Carlsbad CA')
(33.1283128, -117.3218825)
于 2013-01-10T12:27:41.113 回答