When using 3D Terrain raster layers with an id starting with a NUMBER forces the layer order to the bottom
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.3.0
**browser**: android mobile webview / Chrome
### Steps to Trigger Behavior
1.Use Mapbox Terrain-DEM v1
2.Add an initial raster layer that should be on the bottom with an id starting with a string id:"A5000". Then add another layer that should appear on top with an id that begins with a number ie id: "5001"
3.The second layer that should have been on top is now underneath the layer id:"A5000".
4. mapbox.setTerrain(null); will correct the layering problem
### Link to Demonstration
### Expected Behavior
Layers with id's that begin with a NUMBER should respect layer ordering when using 3D Terrian.
### Actual Behavior
Layers with id's that begin with a number are pushed to the bottom of the layer ordering in 3D Terrain mode.
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 behavior with Mapbox Terrain-DEM v1 using one layer id beginning with a letter and another beginning with a number, then compare ordering before and after mapbox.setTerrain(null). Trace the 3D Terrain layer-ordering path and verify that numeric-prefixed layer IDs preserve their requested order without requiring the terrain reset.
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