|
2992 | 2992 | } |
2993 | 2993 | }, |
2994 | 2994 | "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/)", |
2996 | 2996 | "example": { |
2997 | 2997 | "syntax": { |
2998 | | - "method": ["step", "number", "number", "number", "..."], |
| 2998 | + "method": ["step", "input1", "output1", "input2", "output2", "..."], |
2999 | 2999 | "result": "number" |
3000 | 3000 | }, |
3001 | 3001 | "value": [ "step", ["get", "point_count"], 20, 100, 30, 750, 40] |
|
3013 | 3013 | "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/)", |
3014 | 3014 | "example": { |
3015 | 3015 | "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", "..."], |
3017 | 3017 | "result": "number | array<number> | color" |
3018 | 3018 | }, |
3019 | 3019 | "value": ["interpolate", ["linear"], ["zoom"], 15, 0, 15.05, ["get", "height"]] |
|
3031 | 3031 | "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.", |
3032 | 3032 | "example": { |
3033 | 3033 | "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", "..."], |
3035 | 3035 | "result": "color" |
3036 | 3036 | }, |
3037 | 3037 | "value": ["interpolate-hcl", ["linear"], ["zoom"], 15, "#f00", 15.05, "#00f"] |
|
3049 | 3049 | "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.", |
3050 | 3050 | "example": { |
3051 | 3051 | "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", "..."], |
3053 | 3053 | "result": "color" |
3054 | 3054 | }, |
3055 | 3055 | "value": ["interpolate-lab", ["linear"], ["zoom"], 15, "#f00", 15.05, "#00f"] |
|
0 commit comments