[Feat] Single `beforeId` for whole `MapboxOverlay`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 14.6k
- Forks
- 2.3k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Description
Target Use Case
I am trying to switch from DeckGL as the root component in React, to using MapboxOverlay, in an app with exclusively flat layers (no 3D visualisations).
The intended ordering of layers is (bottom to top):
- MapLibre GL base layers
- all deck.gl data visualisation layers
- MapLibre GL label layers
Currently, as documented, one can set beforeId on individual Deck layers. However, that potentially requires modifying a lot of application code, and coupling it with information about the basemap (the id of the first text layer might be determined dynamically).
Additionally, beforeId isn't actually a Layer prop, so adding it to layers in a TypeScript project presumably involves silencing warnings.
Proposal
In the described scenario where all deck layers should just be sandwiched between the basemap and the map labels, it would be very useful to be able to specify a single beforeId on the MapboxOverlay instead. It would then be used for all layers if they don't have their own 'beforeId' prop defined.
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 at the MapboxOverlay implementation and its documented per-layer beforeId behavior. Trace how overlay layers are inserted relative to MapLibre layers, then define completion as an overlay-level beforeId applying to layers without their own override while preserving individual beforeId values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100