|
3394 | 3394 | } |
3395 | 3395 | }, |
3396 | 3396 | "interpolate": { |
3397 | | - "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>`, `color`, `array<color>`, or `projection`.\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/)", |
| 3397 | + "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>`, `color`, `array<color>`, or `projection`.\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/)", |
3398 | 3398 | "syntax": { |
3399 | 3399 | "overloads": [ |
3400 | 3400 | { |
|
3405 | 3405 | "parameters": [ |
3406 | 3406 | { |
3407 | 3407 | "name": "interpolation_type", |
3408 | | - "type": ["[\"linear\"]", "[\"exponential\", base]", "[\"cubic-bezier\", x1, y1, x2, y2]"], |
| 3408 | + "type": "interpolation", |
3409 | 3409 | "doc": "The interpolation type." |
3410 | 3410 | }, |
3411 | 3411 | { |
|
3447 | 3447 | "parameters": [ |
3448 | 3448 | { |
3449 | 3449 | "name": "interpolation_type", |
3450 | | - "type": ["[\"linear\"]", "[\"exponential\", base]", "[\"cubic-bezier\", x1, y1, x2, y2]"] |
| 3450 | + "type": "interpolation", |
| 3451 | + "doc": "The interpolation type." |
3451 | 3452 | }, |
3452 | 3453 | { |
3453 | 3454 | "name": "input", |
|
3485 | 3486 | "parameters": [ |
3486 | 3487 | { |
3487 | 3488 | "name": "interpolation_type", |
3488 | | - "type": ["[\"linear\"]", "[\"exponential\", base]", "[\"cubic-bezier\", x1, y1, x2, y2]"] |
| 3489 | + "type": "interpolation", |
| 3490 | + "doc": "The interpolation type." |
3489 | 3491 | }, |
3490 | 3492 | { |
3491 | 3493 | "name": "input", |
|
7992 | 7994 | "type": "string", |
7993 | 7995 | "doc": "A name of a feature property to use as ID for feature state." |
7994 | 7996 | } |
| 7997 | + }, |
| 7998 | + "interpolation": { |
| 7999 | + "type": "array", |
| 8000 | + "value": "interpolation_name", |
| 8001 | + "minimum": 1, |
| 8002 | + "doc": "An interpolation defines a function that can be used for transitioning between style properties or feature filters. The first element of an interpolation array is a string naming the interpolation operator, e.g. `\\\"linear\\\"` or `\\\"exponential\\\"`. Elements that follow (if any) are the _arguments_ to the interpolation." |
| 8003 | + }, |
| 8004 | + "interpolation_name": { |
| 8005 | + "doc": "First element in an interpolation array. May be followed by a number of arguments.", |
| 8006 | + "type": "enum", |
| 8007 | + "values": { |
| 8008 | + "linear": { |
| 8009 | + "doc": "Interpolates linearly between the pair of stops just less than and just greater than the input", |
| 8010 | + "syntax": { |
| 8011 | + "overloads": [ |
| 8012 | + { |
| 8013 | + "parameters": [], |
| 8014 | + "output-type": "interpolation" |
| 8015 | + } |
| 8016 | + ], |
| 8017 | + "parameters": [] |
| 8018 | + }, |
| 8019 | + "example": ["linear"], |
| 8020 | + "sdk-support": { |
| 8021 | + "interpolate": { |
| 8022 | + "js": "0.42.0", |
| 8023 | + "android": "6.0.0", |
| 8024 | + "ios": "4.0.0" |
| 8025 | + }, |
| 8026 | + "interpolate-hcl": { |
| 8027 | + "js": "0.49.0", |
| 8028 | + "ios": "https://github.com/maplibre/maplibre-native/issues/2784", |
| 8029 | + "android": "https://github.com/maplibre/maplibre-native/issues/2784" |
| 8030 | + }, |
| 8031 | + "interpolate-lab":{ |
| 8032 | + "js": "0.49.0", |
| 8033 | + "ios": "https://github.com/maplibre/maplibre-native/issues/2784", |
| 8034 | + "android": "https://github.com/maplibre/maplibre-native/issues/2784" |
| 8035 | + } |
| 8036 | + } |
| 8037 | + }, |
| 8038 | + "exponential": { |
| 8039 | + "doc": "Interpolates exponentially between the stops just less than and just greater than the input.", |
| 8040 | + "syntax": { |
| 8041 | + "overloads": [ |
| 8042 | + { |
| 8043 | + "parameters": [ |
| 8044 | + "base" |
| 8045 | + ], |
| 8046 | + "output-type": "interpolation" |
| 8047 | + } |
| 8048 | + ], |
| 8049 | + "parameters": [ |
| 8050 | + { |
| 8051 | + "name": "base", |
| 8052 | + "type": "number literal", |
| 8053 | + "doc": "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" |
| 8054 | + } |
| 8055 | + ] |
| 8056 | + }, |
| 8057 | + "example": [ |
| 8058 | + "exponential", |
| 8059 | + 2 |
| 8060 | + ], |
| 8061 | + "sdk-support": { |
| 8062 | + "interpolate": { |
| 8063 | + "js": "0.42.0", |
| 8064 | + "android": "6.0.0", |
| 8065 | + "ios": "4.0.0" |
| 8066 | + }, |
| 8067 | + "interpolate-hcl": { |
| 8068 | + "js": "0.49.0", |
| 8069 | + "ios": "https://github.com/maplibre/maplibre-native/issues/2784", |
| 8070 | + "android": "https://github.com/maplibre/maplibre-native/issues/2784" |
| 8071 | + }, |
| 8072 | + "interpolate-lab":{ |
| 8073 | + "js": "0.49.0", |
| 8074 | + "ios": "https://github.com/maplibre/maplibre-native/issues/2784", |
| 8075 | + "android": "https://github.com/maplibre/maplibre-native/issues/2784" |
| 8076 | + } |
| 8077 | + } |
| 8078 | + }, |
| 8079 | + "cubic-bezier": { |
| 8080 | + "doc": "Interpolates using the cubic bezier curve defined by the given control points.", |
| 8081 | + "syntax": { |
| 8082 | + "overloads": [ |
| 8083 | + { |
| 8084 | + "parameters": [ |
| 8085 | + "x1", |
| 8086 | + "y1", |
| 8087 | + "x2", |
| 8088 | + "y2" |
| 8089 | + ], |
| 8090 | + "output-type": "interpolation" |
| 8091 | + } |
| 8092 | + ], |
| 8093 | + "parameters": [ |
| 8094 | + { |
| 8095 | + "name": "x1", |
| 8096 | + "type": "number literal", |
| 8097 | + "doc": "X-coordinate of the first control point (P1). Must be between 0 and 1 for a valid monotonic easing curve. Controls how quickly the curve accelerates at the beginning." |
| 8098 | + }, |
| 8099 | + { |
| 8100 | + "name": "y1", |
| 8101 | + "type": "number literal", |
| 8102 | + "doc": "Y-coordinate of the first control point (P1). Typically between 0 and 1, but may exceed this range for overshoot effects. Influences the starting slope of the curve." |
| 8103 | + }, |
| 8104 | + { |
| 8105 | + "name": "x2", |
| 8106 | + "type": "number literal", |
| 8107 | + "doc": "X-coordinate of the second control point (P2). Must be between 0 and 1 for a valid monotonic easing curve. Controls when the curve begins to decelerate toward the end." |
| 8108 | + }, |
| 8109 | + { |
| 8110 | + "name": "y2", |
| 8111 | + "type": "number literal", |
| 8112 | + "doc": "Y-coordinate of the second control point (P2). Typically between 0 and 1, but may exceed this range for overshoot effects. Influences the ending slope of the curve." |
| 8113 | + } |
| 8114 | + ] |
| 8115 | + }, |
| 8116 | + "example": [ |
| 8117 | + "cubic-bezier", |
| 8118 | + 2, |
| 8119 | + 3, |
| 8120 | + 2, |
| 8121 | + 3 |
| 8122 | + ], |
| 8123 | + "sdk-support": { |
| 8124 | + "interpolate": { |
| 8125 | + "js": "0.42.0", |
| 8126 | + "android": "6.0.0", |
| 8127 | + "ios": "4.0.0" |
| 8128 | + }, |
| 8129 | + "interpolate-hcl": { |
| 8130 | + "js": "0.49.0", |
| 8131 | + "ios": "https://github.com/maplibre/maplibre-native/issues/2784", |
| 8132 | + "android": "https://github.com/maplibre/maplibre-native/issues/2784" |
| 8133 | + }, |
| 8134 | + "interpolate-lab":{ |
| 8135 | + "js": "0.49.0", |
| 8136 | + "ios": "https://github.com/maplibre/maplibre-native/issues/2784", |
| 8137 | + "android": "https://github.com/maplibre/maplibre-native/issues/2784" |
| 8138 | + } |
| 8139 | + } |
| 8140 | + } |
| 8141 | + } |
7995 | 8142 | } |
7996 | 8143 | } |
0 commit comments