Closed dvaltrick closed 2 months ago
Your polygon has self-intersection. This is the reason why the vertex jumps back and no pm:edit
is fired (because no edit was done). You can disable this with setting the option allowSelfIntersection
to true
.
You can find the intersecting points with that:
layer.on('pm:intersect', (e) => {
L.geoJSON(e.intersection).addTo(map)
});
layer.pm.enable();
I was not able to reproduce the "listener not found" warning. Which version of Geoman and Leaflet are you using?
Thank you for being so helpful @Falke-Design I tested in here and allowed self-intersection of the polygon edit normally. I will understand where the intersection is to remove it.
About the versions I am using leaflet: 1.8.0 leaflet-geoman-free: 2.14.2
Then I can close the issue?
btw. I strongly suggest to update to Leaflet 1.9.4.
Hi, everyone!
I am facing an interesting problem with the library. It only happens with one specific polygon, this polygon has more than 5K points but I have polygons with 6K points that work well. The problem is, that I am editing the polygon, and when the drag ends it returns a console.log "listener not found" for each point of the polygon and does not fire pm:edit, debugging I saw that the console message was for "dragend" event.
here we have a video showing the problem
https://github.com/geoman-io/leaflet-geoman/assets/7021959/577fe155-846c-43a3-a405-fe3ebe701836
Here how we are enabling edition and setting pm:edit listener
Polygon
londrina.txt