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:
Event | Params | Description | Output |
---|---|---|---|
gm:drawstart | event | Fired during marker drawing operations. | map , shape |
gm:create | event | Fired during marker drawing operations. | map , shape , feature |
gm:drawend | event | Fired during marker drawing operations. | map , shape |
Behavior
Marker drawing operates by:
- Clicking on the map to place a marker
- The marker is immediately placed at the clicked location