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?
1 Answer
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.