mapbox / mapbox/mapbox-gl-js

line-gradient for vector tile sources

Open
#8,974 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

api :memo: feature :green_apple:
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.