-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I'm grouping some draggable markers in a layer in order to be able to hide/show them at once with the leaflet built-in control for overlays.
The markers are draggable all right at first, but as soon as the layer has been hidden and shown again using the control checkbox, then trying to drag a marker will move the whole map.
Minimum example to reproduce:
var myLatLng1 = L.latLng(48, 5);
var myLatLng2 = L.latLng(48.1, 5.1);
map.setView(myLatLng1, 11);
var myMarker1 = L.circleMarker(myLatLng1, {draggable: true});
var myMarker2 = L.circleMarker(myLatLng2, {draggable: true});
var myLayer = L.layerGroup([myMarker1, myMarker2]);
myLayer.addTo(map);
L.control.layers({}, {'My layer': myLayer}).addTo(map);I'm experiencing this with both leaflet 1.3.4 and 1.4.
Metadata
Metadata
Assignees
Labels
No labels