Skip to content

Commit 83be248

Browse files
authored
docs: Try to clarify the order of interpolate arguments (#1065)
* Remove outdated instructions for building docs * Try to clarify the order of interpolate arguments
1 parent 120067c commit 83be248

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@ It is a good idea to discuss proposed changes before proceeding to an issue tick
1515

1616
MapLibre software relies heavily on automated testing, and the project includes a suite of unit and integration tests. For both new features and bug fixes, contributions should update or add test cases to prevent regressions.
1717

18-
# Building the Docs site
19-
20-
The MapLibre style spec documentation site is based on [SolidStart](https://start.solidjs.com/) in order to get Server Side Rendering for Search Engine Optimization.
21-
22-
```bash
23-
cd docs
24-
npm ci
25-
npm run dev
26-
```
27-
2818
# Building the Style spec JS package
2919

3020
This package is used by `maplibre-gl` in order to validate the spec and parse it.

src/reference/v8.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2992,10 +2992,10 @@
29922992
}
29932993
},
29942994
"step": {
2995-
"doc": "Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.\n\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/cluster/)",
2995+
"doc": "Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order.\n\nReturns the output value of the stop just less than the input, or the first output if the input is less than the first stop.\n\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/cluster/)",
29962996
"example": {
29972997
"syntax": {
2998-
"method": ["step", "number", "number", "number", "..."],
2998+
"method": ["step", "input1", "output1", "input2", "output2", "..."],
29992999
"result": "number"
30003000
},
30013001
"value": [ "step", ["get", "point_count"], 20, 100, 30, 750, 40]
@@ -3013,7 +3013,7 @@
30133013
"doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n\n- `[\"linear\"]`, or an expression returning one of those types: Interpolates linearly between the pair of stops just less than and just greater than the input.\n\n- `[\"exponential\", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n\n- `[\"cubic-bezier\", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.\n\n - [Animate map camera around a point](https://maplibre.org/maplibre-gl-js/docs/examples/animate-camera-around-point/)\n\n - [Change building color based on zoom level](https://maplibre.org/maplibre-gl-js/docs/examples/change-building-color-based-on-zoom-level/)\n\n - [Create a heatmap layer](https://maplibre.org/maplibre-gl-js/docs/examples/heatmap-layer/)\n\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)",
30143014
"example": {
30153015
"syntax": {
3016-
"method": ["[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]", "number", "number", "number", "..."],
3016+
"method": ["[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]", "input1", "output1", "input2", "output2", "..."],
30173017
"result": "number | array<number> | color"
30183018
},
30193019
"value": ["interpolate", ["linear"], ["zoom"], 15, 0, 15.05, ["get", "height"]]
@@ -3031,7 +3031,7 @@
30313031
"doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.",
30323032
"example": {
30333033
"syntax": {
3034-
"method": ["[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]", "number", "number", "number", "..."],
3034+
"method": ["[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]", "input1", "output1", "input2", "output2", "..."],
30353035
"result": "color"
30363036
},
30373037
"value": ["interpolate-hcl", ["linear"], ["zoom"], 15, "#f00", 15.05, "#00f"]
@@ -3049,7 +3049,7 @@
30493049
"doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.",
30503050
"example": {
30513051
"syntax": {
3052-
"method": ["[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]", "number", "number", "number", "..."],
3052+
"method": ["[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]", "input1", "output1", "input2", "output2", "..."],
30533053
"result": "color"
30543054
},
30553055
"value": ["interpolate-lab", ["linear"], ["zoom"], 15, "#f00", 15.05, "#00f"]

0 commit comments

Comments
 (0)