AutoTracing ⭐
AutoTracing ⭐

While drawing / cutting it is possible to auto trace the coordinates of another Layer. Exclusive for Leaflet-Geoman Pro ⭐
map.pm.setGlobalOptions({ autoTracing: true });
See the available options in the table below.
| Option | Default | Description |
|---|---|---|
| autoTracing | true | Enables auto tracing while drawing. |
| autoTraceMaxZoom | 10 | Until which zoom level the coordinates of the layers in the viewport will be used. |
| autoTraceMaxDistance | 20 | The distance to the layer when a snap for auto tracing should happen. |
Here's a list of map events you can listen to:
| Event | Params | Description | Output |
|---|---|---|---|
| pm:autotracestart | e | Fired when auto tracing is started and connected with a layer. | |
| pm:autotracelinechange | e | Fired when auto tracing hintline is changed. | hintLatLngs |
| pm:autotraceend | e | Fired when auto tracing is ended. |
Examples
AutoTracing enabled:
Loading...