Heatmap layer doesn't respect slot property
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**: 3.2.0
**browser**: Chrome 122
### Steps to Trigger Behavior
1. Add terrain source and layer to map
2. Add a line source and layer with `slot: "top"`
3. Add a heatmap source and layer `slot: "bottom"`
4. Lines cannot be seen above heatmaps
### Link to Demonstration
https://codepen.io/Jobbb/pen/MWRezXG
### Expected Behavior
Lines can be seen above heatmaps, as they were added after the heatmap layer and have `top` slot
Example from V2, terrain on, and `optimizeForTerrain` set to `false`, lines can be shown above heatmaps
### Actual Behavior
Same example from V3, but lines are now batched with terrain and heatmap doesn't respect layer order or slot
I understand that the line layers are effectively being baked into the terrain now in mapbox V3. If my example is actually misusing slots, would it be possible to exclude certain layers from the terrain batching process?
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 with the linked CodePen reproduction and compare the terrain, line, and heatmap layers using their `slot` values. Trace the terrain batching behavior described in the issue; done means lines in the `top` slot render above the heatmap in the terrain-enabled example.
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