Skip to main content

Draw Circle Marker Mode

Circle Marker Mode allows you to add circle markers to the map. Circle markers are circles with a fixed radius in pixels that maintain their screen size regardless of zoom level.

You can enable Draw Circle Marker Mode like this:

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

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

The following events are available on a map instance:

EventParamsDescriptionOutput
gm:drawstarteventFired when circle marker drawing starts.map, shape
gm:createeventFired when a circle marker is created.map, shape, feature
gm:drawendeventFired when circle marker drawing is completed.map, shape

Behavior

Circle marker drawing operates by:

  1. Clicking on the map to place the circle marker center
  2. The circle marker is created with a default radius
  3. The circle marker maintains its pixel size regardless of zoom level

Live Draw Circle Marker Example