Unable to order circle layer underneath fill layer
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.7.0
**browser**: Google Chrome 130.0.6723.117
### Steps to Trigger Behavior
Create a map instance with two layers, a 'fill' type and a 'circle' type.
I am unable to get the 'circle' layer to appear beneath the 'fill' layer.
### Link to Demonstration
https://codepen.io/farseekers/pen/XWvxMmd
### Expected Behavior
As seen in the demonstration, I've tried
- adding the circle layer before adding the fill layer
- adding the circle layer after adding the fill layer
- adding the circle layer with the 'beforeId' of the fill layer
I expect it to be possible to have a circle layer to sit underneath a fill layer, but so far, it does not seem to be the case.
### Actual Behavior
All circle layers sit above the fill layer

Thanks for any assistance.
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
Open the linked CodePen reproduction and inspect the map setup, focusing on the fill and circle layer definitions and their insertion order and beforeId usage. Confirm the expected stacking behavior against the reported result; done means reproducing the issue and narrowing whether the behavior is caused by layer ordering or the rendering subsystem.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100