mapbox / mapbox/mapbox-gl-js

When enabling Terrain, the building-extrusion layer has an height offset that is not removable

Open
#13,055 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :lady_beetle:
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
  1. Set any map configuration, even a custom one
  2. Add a build-extrusion layer to display the 3D buildings
  3. 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.
flat
not_flat

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.