`symbol` layers using `symbol-placement: line` render above `line` layers at zoom < 13.7 in Mapbox Standard
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.28.0
### Browser and version
Chrome 151.0.7922.75
### Expected behavior
A `line` layer added **after** a `symbol` layer (intended to render on top) should remain visually above the symbols at all zoom levels.
### Actual behavior
When zooming out past ~13.7 in Mapbox Standard, `symbol` layers placed along lines are hoisted into a top-level overlay pass, rendering directly on top of `line` layers regardless of `beforeId`, `slot`, or execution order.
### Link to the demonstration
_No response_
### Steps to trigger the unexpected behavior
1. Load Mapbox GL JS (latest v3 release) with `mapbox://styles/mapbox/standard`.
2. Add a `symbol` layer (`planned-dots`) with `symbol-placement: "line"` along a LineString.
3. Add a `line` layer (`route-line`) on top of `planned-dots` (e.g. `map.addLayer(routeLine)` called after `planned-dots`).
4. Observe correct z-ordering at zoom > 14 (`route-line` covers `planned-dots`).
5. Zoom out past 13.7 and observe `planned-dots` hopping on top of `route-line`.
```javascript
// 1. Add Planned Dots (Symbol Layer - rendered first/below)
map.addLayer({
id: 'planned-dots',
type: 'symbol',
source: 'route-source',
layout: {
'symbol-placement': 'line',
'symbol-spacing': 20,
'icon-image': 'dot-icon',
'icon-allow-overlap': true,
'icon-ignore-placement': true
}
});
// 2. Add Route Line (Line Layer - added second to render ON TOP of dots)
map.addLayer({
id: 'route-line',
type: 'line',
source: 'route-source',
paint: {
'line-color': '#2a82e4',
'line-width': 8
}
}); // Drawn after planned-dots to sit on top
### Relevant log output
```shell
```
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 map.addLayer using the provided planned-dots and route-line layers, Mapbox Standard, and zooming across 13.7. Trace how symbol layers with symbol-placement: line are rendered relative to line layers and verify that beforeId, slot, and execution order remain effective at every zoom level.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics, frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100