Modes
Overview of Leaflet-Geoman editing modes. Only one mode can be active at a time. Enable modes programmatically or via the toolbar.
Draw Mode for Leaflet
Draw markers, polygons, lines, circles, rectangles and text on a Leaflet map with map.pm.enableDraw(). Covers draw options, snapping, pm:create and styling.
Edit Mode for Leaflet
Edit Leaflet layers by moving, adding and removing vertices with map.pm.enableGlobalEditMode() or layer.pm.enable(). Covers edit options, snapping and the pm:edit event.
Drag Mode
Drag Leaflet layers across the map with map.pm.enableGlobalDragMode(). Enable it globally or per layer, sync dragging, and listen to pm:dragstart and pm:dragend.
Removal Mode
Remove Leaflet layers by clicking them with map.pm.enableGlobalRemovalMode(). Covers the pm:remove event and undo support.
Cut Mode
Cut holes in Leaflet polygons and lines by drawing a cutting shape with map.pm.enableGlobalCutMode(). Supports circle-shaped cuts. Covers cut options and the pm:cut event.
Rotation Mode
Rotate Leaflet polygons, polylines and rectangles with map.pm.enableGlobalRotateMode() or per layer. Covers setRotationCenter, rotation angles and the pm:rotateend event.
Split Mode ⭐
Split Leaflet polylines and polygons by drawing a line with map.pm.enableGlobalSplitMode(). Pro feature with split options and the pm:split event.
Scale Mode ⭐
Scale Leaflet layers from the center or a corner with map.pm.enableGlobalScaleMode(). Uniform and non-uniform scaling with keyboard modifiers. Pro feature.
Union Mode ⭐
Merge two Leaflet polygon or multipolygon layers into one shape with map.pm.enableGlobalUnionMode(). Pro feature with the pm:union event.
Difference Mode ⭐
Subtract one Leaflet polygon from another with map.pm.enableGlobalDifferenceMode(). Pro feature with the pm:difference event.
Copy Layer Mode ⭐
Copy Leaflet layers with their properties using map.pm.enableGlobalCopyLayerMode(). Pro feature with the pm:copylayer event.
Line Simplification Mode ⭐
Simplify polyline and polygon geometry by reducing vertex count. Pro feature with configurable tolerance.
Custom Shapes Mode ⭐
Draw predefined custom shapes like stars and other complex geometries. Pro feature.
Leaflet Lasso Selection ⭐
Select multiple Leaflet layers with a freehand lasso. Learn intersect versus contain selection, append and subtract modes, events, and GeoJSON export with Geoman Pro.
Freehand Drawing Mode ⭐
Draw freehand polylines and polygons on a Leaflet map with mouse or touch using map.pm.enableDraw(). Pro feature with pm:create and pm:drawend events.
Selection Tool ⭐
Select layers by clicking them and manage the current Leaflet-Geoman Pro selection programmatically.
Layer Order Modes ⭐
Bring vector and image-overlay layers to the front or send them to the back with Leaflet-Geoman Pro.