Skip to content

bug(core): Tile3DLayer throws “Invalid coordinateSystem: 2” with @loaders.gl/i3s #10368

Description

@chrisgervang

Description

Tile3DLayer throws Invalid coordinateSystem: 2 when rendering i3s tiles. In v9.3, deck.gl migrated coordinateSystem from numeric enums to string constants (#10140), but @loaders.gl/i3s still sets a numeric enum (METER_OFFSETS = 2) on parsed tile content. When Tile3DLayer._makeSimpleMeshLayer() destructures content.coordinateSystem, it passes the numeric 2 to the shader system which rejects it.

Flavors

  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CARTO
  • ArcGIS

Expected Behavior

Tile3DLayer should render i3s tiles without errors. The numeric coordinate system values from @loaders.gl/i3s should be accepted or normalized to their string equivalents.

Steps to Reproduce

  1. Run the deck.gl website locally (cd website && yarn start)
  2. Navigate to /examples/arcgis (which uses i3s tiles)
  3. Observe console errors on MeshLayer draw calls

Environment

  • Framework version: deck.gl 9.3.3, @loaders.gl/i3s 4.4.1
  • Browser: Chrome
  • OS: macOS

Logs

deck: drawing MeshLayer({id: 'tile-3d-layer-mesh-49639-default-view'}) to screen: Invalid coordinateSystem: 2 Error: Invalid coordinateSystem: 2
    at getShaderCoordinateSystem (viewport-uniforms.ts:39:11)
    at calculateViewportUniforms (viewport-uniforms.ts:295:23)
    at memoize.ts:39:24
    at getUniformsFromViewport (viewport-uniforms.ts:245:20)
    at Object.getUniforms (project.ts:17:35)
    at ShaderInputs.setProps (shader-inputs.ts:116:31)
    at MeshLayer.setShaderModuleProps (layer.ts:337:26)
    at MeshLayer._drawLayer (layer.ts:1062:14)
    at DrawLayersPass._drawLayersInViewport (layers-pass.ts:350:17)
    at DrawLayersPass._drawLayers (layers-pass.ts:155:28)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions