"raster-dem" source doesn't work with custom dem tiles.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: v2.8.2
**browser**: Any
### Steps to Trigger Behavior
1. I am trying to use my own 1 meter high resolution RGB tiles to setTerrain, rather than using mapbox://mapbox.mapbox-terrain-dem-v1, for a small area.
2. The code is:
` map.addSource("rwanda-dem", {
"type": "raster-dem",
"tiles":
["/public/images/raster-dem/{z}/{x}/{y}.webp"],
"tileSize": 514,
"maxzoom": 18,
"minzoom": 1,
});`
3. The area's terrain was generated correctly with elevation, excep the whole area is floating from other part of the map where no elevation covered.

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 raster-dem addSource configuration and custom WebP tiles. Trace how custom elevation tiles are handled where terrain is absent, then verify that the covered area renders at the correct elevation without floating relative to surrounding map regions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100