We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please help me to hard sync two maps (center, zoom, bearing, pitch) to unsure there won't be desynced frames. Ideally within single animation frame.
Current syncMaps method causes delayed and desynchronized map positions during interactions.
syncMaps
const map1 = new maplibregl.Map({ container: 'map1', style: 'first-style-url' }); const map2 = new maplibregl.Map({ container: 'map2', style: 'second-style-url' }); function syncMaps(mapA, mapB) { mapA.on('move', () => { const center = mapA.getCenter(); const zoom = mapA.getZoom(); const bearing = mapA.getBearing(); const pitch = mapA.getPitch(); mapB.jumpTo({center, zoom, bearing, pitch}); }); } syncMaps(map, map_base);
The text was updated successfully, but these errors were encountered:
You might want to listen to the render event?
Sorry, something went wrong.
Could someone please provide a working code snippet?
No branches or pull requests
Please help me to hard sync two maps (center, zoom, bearing, pitch) to unsure there won't be desynced frames.
Ideally within single animation frame.
Current
syncMaps
method causes delayed and desynchronized map positions during interactions.The text was updated successfully, but these errors were encountered: