Repository navigation
fix(maplibre,mapbox): remove the overlaid container when the overlay is removed - #10899
Merged
Merged
Conversation
…is removed MapLibre and Mapbox leave removing a control's element to the control, so every overlaid overlay left its container in the map's top-left control slot. With a `device` prop, Deck does not own the canvas and leaves it in place on finalize. The next overlay using that device found the canvas still connected, in the stale container, and left it there. That container no longer resized with the map, so after a window resize deck rendered at the old size and drew misaligned with the basemap.
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryRemoves overlaid containers when
Reviews (2) · Last reviewed commit: "Merge branch 'master' into chr/overlay-r..." · Reviewed by Greptile |
ibgreen
approved these changes
Oct 23, 2026
ibgreen
left a comment
Collaborator
There was a problem hiding this comment.
Approved. The overlaid container cleanup is covered by regression tests, the current CI workflow passed, and the PR is mergeable.
chrisgervang
added a commit
that referenced
this pull request
Oct 24, 2026
This was referenced Oct 26, 2026
Collaborator
Author
|
Released in deck.gl 9.4.1. |
kylebarron
added a commit
to developmentseed/lonboard
that referenced
this pull request
Nov 13, 2026
> [!NOTE] > This PR was written by Claude (Claude Code), not by @kylebarron. Bumps: - `@deck.gl/*` 9.4.0 → [9.4.1](https://github.com/visgl/deck.gl/releases/tag/v9.4.1) - `@developmentseed/{deck.gl-raster,affine,morecantile,raster-reproject}` 0.8.1 → [0.9.0](https://github.com/developmentseed/deck.gl-raster/releases/tag/v0.9.0) → [0.10.0](https://github.com/developmentseed/deck.gl-raster/releases/tag/v0.10.0) The deck.gl overrides in `pnpm-workspace.yaml` go to `^9.4.1` too. Without that, pnpm keeps every overridden deck.gl package at 9.4.0 and only `@deck.gl/react` moves. deck.gl-raster 0.10 now depends on `@developmentseed/range-reader`, so I added it to the commented-out local-checkout overrides. The breaking changes in deck.gl-raster 0.9 and 0.10 are in `deck.gl-geotiff`, `deck.gl-zarr` and `geotiff`, which Lonboard doesn't use. Lonboard only imports `RasterTileLayer`, `TileMatrixSetAdaptor` and `MinimalTileData`, and needs no code changes. Upstream fixes relevant to Lonboard: - deck.gl-raster: tile textures are destroyed when a raster layer is removed (developmentseed/deck.gl-raster#728), and a WebGL vertex array no longer leaks per tile (developmentseed/deck.gl-raster#786). - deck.gl-raster: missing TileMatrixSet bounds are inferred and `extent` is honored (developmentseed/deck.gl-raster#684). The `TMSBoundingBox` step in `examples/raster-titiler.ipynb` (#1327) should no longer be needed. That isn't tested here. - deck.gl: the MapLibre overlay container is removed with the overlay (visgl/deck.gl#10899), and `GlobeController` can zoom past level 12 (visgl/deck.gl#10737). The `beforeId` fix for interleaved MapLibre (visgl/deck.gl#10734) merged after 9.4.1, so the `idle` workaround tracked in #1293 stays. Supersedes Dependabot's #1350, which stops at deck.gl-raster 0.9.0. Closes #1350 ## Testing - `pnpm build`, `pnpm check` and `pnpm test` (12 tests) pass. - `uv run pytest` passes: 367 passed, 1 skipped, including `tests/ui`. - `tsc --noEmit` reports the same 9 errors as `main`, and no new ones. - No test covers `RasterLayer.from_geotiff`, the only path that uses deck.gl-raster's `RasterTileLayer`. I checked it by hand with a throwaway UI test. It opens a 2048×2048 EPSG:32618 COG with 3 overviews and renders it with no basemap. Tiles reach the canvas on this branch and on `main`, and the browser console output is the same on both. 🤖 Written by [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Fixes #8914
Background
MapLibre and Mapbox leave removing a control's element to the control.
MapLibreOverlayandMapboxOverlaynever removed theirs in overlaid mode, so every remount left a container in the map. With adeviceprop, Deck doesn't own the canvas, so it leaves it in place on finalize. The next overlay with that device then finds the canvas still attached, inside a stale container that no longer resizes with the map. After a window resize, deck draws at the old size and drifts from the basemap.On the website, switching WebGL2/WebGPU in the BitmapLayer example and then resizing the window reproduces it. The bug has been there since
@deck.gl/maplibreshipped in 9.4.0.Change List
MapLibreOverlay,MapboxOverlay: remove the container inonRemove