Skip to main content

Draw Marker Mode

Marker Mode allows you to add markers to the map by clicking on desired locations.

You can enable Draw Marker Mode like this:

map.gm.enableDraw('marker');
map.gm.disableDraw();
map.gm.toggleDraw('marker');
map.gm.drawEnabled('marker');

// Or like this:
map.gm.enableMode('draw', 'marker');
map.gm.disableMode('draw', 'marker');
map.gm.toggleMode('draw', 'marker');
map.gm.isModeEnabled('draw', 'marker');

The following events are available on a map instance:

EventParamsDescriptionOutput
gm:drawstarteventFired during marker drawing operations.map, shape
gm:createeventFired during marker drawing operations.map, shape, feature
gm:drawendeventFired during marker drawing operations.map, shape

Behavior

Marker drawing operates by:

  1. Clicking on the map to place a marker
  2. The marker is immediately placed at the clicked location

Live Draw Marker Example