Skip to content

[Bug] Cannot dynamically alternate between terrain ON/OFF #8450

@ssaornil

Description

@ssaornil

Description

We are attempting to alternate dynamically between two modes of visualization, one with terrain ON and another one with terrain OFF.

We are using mapbox as our base map and we are adding some content using the MapboxOverlay in non-interleaved mode.
We are using the TerrainLayer and the experimental TerrainExtension to "drape" the content to the terrain.

Regardless of the fact that mapbox and deck do not match completely (we are aware of that and we are disregarding that issue at the moment), we are unable to alternate between those two modes of terrain ON/OFF.

Flavors

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

Expected Behavior

We would expect to be able to switch between terrain ON/OFF using one of the following approaches or a combination of them:

  1. Toggle TerrainLayer visibility
  2. Adding/removing TerrainLayer
  3. Adding/removing TerrainExtension from the layers (either by redefining the layers or by cloning them)

Steps to Reproduce

Demo

In the above DEMO we are displaying the same content with mapbox and deck (using different styles). And there is a button to toggle between Terrain ON/OFF modes.

The deck layers are not visible when trying to start in the "Terrain ON" mode. START_WITH_TERRAIN= true . Alternating does nothing.

The deck content is not draped and it is also cropped when starting in the Terrain OFF mode and alternating to Terrain ON mode.

Environment

  • Framework version: deck.gl@8.9.34
  • Browser: Chrome 120.0
  • OS: Ubuntu 22.04.3 LTS

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions