我有 python 的 python 谷歌地图。我有这个代码:
from googlemaps import GoogleMaps
place1 = raw_input("your address: ")
place = raw_input("Destination: ")
gmaps = GoogleMaps(api_key)
directions = gmaps.direction(place1, place)
for step in directions['Directions']['Routes']['seconds'][0]['Steps']:
print step['descriptionHtml']
我得到这个错误
Traceback (most recent call last):
File "C:\Python27\test.py", line 152, in <module>
directions = gmaps.direction(place1, place)
AttributeError: 'GoogleMaps' object has no attribute 'direction'
我试图向用户询问他们的地址和目的地,然后找到方向。