Skip to content

[Bug] TerrainLayer does not forward zoomOffset prop to TileLayer, breaking zoom adjustment for terrain tiles #10366

Description

@asford

Description

When using TerrainLayer with isTiled:true and specifying a zoomOffset prop (which is supported by underlying TileLayer), the zoomOffset is not passed from TerrainLayer to the child TileLayer instance. This results in the zoomOffset setting being ignored in TerrainLayer, so tiles are always fetched at actual viewport zoom regardless of user intent.

A user setting zoomOffset on a TerrainLayer expects the underlying tile requests to follow this parameter, matching the documented behavior for TileLayer.

Flavors

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

Expected Behavior

Setting zoomOffset on TerrainLayer should result in that value being used by the child TileLayer for tile selection.
When zoomOffset is set, the terrain tiles should be loaded for (actual zoom + zoomOffset), just like with a direct TileLayer.

Steps to Reproduce

  1. Create a TerrainLayer in tiled mode (using e.g. an elevationData URL template).
  2. Pass zoomOffset: 1 to TerrainLayer.
  3. Observe that terrain tiles are loaded at actual viewport zoom, not zoom+1.

https://codepen.io/asford/pen/pvRyMZg?editors=001

Environment

  • Framework version: deck.gl@latest
  • Browser: Any
  • OS: Any

Logs

No response

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions