0

I'd like to move/drag geojson features on map so that the distance to each other stays the same.

Choose geojsons by clicking them and then dragging them together. How should I make this?

Thanks!

I read about syncLayersOnDrag but can not get it to work.

Falke Design
  • 10,635
  • 3
  • 15
  • 30

1 Answers1

0

If you set syncLayersOnDrag after adding the layer, it works

// data are coming from smaple-geojson.js
const geoLayer = L.geoJSON([bicycleRental, campus]).addTo(map)
map.fitBounds(geoLayer.getBounds())

map.pm.setGlobalOptions({
    syncLayersOnDrag: true
});

https://jsfiddle.net/zba1ogjL/

Falke Design
  • 10,635
  • 3
  • 15
  • 30