Snappable problem #1134
Unanswered
tallano
asked this question in
Questions & Help
Replies: 2 comments
-
I think this is related to the bug #1113 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes, it looks like it is. Thanks for pointing that out. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm trying to setup geoman so nothing is snappable. See code below:
map.pm.setGlobalOptions({ snappable: false });
var polygon = L.polygon([[41.669, 8.92], [41.669, 8.921], [41.67, 8.921], [41.67, 8.92], [41.669, 8.92]], {
snappable: false,
color: "green",
weight: 4
}).addTo(map);
var marker = L.marker([41.6693, 8.92], { snappable: false }).addTo(map);
marker.pm.enableLayerDrag();
Problem is, when I drag the marker, snapping still occurs. What am I doing wrong?
I know, I put "{snappable: false}" everywhere. Just desperate testing since standard approaches did not work at first! :)
Oh, and I'm also trying to listen to drag events. Example:
map.on('pm:dragstart', function(e) { console.log(e); });
But nothing happens in the console when I drag the marker...
Beta Was this translation helpful? Give feedback.
All reactions