Geoman in leaflet, how to disable a click on a polygon?

766 Views Asked by At

How can I remove a click on a polygon. I dont want the mouse to switch to 'clickable mode' when hovering over a polygon.

Why do I need this? There's another layer that (should come) on top of the polygon but since the polygon is clickable you cant click the layer that I (tried) to place on top.

jsfiddle

map.pm.disableClick?

enter image description here

1

There are 1 best solutions below

0
Falke Design On

You can use the Leaflet option interactive: false to disable all interactions on the layer:

L.geoJSON(geojson,{interactive:false}).addTo(map);