Skip to content

Commit 0221c42

Browse files
committed
docs
1 parent e162a99 commit 0221c42

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

docs/types.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,18 @@ The following example applies 2em padding on top and bottom and 3em padding left
134134
}
135135
```
136136

137-
## Projection Type
137+
## ProjectionType
138138

139-
There are currently two projection types implemented.
139+
The `projectionType` type is used to define the projection of the map.
140+
141+
There are currently two projections implemented.
140142

141143
- `mercator` - Web Mercator projection
142144
- `globe` - Globe projection
143145

146+
This value can be uses either with a single projection or as an intermediate between two.
147+
148+
It's possible to use an expression to change projection between zoom levels using a [`camera expression`](./expressions.md#camera-expressions), either with an immediate [`step`](./expressions.md#step), or an animated [`interpolate-projection`](./expressions.md#interpolate-projection).
144149

145150
**Use a single projection**
146151

src/reference/v8.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3064,6 +3064,21 @@
30643064
}
30653065
}
30663066
},
3067+
"interpolate-projection": {
3068+
"doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). Works like `interpolate`, but the output type must be a projection transition of shape `[from, to, transition]: [string, string, number]`.",
3069+
"example": {
3070+
"syntax": {
3071+
"method": ["[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]", "number", "string", "number", "..."],
3072+
"result": "projection"
3073+
},
3074+
"value": ["interpolate-projection", ["linear"], ["zoom"], 0, "globe", 10, "globe", 12, "mercator"]
3075+
},
3076+
"group": "Ramps, scales, curves",
3077+
"sdk-support": {
3078+
"basic functionality": {
3079+
}
3080+
}
3081+
},
30673082
"ln2": {
30683083
"doc": "Returns mathematical constant ln(2).",
30693084
"example": {

0 commit comments

Comments
 (0)