When enabling Terrain, the building-extrusion layer has an height offset that is not removable
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: Latest
browser: Firefox
Steps to Trigger Behavior
- Set any map configuration, even a custom one
- Add a build-extrusion layer to display the 3D buildings
- Minimize the height to 0
Additional note : this is something that I was able to do in Mapbox Studio
Expected Behavior
With or without the terrain enabled, the extruded layer should behave the same way.
The extruded layer should be completely flat due to the height value
Actual Behavior
With no terrain enabled, setting the height to 0 is flattening the layer.
With the terrain enabled, the height is also set to 0 but the layer is still extruded.
Changing the exageration is not changing the extrusion property.
In these pictures, you can see the regular layer in grey and its minimum height in red. The minimum value is not making the extrusion flat...
It also seems like the regular height value is offsetted by the residual extrusion (similar to https://github.com/mapbox/mapbox-gl-js/issues/11983)
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
Reproduce the issue with terrain enabled and a building-extrusion layer whose height is set to 0, comparing it with the same layer without terrain. Trace the terrain and extrusion rendering paths from the map configuration, then verify that zero height produces a flat layer in both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100