Closed rrsouzza closed 1 year ago
I'm sorry but we can't help you until you share a reproducable demo.
Try to check if you are listening on a event like pm:update
, pm:change
, pm:rotate
, ... where you maybe modify the coordinates.
Or maybe you have a polyline with empty coordinates? You can try to find the problem layer with:
L.PM.Utils.findLayers(this.map).filter(
(l) => l instanceof L.Polyline
).forEach((layer) => {
console.log(layer, layer.getLatLngs());
layer.pm.disableRotate();
});
So, this error is happening every time I click to Finish rotating. Note that this does not happen once I finish drawing/rotating the polygon, but once I click on the control button (or it's action) to disable the rotating mode (therefore calling
toggleGlobalRotateMode()
,disableGlobalRotateMode()
and so on).Below is a screenshot of my map after clicking to Finish rotating. My polygon is left with all 4 markers still displayed, and I can still rotate the polygon if I click and drag the markers. Even though the "Finish" action button disappears (which should happen once you disable whatever mode was active), the rotateMode still seems to be active since I can still rotate and therefore edit the polygon (
pm:create
continues to be triggered).Chrome
Firefox
I have tried to reproduce this error on JSFiddle, but I was not successfull. I replicated almost every aspect of my own component, but nothing caused this error to happen.
A few more details:
geoman-io
on version2.14.2
.13.3.11
.leaflet
on version1.9.3
.