0

Previously I developed a map portal using Leaflet. I want to use MapLibre JS now. It has two same maps side by side like the following UI. The main functionality is to pan and zoom the map at the same time. If I zoom the first map then the second map will automatically zoom with the first one. Similarly, if I pan the second map then the first map will sync with the second map. Previously I used Leaflet Sync Plugins to achieve this. Are there any such plugins for MapLibre JS? Or any other JS code snippet to achieve this?

enter image description here

1 Answer 1

0

This plugin is listed on the Maplibre plugins page:

https://github.com/mapbox/mapbox-gl-sync-move

The code doesn't seem to reference Mapbox GL directly, so should work with MapLibre.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.