Repository navigation
chore: switch examples from @deck.gl/mapbox to @deck.gl/maplibre - #661
Closed
kylebarron wants to merge 1 commit into
Closed
kylebarron wants to merge 1 commit into
kylebarron wants to merge 1 commit into
Conversation
This was referenced Sep 22, 2026
Closed
kylebarron
added a commit
to developmentseed/lonboard
that referenced
this pull request
Sep 29, 2026
> [!NOTE] > This PR was written by Claude (Claude Code), not by @kylebarron. Closes #1262 Upgrades to deck.gl 9.4 (the last v9 release), luma.gl 9.4, and deck.gl-raster 0.8. deck.gl-raster 0.8 requires deck.gl 9.4. ## Changes - **deck.gl and luma.gl:** `@deck.gl/*` → ^9.4.0 and `@luma.gl/*` → ^9.4.2. Both are updated in `package.json` and in the `overrides` in `pnpm-workspace.yaml`. Those overrides keep a single copy of each package, and they had held the lockfile at 9.3 even after `package.json` was bumped. - **deck.gl-raster family:** `@developmentseed/affine`, `deck.gl-raster`, `morecantile` and `raster-reproject` → ^0.8.1 together. This removes the duplicate `@developmentseed/affine` 0.6.1 and 0.7.0 copies that `main` bundles today. It brings in deck.gl-raster's fixes: - center-first tile loading, now handled by deck.gl 9.4 itself; - lighting turned off for raster layers; - `isLoaded` returning false while metadata loads; - tile traversal latitudes clamped to [-90, 90]; - COG open failures reported through `onError`. - **Undeclared dependencies:** `@deck.gl/aggregation-layers`, `@deck.gl/geo-layers`, `@deck.gl/widgets` and `@luma.gl/core` are now declared. They were imported in `src/`, or required as peers, but only installed because pnpm installs missing peers automatically. The stale `aggregation-layers` 9.3.1 peer was what caused an "unmet peer" warning. - **loaders.gl:** the twelve loaders.gl packages that deck.gl and luma.gl depend on directly are overridden to ~4.4.5. - `@luma.gl/gltf` 9.4 requires loaders.gl ~4.4.5, while deck.gl 9.4 accepts ^4.4.3. - loaders.gl packages pin exact versions of each other. - Without the overrides, a fresh resolution mixes 4.4.5 and 4.5.x. An esbuild metafile showed that bundles seven loaders.gl packages twice. - **dependabot:** `@developmentseed/*` is grouped with deck.gl, so the family moves together. ### Not switching to `@deck.gl/maplibre` yet 9.4 adds `@deck.gl/maplibre` as the MapLibre replacement for `@deck.gl/mapbox`. But in 9.4.0 it draws interleaved layers that set `beforeId` above every MapLibre layer on first page load (visgl/deck.gl#10733). That would break lonboard's `before_id`, so this PR stays on `@deck.gl/mapbox` ^9.4.0. deck.gl-raster made the same call; see developmentseed/deck.gl-raster#661. The fix, visgl/deck.gl#10734, is open. The switch from `MapboxOverlay` to `MapLibreOverlay` in `src/renderers/overlay.tsx` can happen once a release includes it; that's tracked in #1273. ## Verification **Picking.** deck.gl 9.4 drops the auto-generated `instancePickingColors` attribute. Nothing in lonboard reads it, but the existing UI tests never actually asserted that picking works. New `tests/ui/test_picking.py` clicks a feature and checks that Python receives the right `selected_index`, for scatterplot, path, polygon and solid polygon layers. It passes on `main` (deck.gl 9.3) and on this branch. **Static HTML exports.** 15 exports were checked in headless Chromium on both `main` and this branch: five layer types (scatterplot, path, polygon, text, H3) in each of the `overlaid`, `interleaved` and `reverse-controlled` modes. - Hover tooltips appear in every case. - The controls render the same way on both versions. - No console errors. **Raster.** A local tiled GeoTIFF rendered through `RasterLayer.from_geotiff` and deck.gl-raster 0.8 displays correctly. **Replacing a map.** Swapping one map for another in the same output reuses the MapLibre instance (`reuseMaps`). It renders correctly in both `overlaid` and `interleaved` modes, with no "WebGL context already attached" error. That's the problem deck.gl-raster#668 hit under React StrictMode. **Checks:** - `pnpm install --frozen-lockfile`: clean, with no peer-dependency warnings. - `biome check`: clean. - `tsc --noEmit`: the same 8 errors as `main`, with identical messages. - `pytest`: 226 passed, 1 skipped. ## Things to know - **Bundle size:** the bundle grows from 3.46 MB to 3.76 MB (+297 KB, about 8.6%). Most of that is deck.gl 9.4's WebGPU code, which is now included by default. deck.gl offers a `visgl:webgl-only` export condition to drop it, but it has no effect here, because `build.mjs` aliases each `@deck.gl/*` package to a directory path, and export conditions only apply to bare package names. Using it would mean pointing the aliases at the `dist.webgl-only` builds; that's left for a follow-up. - **New console warnings:** luma.gl 9.4.x logs `WebGL uniform block reflection failed for "gouraudMaterialUniforms"` / `"lightingUniforms"` for lit layers such as polygons. Rendering is correct. This is visgl/luma.gl#3187, fixed on luma.gl `master` in visgl/luma.gl#3190 but not backported to the 9.4 branch (9.4.1 and 9.4.2 don't include it). - **Beta:** this is a good point to cut `0.17.0-beta.2`. 🤖 Written by [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Nov 24, 2026
kylebarron
added a commit
that referenced
this pull request
Nov 24, 2026
…s redundant (#886) > [!NOTE] > This PR was written by Claude (Claude Code) on behalf of @kylebarron, not by @kylebarron. Closes #863 ### Problem deck.gl [9.4.2](https://github.com/visgl/deck.gl/releases/tag/v9.4.2) includes visgl/deck.gl#10883: - `Tileset2D.finalize` calls `onTileUnload` for every cached tile. - A tile whose load finishes after it left the cache is unloaded instead of reported loaded. Our workarounds for 9.4.1 do the same thing. On 9.4.2, they unloaded every tile twice. That destroyed default-pipeline textures twice and ran user `onTileUnload` / `onSourceUnload` callbacks twice (#863). With the lockfile moved to 9.4.2, five tests failed this way before this change. ### Change This is option 2 from #863: - Every `@deck.gl/*` spec, including peer deps, pnpm overrides and examples, now requires `^9.4.2`. The lockfile moves only deck.gl. - `RasterTileset2D`: removes the `finalize` override and the late-load guard from #878. The `abortUnwantedLoads` wrapper of `onTileUnload` stays. - `MosaicTileset2D`: removes the `finalize` override. `reloadAll` stays, because deck.gl's `reloadAll` still drops items without unloading them. It now calls deck.gl's `finalize`. - `custom-projection` example: removes its `finalize` override. - `MosaicLayer.onSourceUnload` docs: an item that is still opening is unloaded with no source, then again with its source once the open finishes. - `onnx-embeddings/NOTES.md`: no longer says the mid-load eviction leak applies. ### Test plan - [x] `deck.gl-raster` (263), `deck.gl-geotiff` (224) and `deck.gl-zarr` (81) tests pass on 9.4.2. - [x] One test encoded 9.4.1 behavior, with no unload at `finalize` for a loading tile. It now expects an unload right away with no content, then another once the data arrives. - [x] `biome ci` passes. - [ ] Not checked in a browser. Follow-up: switch the examples to `@deck.gl/maplibre` (#661), which visgl/deck.gl#10734 in 9.4.2 unblocks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011cLtCQHxJfGKqmXPYrjSPA Co-authored-by: Claude Opus 5.5 <[email protected]>
kylebarron
added a commit
that referenced
this pull request
Nov 24, 2026
deck.gl 9.4.2 fixes `beforeId` on first load in `@deck.gl/maplibre` (visgl/deck.gl#10734), which blocked this switch in #661. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011cLtCQHxJfGKqmXPYrjSPA
kylebarron
added a commit
that referenced
this pull request
Nov 24, 2026
> [!NOTE] > This PR was written by Claude (Claude Code) on behalf of @kylebarron, not by @kylebarron. Needs deck.gl 9.4.2, from #886. Supersedes #661. ### Why deck.gl 9.4 adds `@deck.gl/maplibre`. #661 switched to it, but stayed a draft: with 9.4.0, interleaved layers that set `beforeId` were drawn above every MapLibre layer on first load (visgl/deck.gl#10733). visgl/deck.gl#10734 fixes that in 9.4.2. ### Change - The shared `DeckGlOverlay` uses `MapLibreOverlay` instead of `MapboxOverlay`. - `@deck.gl/mapbox` is replaced by `@deck.gl/maplibre` in `examples/_shared` and the root pnpm overrides. - The `@ts-expect-error` comments on `beforeId` now name `@deck.gl/maplibre`. ### Test plan - [x] `biome ci`, and `typecheck` and `build` of every example, pass. - [x] `cog-globe` in headless Chrome (SwiftShader), first load with no interaction: basemap labels and country borders draw above the raster, as `beforeId: "boundary_country_outline"` intends. That's the case that failed in #661. - [x] Every other example that uses `DeckGlOverlay`, in headless Chrome on a real GPU (GTX 950, ANGLE Vulkan), first load with no interaction: - Labels or borders draw above the deck.gl layers, as their `beforeId` intends: `aef-mosaic`, `cog-basic`, `dynamical-zarr-ecmwf`, `geoarrow-overlay`, `land-cover`, `naip-mosaic`, `nldas-icechunk`, `onnx-embeddings`, `pmtiles-terrain`, `titiler-cog`, `vermont-cog-comparison`, `vrt-mosaic`, `zarr-globe`. - No `beforeId`, so the layer draws on top, as before: `sentinel-2`, `usgs-topo`. - No console errors in any of them. Each logs `luma.gl: Binding sampler not set`; I didn't check whether `@deck.gl/mapbox` logs it too. - [ ] `zarr-sentinel2-tci` not checked: it reads from `http://localhost:8080/TCI.zarr`, which wasn't running. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011cLtCQHxJfGKqmXPYrjSPA Co-authored-by: Claude Opus 5.5 <[email protected]>
Member
Author
|
Superseded by #887 |
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.
As of deck.gl 9.4, there's a new
deck.gl/maplibremodule instead of the only previousdeck.gl/mapboxmodule.Note
This PR description was written by Claude (Claude Code), not by @kylebarron.
Switches the examples from
@deck.gl/mapboxto the new@deck.gl/maplibremodule in deck.gl 9.4: the sharedDeckGlOverlaycomponent now usesMapLibreOverlayinstead ofMapboxOverlay.Draft: this is blocked on a bug in
@deck.gl/maplibre9.4.0. On first page load, interleaved layers that setbeforeIdare drawn on top of every MapLibre layer instead of at theirbeforeIdposition. It stays open as a reproduction for the upstream issue.Reproduce
pnpm install && pnpm build, thenpnpm devinexamples/cog-globe.beforeId: "boundary_country_outline"intends.Cause
resolveMapLibreLayerGroupsreturns early unlessmap.isStyleLoaded(). In MapLibre,isStyleLoaded()requires every source's tiles and every image to have loaded, not just the style JSON (Style.loaded()).styledata. On first load those events all fire while basemap tiles are still loading, so no layer group is ever added to the style.afterMapLibreRenderthen draws any deck layer without a group after MapLibre has rendered, on top of everything.setPropscalls the resolver again once everything has loaded, so the group lands in the right place.@deck.gl/mapboxonly checksmap.style._loaded, which is true as soon as the style JSON has loaded.🤖 Written by Claude Code on behalf of @kylebarron.