Closed NtsDK closed 4 years ago
Oddly enough, if you enable a layer with draggable, you do get the drag events.
https://jsfiddle.net/cmbopjae/
const marker = L.circleMarker([39.74739, -105]).addTo(map);
marker.on('pm:edit', () => console.log('pm:edit'));
marker.on('pm:drag', () => console.log('pm:drag'));
marker.on('pm:dragstart', () => console.log('pm:dragstart'));
marker.on('pm:dragend', () => console.log('pm:dragend'));
marker.pm.enable({draggable:true});
I'm seeing the same issue, I can't seem to bind to any of the drag events for markers.
hmm seems like a bug. Thanks for reporting I will take a closer look!
Has this problem been fixed?
Fixed by #591
Will be in the next release @hoangeiu
Is it solved now? I tried or couldn't
Yes this is solved look into: https://jsfiddle.net/dvh1r2je/
Hi!
I need to listen dragend event on marker. In my expectations I initialized it right but it doesn't work. I found similar problem here https://github.com/geoman-io/leaflet-geoman/issues/190 And conclusion was listen to pm:edit event.
How drag events should work? Is dragging marker a use case for drag events?
Demo: https://jsfiddle.net/dvh1r2je/