mapbox / mapbox/mapbox-gl-traffic
Configurable source layer ID
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 108
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
The current implementation is hardcoded to inject itself when it finds a "source-layer" with ID "road". Probably works for most of Mapbox' styles but I've had style formats that didn't use that naming convention. I suggest exposing the source-layer ID (or maybe more than one?) as an option for better configurability.
(related, if it doesn't find a source-layer an empty array check could be done and maybe log for more graceful error exit)
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 by locating the implementation that searches for a source-layer with ID "road" and trace how its options are supplied. Define the desired configuration shape and verify behavior with a style using a different source-layer ID; also check the missing-layer path for a graceful result or log message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100