Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GoogleMapPlotter.from_geocode

frslm edited this page Jun 26, 2020 · 6 revisions

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")

Clone this wiki locally