mapbox / mapbox/mapbox-directions.js
Assign color to layer using a function.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 58
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Hi Guys,
is it a way to use a function instead of values in the stops:[]? In my case, the colors are not defined prior so there is a function that calculates them. How I can call a function with the value of the property. This function returns the color (string)
best
Hank
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
The issue names no file, test, or entry point. Start by locating the layer styling implementation and the stops[] handling, then determine whether property-based function colors are supported or need a defined API change. Done means the requested function-based color behavior is implemented and covered by an appropriate test or documented as supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100