Repository navigation
fix(maplibre): sync camera changes made during Deck initialization - #10702
Merged
chrisgervang merged 3 commits intoSep 20, 2026
Merged
Conversation
birkskyum
marked this pull request as ready for review
September 11, 2026 19:47
|
chrisgervang
approved these changes
Sep 20, 2026
Collaborator
|
Released in deck.gl 9.4.1. Thanks @birkskyum! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Interleaved overlays retain their initial camera state if the map moves after
map.addControl(overlay)but before Deck finishes initializing. For example, an immediatemap.jumpTo(...)leaves Deck's view state and projected coordinates stale until another camera move.Refresh the view state and register movement listeners before calling the app's
onLoadcallback. Regression tests cover MapLibre 4.5.1, 5.0.0, and 6.0.0, including camera reads and moves insideonLoad. All three fail on master and pass with this fix.Split from #10697 following review feedback.
Note
Medium Risk
Touches interleaved overlay startup ordering and view-state sync; behavior change is narrow but affects all MapLibre interleaved integrations at first paint.
Overview
Fixes interleaved MapLibreOverlay keeping a stale Deck camera when the map moves after
addControlbut before Deck finishes loading.In
deck-utils, the wrapped DeckonLoadnow starts move listeners, runsonMapLibreMoveto pull the current MapLibre view into Deck, and only then invokes the apponLoad. That wayjumpTo/ camera updates during the init window are reflected in view state and projection before consumer code runs.Adds WebGL regression tests (
overlay-startup.spec.ts) for MapLibre 4.5.1, 5.0.0, and 6.0.0 that move the camera before load and assert view state and screen projection insideonLoad.Reviewed by Cursor Bugbot for commit 2bfc749. Bugbot is set up for automated code reviews on this repo. Configure here.