python display map with googlemaps

Viewed 42678

I found a googlemaps package to access google map from python,but didn't find any demo to show the result in python code.

For example:

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)

I can print the directions_result to console but don't know how to show the map in graphic mode. How to show the search result as a map in python?

1 Answers
Related