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

Skip to content

GoogleMapPlotter.enable_marker_dropping

frslm edited this page Jun 26, 2020 · 7 revisions

GoogleMapPlotter.enable_marker_dropping(color, **kwargs)


Allows markers to be dropped onto the map when clicked.

Clicking on a dropped marker will delete it.

Note: Calling this function multiple times will just overwrite the existing dropped marker settings.

  • Parameters

    color str – Color of the markers to be dropped.

  • Optional Parameters

    • title str – Hover-over title of the markers to be dropped.

    • label str – Label displayed on the markers to be dropped.

    • draggable bool – Whether or not the markers to be dropped are draggable.

Usage:

import gmplot
apikey = '' # (your API key here)
gmap = gmplot.GoogleMapPlotter(37.766956, -122.438481, 13, apikey=apikey)
gmap.enable_marker_dropping('orange', draggable=True)
gmap.draw('map.html')

Clone this wiki locally