[Bug] TerrainLayer Missing tiles, poor performances, slow re-load.
@charlieforward9 is already working on this.
Since Jun 24, 2026.
- Dominant language
- TypeScript
- Stars
- 14.6k
- Forks
- 2.3k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Description
Description
Hello,
I am using the TerrainLayer with mapbox service APIs to render a 3D map:
const ELEVATION_DECODER = {
rScaler: 6553.6,
gScaler: 25.6,
bScaler: 0.1,
offset: -10000
};
const terrain_l_props = {
id: 'terrain',
minZoom: 0,
maxZoom: 23,
elevationDecoder: ELEVATION_DECODER,
elevationData: TERRAIN_IMAGE,
texture: SURFACE_IMAGE,
wireframe: false,
color: [255, 255, 255],
opacity: 1,
};
return <DeckGL
key={"DeckGL"}
parameters={{
depthTest: true,
}}
initialViewState={viewState}
controller={true}
views={new MapView({ repeat: true, orthographic: false })}
{...props}
>
<TerrainLayer
{...terrain_l_props}
/>
{children}
</DeckGL>
When i zoom in and then out, many tiles of the map disappear and leave white squares behinds, sometimes they take long to re-render again.
this also happens sometimes when i rotate the camera.
to me, it seems like that the TerrainLayer is clearing some tiles off the map, that it assumes are out of the viewPort, for some reasons.
also i should note that, if i replace this TerrainLayer with react-map-gl's Map component, the 3D map is rendered smoothly, with no problem and missing tiles and loads much faster.
since this significant amount of performance change is obtained just by replacing the TerrainLayer, while not changing anything else, i believe this is a problem with the TerrainLayer that needs to be addressed.
again, the slow performance of the map can not be due to my internet or system, as everything goes very smoothly if i render it with react-map-gl
Flavors
- Script tag
- React
- Python/Jupyter notebook
- MapboxOverlay
- GoogleMapsOverlay
- CartoLayer
- ArcGIS
Expected Behavior
I expect the 3D map not to remove the tiles that are still visible to the user, additionally, i expect them to load faster.
Steps to Reproduce
Install deck.gl deps, copy paste the code from me, additionally, make some small visualizations over the map like PathLayers and etc... that's it for me.
Environment
- Framework version: 9
- Browser: FireFox and Chrome
- OS: Linux
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.