2
我發現了一個googlemaps包從python訪問谷歌地圖,但沒有找到任何演示,以顯示在python代碼的結果。蟒蛇顯示地圖與谷歌地圖
例如:
gmaps = googlemaps.Client(key='Add Your Key here')
# Geocoding an address
geocode_result = gmaps.geocode('1600 Amphitheatre Parkway, Mountain View, CA')
# Look up an address with reverse geocoding
reverse_geocode_result = gmaps.reverse_geocode((40.714224, -73.961452))
# Request directions via public transit
now = datetime.now()
directions_result = gmaps.directions("Sydney Town Hall",
"Parramatta, NSW",
mode="transit",
departure_time=now)
我可以打印directions_result到控制檯,但不知道如何顯示圖形模式的地圖。如何在python中將搜索結果顯示爲地圖?