Skip to content

feat(mosaic)!: add explicit key?: string to mosaic sources#533

Merged
kylebarron merged 1 commit into
mainfrom
kyle/mosaic-key-id
May 13, 2026
Merged

feat(mosaic)!: add explicit key?: string to mosaic sources#533
kylebarron merged 1 commit into
mainfrom
kyle/mosaic-key-id

Conversation

@kylebarron
Copy link
Copy Markdown
Member

@kylebarron kylebarron commented May 13, 2026

The typing here will be nicer after the upstream PR: visgl/deck.gl#10299

Summary

  • Replace x? / y? / z? on MosaicSource with a single optional key: string used as the tile-cache identifier in the inner Tileset2D.
  • Default key to the source's position in sources (matching the prior behavior); supplying an explicit key keeps a source's cache slot stable across reorderings or splices.
  • Update MosaicLayer's sources doc and the related tests; override getTileId on MosaicTileset2D to read from the resolved key.

Closes #532

Test plan

  • pnpm vitest run in packages/deck.gl-geotiff — 11/11 passing
  • pnpm tsc --noEmit clean (pre-existing cog-layer.ts / cog-tile-matrix-set.ts errors unrelated)
  • pnpm biome check clean

🤖 Generated with Claude Code

Replaces the prior `x?` / `y?` / `z?` triplet on `MosaicSource` with a single
optional `key: string` used as the tile-cache identifier in the inner
Tileset2D. When `key` is omitted, the source's position in the `sources`
array is used as the default, matching the previous behavior. Supplying an
explicit `key` lets consumers keep a source's cache slot stable across
reorderings or splices of `sources`.

Closes #532

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the feat label May 13, 2026
@kylebarron kylebarron merged commit fbd9080 into main May 13, 2026
4 checks passed
@kylebarron kylebarron deleted the kyle/mosaic-key-id branch May 13, 2026 16:30
@kylebarron kylebarron changed the title feat(mosaic): add explicit key?: string to mosaic sources feat(mosaic)!: add explicit key?: string to mosaic sources May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add explicit key?: string to sources input in MosaicLayer

1 participant