line-gradient for vector tile sources
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
## Motivation
I would like to use the `gradient-line` on a vector tile source.
For now, this option can only be used with GeoJSON sources. But this type of source is not really usable for large datasets.
## Design Alternatives
## Design
### Mock-Up
### Concepts
### Implementation
The API wouldn't change :
```
map.addLayer({
"id": "line",
"type": "line",
"source": {
type: 'vector',
url: 'mapbox://mapbox.mapbox-terrain-v2'
},
"source-layer": "line",
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-opacity": 0.6,
"line-width": 0.01,
'line-gradient': [
'interpolate',
['linear'],
['line-progress'],
0, "blue",
1, "red"
]
}
});
```
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 with the map.addLayer example in the issue and trace the existing gradient-line support for GeoJSON sources. Determine what must change for the same API to work with vector tile sources, and consider the relevant implementation and edge cases before defining completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100