Repository navigation
fix(geo-layers): normalize legacy numeric coordinateSystem in Tile3DLayer - #10538
Merged
chrisgervang merged 4 commits intoOct 11, 2026
Merged
chrisgervang merged 4 commits into
chrisgervang merged 4 commits into
Conversation
ibgreen
approved these changes
Aug 12, 2026
7 tasks
…ayer deck.gl v9.3 migrated `coordinateSystem` from numeric enums to string constants (visgl#10140). Released tile loaders such as `@loaders.gl/i3s` still set the old numeric value (`METER_OFFSETS = 2`) on parsed tile content, so `Tile3DLayer._makeSimpleMeshLayer()` forwarded `2` to the shader system and rendering failed with `Invalid coordinateSystem: 2`. Translate the numeric values reported by tile content back to the string constants before they reach the sublayer. Unrecognized values are passed through unchanged so the core validation still reports them. Fixes visgl#10368
mhayk
force-pushed
the
fix/tile-3d-layer-legacy-coordinate-system-10368
branch
from
August 14, 2026 20:32
2c14c8b to
b264808
Compare
Contributor
Author
|
Rebased onto the latest The |
53 of 66 tasks
…-10368 Resolve the spec import conflict: keep master's Deck/ScenegraphLayer/WebGPU imports alongside the normalizeCoordinateSystem test.
|
chrisgervang
added a commit
that referenced
this pull request
Oct 22, 2026
…ayer (#10538) * fix(geo-layers): normalize legacy numeric coordinateSystem in Tile3DLayer deck.gl v9.3 migrated `coordinateSystem` from numeric enums to string constants (#10140). Released tile loaders such as `@loaders.gl/i3s` still set the old numeric value (`METER_OFFSETS = 2`) on parsed tile content, so `Tile3DLayer._makeSimpleMeshLayer()` forwarded `2` to the shader system and rendering failed with `Invalid coordinateSystem: 2`. Translate the numeric values reported by tile content back to the string constants before they reach the sublayer. Unrecognized values are passed through unchanged so the core validation still reports them. Fixes #10368 * test(geo-layers): cover mesh sub layer legacy coordinateSystem path --------- Co-authored-by: Chris Gervang <[email protected]> Co-authored-by: Chris Gervang <[email protected]> (cherry picked from commit 675b626)
Collaborator
|
Released in deck.gl 9.4.1. Thanks @mhayk! |
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.
Goal
Fixes #10368 —
Tile3DLayerthrowsInvalid coordinateSystem: 2when rendering i3s tiles.deck.gl v9.3 migrated
coordinateSystemfrom numeric enums to string constants (#10140). Released tile loaders still emit the old numeric value on parsed tile content —@loaders.gl/i3ssetsMETER_OFFSETS = 2.Tile3DLayer._makeSimpleMeshLayer()readscoordinateSystemstraight offtileHeader.contentand forwards it to the sublayer, so the numeric2reachesgetShaderCoordinateSystem(), which rejects it:Upstream fixed this in loaders.gl master (visgl/loaders.gl#3449), but the numeric values are still present in released
4.4.xbuilds, andTile3DLayeraccepts tile content from any loader — including third-party ones. Normalizing at that boundary keeps deck.gl working regardless of which loader version is installed.Changes
modules/geo-layers/src/tile-3d-layer/tile-3d-layer.tsLEGACY_COORDINATE_SYSTEMS, mapping the pre-9.3 numeric values (-1,0,1,2,3) to their string constants.normalizeCoordinateSystem()and apply it to thecoordinateSystemread from tile content in_makeSimpleMeshLayer().Invalid coordinateSystemvalidation still reports genuinely bad input rather than this shim masking it.The public API is untouched: this only translates loader-provided values, so raw numeric
coordinateSystemprops remain unsupported as documented in the v9.3 upgrade guide.normalizeCoordinateSystemis exported for the test only and is not re-exported frommodules/geo-layers/src/index.ts.Validation
test/modules/geo-layers/tile-3d-layer/tile-3d-layer.spec.ts— newTile3DLayer#normalizeCoordinateSystemcase covering each legacy numeric value, string pass-through, and unknown-value pass-through.biome checkon both changed files reports no new findings (4 pre-existingnoUnusedVariableswarnings in the untoucheddefaultPropsblock are left alone to keep the diff focused).Not run locally:
yarn test-render(golden images) and the fullyarn build.Note
Low Risk
Localized compatibility shim at the tile-content → sublayer boundary; does not change public layer props or other coordinate paths in the file.
Overview
Fixes
Invalid coordinateSystem: 2whenTile3DLayerrenders mesh tiles from loaders (e.g.@loaders.gl/i3s) that still attach pre–v9.3 numericcoordinateSystemvalues on tile content after deck.gl moved to string constants.Adds
normalizeCoordinateSystem(), mapping legacy numbers (-1–3) to the matchingCOORDINATE_SYSTEM.*strings and leaving string values and unknown numbers unchanged so core validation still catches bad input._makeSimpleMeshLayer()now normalizescoordinateSystemfromtileHeader.contentbefore passing it to the mesh sublayer.Tests cover the mapper (each legacy value, pass-through, unknown numeric) and that a mesh sublayer gets
METER_OFFSETSwhen content reports2.Reviewed by Cursor Bugbot for commit 6cb3beb. Bugbot is set up for automated code reviews on this repo. Configure here.