mapbox / mapbox/mapbox-gl-js

Document evaluation/interpolation semantics for composite expression paint property values

Open
#5,760 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs :scroll: style-spec
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**: 0.42.2

### Steps to Trigger Behavior

Create a style expression, for example:
```
"paint": {
"fill-extrusion-color": "white",
"fill-extrusion-height": [
"interpolate", ["linear"], ["zoom"],
15.1, 0,
15.5, ["number", ["get", "height"]]
]
}
```
### Expected Behavior
Expected behaviour is that the height value will be interpolated from `0` to `1` between the zoom range of `15.1` and `15.5`.

### Actual Behavior
The height values are interpolated from `0` to `1` between the rounded down / up range of `15` and `16`.

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 style-expression example and the reported actual behavior for composite paint property values. Document how evaluation and interpolation work across the specified zoom range, including the observed rounding behavior; done means the relevant documentation clearly explains this semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.