GoogleMapPlotter.from_geocode

classmethod GoogleMapPlotter.from_geocode(location, zoom=13, apikey='')


Initialize a GoogleMapPlotter object using a location string (instead of a specific lat/lng location).

Requires Geocoding API.

  • Parameters

    location str – Location or address of interest, as a human-readable string.

  • Optional Parameters

    • zoom intZoom level, where 0 is fully zoomed out. Defaults to 13.

    • apikey str – Google Maps API key.

  • Returns

    GoogleMapPlotter

Usage:

import gmplot
apikey = '' # (your API key here)
gmap = gmplot.GoogleMapPlotter.from_geocode('Chiyoda City, Tokyo', apikey=apikey)
gmap.draw("map.html")