Skip to main content



You have many options available when drawing and editing your layers (described above).
You can set the options per layer as described above, or you can set them globally for all layers. This is especially useful when you use the toolbar and can't change the options programmatically.

Examples:{ pinning: true, snappable: false });{ pinning: true, snappable: false });

The following options are additionally to the Draw and Edit Mode options.

snappingOrderArrayPrioritize the order of snapping. Default: ['Marker','CircleMarker','Circle','Line','Polygon','Rectangle'].
layerGroupmapadd the created layers to a layergroup instead to the map.
panesObjectDefines in which panes the layers and helper vertices are created. Default: { vertexPane: 'markerPane', layerPane: 'overlayPane', markerPane: 'markerPane' }.
cutAsCirclefalseEnable cutting in shape form of a Circle.

The following events are available on a map instance:

pm:globaloptionschangedeFired when global options are changed.

Some details about a few more powerful options: