GoogleMapPlotter.text

GoogleMapPlotter.text(lat, lng, text, **kwargs)


Write a text label.

  • Parameters

    • lat float – Latitude of the text label.

    • lng float – Longitude of the text label.

    • text str – Text to display.

  • Optional Parameters

    color/c str – Text color. Can be hex (‘#00FFFF’), named (‘cyan’), or matplotlib-like (‘c’). Defaults to black.

Usage:

import gmplot
apikey = '' # (your API key here)
gmap = gmplot.GoogleMapPlotter(37.766956, -122.438481, 13, apikey=apikey)

gmap.text(37.793575, -122.464334, 'Presidio')
gmap.text(37.766942, -122.441472, 'Buena Vista Park', color='blue')

gmap.draw('map.html')