[Bug] Using 3D Elevation in combination with tilt and panning results in some tiles not loading
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.5k
- Forks
- 1.4k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 3
Description
Description
When enabling 3D terrain using a raster-dem source, tilting and panning the map causes vector tiles and 3D buildings to randomly pop in and out. Removing the terrain layer resolves the issue.
Expected Behavior
Tiles should load consistently during tilt and pan interactions.
Steps to Reproduce
- Set up a basic MapLibre map:
<Map mapStyle="test.json" />
-
Use a style file based on MapTiler Streets v2 (create a free API key).
-
In your test.json style file, add the following source:
"sources": {
...
"terrain_dem": {
"type": "raster-dem",
"tiles": [
"https://some_elevation_api/terrarium/zxy/{z}/{x}/{y}.png"
],
"minzoom": 10,
"maxzoom": 14,
"encoding": "terrarium",
"tileSize": 256,
"attribution": "Terrarium"
}
}
- In the root of the style JSON, enable terrain:
"terrain": {
"source": "terrain_dem",
"exaggeration": 1.0
}
https://github.com/user-attachments/assets/3418bdfa-0a9d-4044-acdc-87ef848065d9
Environment
- Framework version: "react-map-gl": "^8.0.4",
- Map library: "maplibre-gl": "^5.5.0",
- Browser: Chrome 137.0.7151.69 (but also happens on any browser)
- OS: macOS Sequoia 15.3.2 (but also happens on Windows/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.
Research direction
Start by reproducing the issue with the provided React map setup, MapTiler Streets v2 style, and raster-dem terrain source, then inspect how react-map-gl integrates terrain and tilt/pan updates. Done means vector tiles and 3D buildings remain consistently loaded while tilting and panning with terrain enabled, across the reported environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- data-visualization, frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100