@rnmapbox/maps 10.0.0-beta.41 → 10.0.0-beta.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +2 -1
- package/.github/workflows/ios-actions.yml +1 -1
- package/android/install.md +20 -1
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/RCTMGLPackage.java +2 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.kt +22 -31
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +26 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/atmosphere/RCTMGLAtmosphere.kt +59 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/atmosphere/RCTMGLAtmosphereManager.kt +30 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/terrain/RCTMGLTerrain.kt +32 -27
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/terrain/RCTMGLTerrainManager.kt +5 -11
- package/docs/Annotations.md +4 -3
- package/docs/Camera.md +1 -1
- package/docs/HeadingIndicator.md +1 -1
- package/docs/MapView.md +2 -2
- package/docs/SymbolLayer.md +4 -3
- package/docs/Terrain.md +64 -9
- package/docs/docs.json +66 -53
- package/index.d.ts +13 -80
- package/ios/RCTMGL-v10/RCTMGLCamera.swift +28 -26
- package/ios/RCTMGL-v10/RCTMGLImages.swift +1 -99
- package/ios/RCTMGL-v10/RCTMGLLogging.swift +8 -0
- package/ios/RCTMGL-v10/RCTMGLMapView.swift +35 -39
- package/ios/RCTMGL-v10/RCTMGLSingletonLayer.swift +7 -1
- package/ios/RCTMGL-v10/RCTMGLStyle.swift +34 -0
- package/ios/RCTMGL-v10/RCTMGLTerrain.swift +56 -63
- package/ios/RCTMGL-v10/RCTMGLTerrainManager.m +2 -3
- package/javascript/components/AbstractLayer.tsx +72 -0
- package/javascript/components/BackgroundLayer.js +1 -1
- package/javascript/components/Camera.tsx +17 -1
- package/javascript/components/CircleLayer.js +1 -1
- package/javascript/components/FillExtrusionLayer.js +1 -1
- package/javascript/components/FillLayer.js +1 -1
- package/javascript/components/{HeadingIndicator.js → HeadingIndicator.tsx} +5 -6
- package/javascript/components/HeatmapLayer.js +1 -1
- package/javascript/components/LineLayer.js +1 -1
- package/javascript/components/MapView.js +8 -12
- package/javascript/components/RasterLayer.js +1 -1
- package/javascript/components/SkyLayer.js +1 -1
- package/javascript/components/SymbolLayer.tsx +113 -0
- package/javascript/components/Terrain.tsx +52 -0
- package/javascript/components/UserLocation.js +1 -1
- package/javascript/global.d.ts +4 -0
- package/javascript/index.js +8 -4
- package/javascript/types/index.ts +0 -14
- package/javascript/utils/MapboxStyles.ts +177 -52
- package/javascript/utils/StyleValue.ts +8 -6
- package/javascript/utils/deprecation.ts +39 -0
- package/javascript/utils/{filterUtils.js → filterUtils.tsx} +1 -1
- package/javascript/utils/styleMap.ts +26 -0
- package/package.json +6 -6
- package/scripts/autogenHelpers/DocJSONBuilder.js +2 -3
- package/scripts/autogenHelpers/globals.js +20 -7
- package/scripts/autogenerate.js +13 -0
- package/scripts/templates/MapboxStyles.ts.ejs +8 -3
- package/scripts/templates/RCTMGLStyleFactoryv10.java.ejs +1 -0
- package/.eslintignore +0 -1
- package/javascript/components/AbstractLayer.js +0 -46
- package/javascript/components/SymbolLayer.js +0 -120
- package/javascript/components/Terrain.js +0 -56
- package/javascript/utils/deprecation.js +0 -24
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* This file was generated from MapboxStyle.ts.ejs do not modify */
|
|
2
|
+
import { type ImageSourcePropType } from 'react-native';
|
|
2
3
|
|
|
3
4
|
export type Translation = { x: number; y: number } | [number, number];
|
|
4
5
|
|
|
@@ -7,6 +8,8 @@ export interface Transition {
|
|
|
7
8
|
delay: number;
|
|
8
9
|
}
|
|
9
10
|
|
|
11
|
+
export type FormattedString = string; /* TODO */
|
|
12
|
+
|
|
10
13
|
type ExpressionName =
|
|
11
14
|
// Types
|
|
12
15
|
| 'array'
|
|
@@ -120,8 +123,10 @@ type ExpressionParameters =
|
|
|
120
123
|
| 'line-progress'
|
|
121
124
|
| 'heatmap-density';
|
|
122
125
|
|
|
126
|
+
type ResolvedImageType = ImageSourcePropType;
|
|
127
|
+
|
|
123
128
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
124
|
-
type Value<T, AllowedParameters extends ExpressionParameters[] = []> =
|
|
129
|
+
export type Value<T, AllowedParameters extends ExpressionParameters[] = []> =
|
|
125
130
|
| T
|
|
126
131
|
| Expression;
|
|
127
132
|
|
|
@@ -131,12 +136,14 @@ enum VisibilityEnum {
|
|
|
131
136
|
/** The layer is not shown. */
|
|
132
137
|
None = 'none',
|
|
133
138
|
}
|
|
139
|
+
type VisibilityEnumValues = 'visible' | 'none';
|
|
134
140
|
enum FillTranslateAnchorEnum {
|
|
135
141
|
/** The fill is translated relative to the map. */
|
|
136
142
|
Map = 'map',
|
|
137
143
|
/** The fill is translated relative to the viewport. */
|
|
138
144
|
Viewport = 'viewport',
|
|
139
145
|
}
|
|
146
|
+
type FillTranslateAnchorEnumValues = 'map' | 'viewport';
|
|
140
147
|
enum LineCapEnum {
|
|
141
148
|
/** A cap with a squared-off end which is drawn to the exact endpoint of the line. */
|
|
142
149
|
Butt = 'butt',
|
|
@@ -145,6 +152,7 @@ enum LineCapEnum {
|
|
|
145
152
|
/** A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width. */
|
|
146
153
|
Square = 'square',
|
|
147
154
|
}
|
|
155
|
+
type LineCapEnumValues = 'butt' | 'round' | 'square';
|
|
148
156
|
enum LineJoinEnum {
|
|
149
157
|
/** A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width. */
|
|
150
158
|
Bevel = 'bevel',
|
|
@@ -153,12 +161,14 @@ enum LineJoinEnum {
|
|
|
153
161
|
/** A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet. */
|
|
154
162
|
Miter = 'miter',
|
|
155
163
|
}
|
|
164
|
+
type LineJoinEnumValues = 'bevel' | 'round' | 'miter';
|
|
156
165
|
enum LineTranslateAnchorEnum {
|
|
157
166
|
/** The line is translated relative to the map. */
|
|
158
167
|
Map = 'map',
|
|
159
168
|
/** The line is translated relative to the viewport. */
|
|
160
169
|
Viewport = 'viewport',
|
|
161
170
|
}
|
|
171
|
+
type LineTranslateAnchorEnumValues = 'map' | 'viewport';
|
|
162
172
|
enum SymbolPlacementEnum {
|
|
163
173
|
/** The label is placed at the point where the geometry is located. */
|
|
164
174
|
Point = 'point',
|
|
@@ -167,6 +177,7 @@ enum SymbolPlacementEnum {
|
|
|
167
177
|
/** The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries. */
|
|
168
178
|
LineCenter = 'line-center',
|
|
169
179
|
}
|
|
180
|
+
type SymbolPlacementEnumValues = 'point' | 'line' | 'line-center';
|
|
170
181
|
enum SymbolZOrderEnum {
|
|
171
182
|
/** Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`. */
|
|
172
183
|
Auto = 'auto',
|
|
@@ -175,6 +186,7 @@ enum SymbolZOrderEnum {
|
|
|
175
186
|
/** Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data. */
|
|
176
187
|
Source = 'source',
|
|
177
188
|
}
|
|
189
|
+
type SymbolZOrderEnumValues = 'auto' | 'viewport-y' | 'source';
|
|
178
190
|
enum IconRotationAlignmentEnum {
|
|
179
191
|
/** When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line. */
|
|
180
192
|
Map = 'map',
|
|
@@ -183,6 +195,7 @@ enum IconRotationAlignmentEnum {
|
|
|
183
195
|
/** When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`. */
|
|
184
196
|
Auto = 'auto',
|
|
185
197
|
}
|
|
198
|
+
type IconRotationAlignmentEnumValues = 'map' | 'viewport' | 'auto';
|
|
186
199
|
enum IconTextFitEnum {
|
|
187
200
|
/** The icon is displayed at its intrinsic aspect ratio. */
|
|
188
201
|
None = 'none',
|
|
@@ -193,6 +206,7 @@ enum IconTextFitEnum {
|
|
|
193
206
|
/** The icon is scaled in both x- and y-dimensions. */
|
|
194
207
|
Both = 'both',
|
|
195
208
|
}
|
|
209
|
+
type IconTextFitEnumValues = 'none' | 'width' | 'height' | 'both';
|
|
196
210
|
enum IconAnchorEnum {
|
|
197
211
|
/** The center of the icon is placed closest to the anchor. */
|
|
198
212
|
Center = 'center',
|
|
@@ -213,6 +227,16 @@ enum IconAnchorEnum {
|
|
|
213
227
|
/** The bottom right corner of the icon is placed closest to the anchor. */
|
|
214
228
|
BottomRight = 'bottom-right',
|
|
215
229
|
}
|
|
230
|
+
type IconAnchorEnumValues =
|
|
231
|
+
| 'center'
|
|
232
|
+
| 'left'
|
|
233
|
+
| 'right'
|
|
234
|
+
| 'top'
|
|
235
|
+
| 'bottom'
|
|
236
|
+
| 'top-left'
|
|
237
|
+
| 'top-right'
|
|
238
|
+
| 'bottom-left'
|
|
239
|
+
| 'bottom-right';
|
|
216
240
|
enum IconPitchAlignmentEnum {
|
|
217
241
|
/** The icon is aligned to the plane of the map. */
|
|
218
242
|
Map = 'map',
|
|
@@ -221,6 +245,7 @@ enum IconPitchAlignmentEnum {
|
|
|
221
245
|
/** Automatically matches the value of `icon-rotation-alignment`. */
|
|
222
246
|
Auto = 'auto',
|
|
223
247
|
}
|
|
248
|
+
type IconPitchAlignmentEnumValues = 'map' | 'viewport' | 'auto';
|
|
224
249
|
enum TextPitchAlignmentEnum {
|
|
225
250
|
/** The text is aligned to the plane of the map. */
|
|
226
251
|
Map = 'map',
|
|
@@ -229,6 +254,7 @@ enum TextPitchAlignmentEnum {
|
|
|
229
254
|
/** Automatically matches the value of `text-rotation-alignment`. */
|
|
230
255
|
Auto = 'auto',
|
|
231
256
|
}
|
|
257
|
+
type TextPitchAlignmentEnumValues = 'map' | 'viewport' | 'auto';
|
|
232
258
|
enum TextRotationAlignmentEnum {
|
|
233
259
|
/** When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line. */
|
|
234
260
|
Map = 'map',
|
|
@@ -237,6 +263,7 @@ enum TextRotationAlignmentEnum {
|
|
|
237
263
|
/** When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`. */
|
|
238
264
|
Auto = 'auto',
|
|
239
265
|
}
|
|
266
|
+
type TextRotationAlignmentEnumValues = 'map' | 'viewport' | 'auto';
|
|
240
267
|
enum TextJustifyEnum {
|
|
241
268
|
/** The text is aligned towards the anchor position. */
|
|
242
269
|
Auto = 'auto',
|
|
@@ -247,6 +274,7 @@ enum TextJustifyEnum {
|
|
|
247
274
|
/** The text is aligned to the right. */
|
|
248
275
|
Right = 'right',
|
|
249
276
|
}
|
|
277
|
+
type TextJustifyEnumValues = 'auto' | 'left' | 'center' | 'right';
|
|
250
278
|
enum TextVariableAnchorEnum {
|
|
251
279
|
/** The center of the text is placed closest to the anchor. */
|
|
252
280
|
Center = 'center',
|
|
@@ -267,6 +295,16 @@ enum TextVariableAnchorEnum {
|
|
|
267
295
|
/** The bottom right corner of the text is placed closest to the anchor. */
|
|
268
296
|
BottomRight = 'bottom-right',
|
|
269
297
|
}
|
|
298
|
+
type TextVariableAnchorEnumValues =
|
|
299
|
+
| 'center'
|
|
300
|
+
| 'left'
|
|
301
|
+
| 'right'
|
|
302
|
+
| 'top'
|
|
303
|
+
| 'bottom'
|
|
304
|
+
| 'top-left'
|
|
305
|
+
| 'top-right'
|
|
306
|
+
| 'bottom-left'
|
|
307
|
+
| 'bottom-right';
|
|
270
308
|
enum TextAnchorEnum {
|
|
271
309
|
/** The center of the text is placed closest to the anchor. */
|
|
272
310
|
Center = 'center',
|
|
@@ -287,12 +325,23 @@ enum TextAnchorEnum {
|
|
|
287
325
|
/** The bottom right corner of the text is placed closest to the anchor. */
|
|
288
326
|
BottomRight = 'bottom-right',
|
|
289
327
|
}
|
|
328
|
+
type TextAnchorEnumValues =
|
|
329
|
+
| 'center'
|
|
330
|
+
| 'left'
|
|
331
|
+
| 'right'
|
|
332
|
+
| 'top'
|
|
333
|
+
| 'bottom'
|
|
334
|
+
| 'top-left'
|
|
335
|
+
| 'top-right'
|
|
336
|
+
| 'bottom-left'
|
|
337
|
+
| 'bottom-right';
|
|
290
338
|
enum TextWritingModeEnum {
|
|
291
339
|
/** If a text's language supports horizontal writing mode, symbols would be laid out horizontally. */
|
|
292
340
|
Horizontal = 'horizontal',
|
|
293
341
|
/** If a text's language supports vertical writing mode, symbols would be laid out vertically. */
|
|
294
342
|
Vertical = 'vertical',
|
|
295
343
|
}
|
|
344
|
+
type TextWritingModeEnumValues = 'horizontal' | 'vertical';
|
|
296
345
|
enum TextTransformEnum {
|
|
297
346
|
/** The text is not altered. */
|
|
298
347
|
None = 'none',
|
|
@@ -301,68 +350,79 @@ enum TextTransformEnum {
|
|
|
301
350
|
/** Forces all letters to be displayed in lowercase. */
|
|
302
351
|
Lowercase = 'lowercase',
|
|
303
352
|
}
|
|
353
|
+
type TextTransformEnumValues = 'none' | 'uppercase' | 'lowercase';
|
|
304
354
|
enum IconTranslateAnchorEnum {
|
|
305
355
|
/** Icons are translated relative to the map. */
|
|
306
356
|
Map = 'map',
|
|
307
357
|
/** Icons are translated relative to the viewport. */
|
|
308
358
|
Viewport = 'viewport',
|
|
309
359
|
}
|
|
360
|
+
type IconTranslateAnchorEnumValues = 'map' | 'viewport';
|
|
310
361
|
enum TextTranslateAnchorEnum {
|
|
311
362
|
/** The text is translated relative to the map. */
|
|
312
363
|
Map = 'map',
|
|
313
364
|
/** The text is translated relative to the viewport. */
|
|
314
365
|
Viewport = 'viewport',
|
|
315
366
|
}
|
|
367
|
+
type TextTranslateAnchorEnumValues = 'map' | 'viewport';
|
|
316
368
|
enum CircleTranslateAnchorEnum {
|
|
317
369
|
/** The circle is translated relative to the map. */
|
|
318
370
|
Map = 'map',
|
|
319
371
|
/** The circle is translated relative to the viewport. */
|
|
320
372
|
Viewport = 'viewport',
|
|
321
373
|
}
|
|
374
|
+
type CircleTranslateAnchorEnumValues = 'map' | 'viewport';
|
|
322
375
|
enum CirclePitchScaleEnum {
|
|
323
376
|
/** Circles are scaled according to their apparent distance to the camera. */
|
|
324
377
|
Map = 'map',
|
|
325
378
|
/** Circles are not scaled. */
|
|
326
379
|
Viewport = 'viewport',
|
|
327
380
|
}
|
|
381
|
+
type CirclePitchScaleEnumValues = 'map' | 'viewport';
|
|
328
382
|
enum CirclePitchAlignmentEnum {
|
|
329
383
|
/** The circle is aligned to the plane of the map. */
|
|
330
384
|
Map = 'map',
|
|
331
385
|
/** The circle is aligned to the plane of the viewport. */
|
|
332
386
|
Viewport = 'viewport',
|
|
333
387
|
}
|
|
388
|
+
type CirclePitchAlignmentEnumValues = 'map' | 'viewport';
|
|
334
389
|
enum FillExtrusionTranslateAnchorEnum {
|
|
335
390
|
/** The fill extrusion is translated relative to the map. */
|
|
336
391
|
Map = 'map',
|
|
337
392
|
/** The fill extrusion is translated relative to the viewport. */
|
|
338
393
|
Viewport = 'viewport',
|
|
339
394
|
}
|
|
395
|
+
type FillExtrusionTranslateAnchorEnumValues = 'map' | 'viewport';
|
|
340
396
|
enum RasterResamplingEnum {
|
|
341
397
|
/** (Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled */
|
|
342
398
|
Linear = 'linear',
|
|
343
399
|
/** Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled */
|
|
344
400
|
Nearest = 'nearest',
|
|
345
401
|
}
|
|
402
|
+
type RasterResamplingEnumValues = 'linear' | 'nearest';
|
|
346
403
|
enum HillshadeIlluminationAnchorEnum {
|
|
347
404
|
/** The hillshade illumination is relative to the north direction. */
|
|
348
405
|
Map = 'map',
|
|
349
406
|
/** The hillshade illumination is relative to the top of the viewport. */
|
|
350
407
|
Viewport = 'viewport',
|
|
351
408
|
}
|
|
409
|
+
type HillshadeIlluminationAnchorEnumValues = 'map' | 'viewport';
|
|
352
410
|
enum SkyTypeEnum {
|
|
353
411
|
/** Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`. */
|
|
354
412
|
Gradient = 'gradient',
|
|
355
413
|
/** Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`. */
|
|
356
414
|
Atmosphere = 'atmosphere',
|
|
357
415
|
}
|
|
416
|
+
type SkyTypeEnumValues = 'gradient' | 'atmosphere';
|
|
358
417
|
enum AnchorEnum {
|
|
359
418
|
/** The position of the light source is aligned to the rotation of the map. */
|
|
360
419
|
Map = 'map',
|
|
361
420
|
/** The position of the light source is aligned to the rotation of the viewport. */
|
|
362
421
|
Viewport = 'viewport',
|
|
363
422
|
}
|
|
423
|
+
type AnchorEnumValues = 'map' | 'viewport';
|
|
364
424
|
|
|
365
|
-
type Enum<EnumType> = EnumType |
|
|
425
|
+
type Enum<EnumType, EnumValues> = EnumType | EnumValues;
|
|
366
426
|
|
|
367
427
|
export interface FillLayerStyleProps {
|
|
368
428
|
/**
|
|
@@ -372,11 +432,11 @@ export interface FillLayerStyleProps {
|
|
|
372
432
|
/**
|
|
373
433
|
* Whether this layer is displayed.
|
|
374
434
|
*/
|
|
375
|
-
visibility?: Enum<VisibilityEnum>;
|
|
435
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
376
436
|
/**
|
|
377
437
|
* Whether or not the fill should be antialiased.
|
|
378
438
|
*/
|
|
379
|
-
fillAntialias?: Value<
|
|
439
|
+
fillAntialias?: Value<boolean, ['zoom']>;
|
|
380
440
|
/**
|
|
381
441
|
* The opacity of the entire fill layer. In contrast to the `fillColor`, this value will also affect the 1px stroke around the fill, if the stroke is used.
|
|
382
442
|
*/
|
|
@@ -426,7 +486,7 @@ export interface FillLayerStyleProps {
|
|
|
426
486
|
/**
|
|
427
487
|
* Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
|
|
428
488
|
*/
|
|
429
|
-
fillPattern?:
|
|
489
|
+
fillPattern?: Value<ResolvedImageType, ['zoom', 'feature']>;
|
|
430
490
|
|
|
431
491
|
/**
|
|
432
492
|
* The transition affecting any changes to this layer’s fillPattern property.
|
|
@@ -437,11 +497,11 @@ export interface LineLayerStyleProps {
|
|
|
437
497
|
/**
|
|
438
498
|
* The display of line endings.
|
|
439
499
|
*/
|
|
440
|
-
lineCap?: Value<Enum<LineCapEnum>, ['zoom', 'feature']>;
|
|
500
|
+
lineCap?: Value<Enum<LineCapEnum, LineCapEnumValues>, ['zoom', 'feature']>;
|
|
441
501
|
/**
|
|
442
502
|
* The display of lines when joining.
|
|
443
503
|
*/
|
|
444
|
-
lineJoin?: Value<Enum<LineJoinEnum>, ['zoom', 'feature']>;
|
|
504
|
+
lineJoin?: Value<Enum<LineJoinEnum, LineJoinEnumValues>, ['zoom', 'feature']>;
|
|
445
505
|
/**
|
|
446
506
|
* Used to automatically convert miter joins to bevel joins for sharp angles.
|
|
447
507
|
*/
|
|
@@ -457,7 +517,7 @@ export interface LineLayerStyleProps {
|
|
|
457
517
|
/**
|
|
458
518
|
* Whether this layer is displayed.
|
|
459
519
|
*/
|
|
460
|
-
visibility?: Enum<VisibilityEnum>;
|
|
520
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
461
521
|
/**
|
|
462
522
|
* The opacity at which the line will be drawn.
|
|
463
523
|
*/
|
|
@@ -543,7 +603,7 @@ export interface LineLayerStyleProps {
|
|
|
543
603
|
/**
|
|
544
604
|
* Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
|
|
545
605
|
*/
|
|
546
|
-
linePattern?:
|
|
606
|
+
linePattern?: Value<ResolvedImageType, ['zoom', 'feature']>;
|
|
547
607
|
|
|
548
608
|
/**
|
|
549
609
|
* The transition affecting any changes to this layer’s linePattern property.
|
|
@@ -564,7 +624,10 @@ export interface SymbolLayerStyleProps {
|
|
|
564
624
|
/**
|
|
565
625
|
* Label placement relative to its geometry.
|
|
566
626
|
*/
|
|
567
|
-
symbolPlacement?: Value<
|
|
627
|
+
symbolPlacement?: Value<
|
|
628
|
+
Enum<SymbolPlacementEnum, SymbolPlacementEnumValues>,
|
|
629
|
+
['zoom']
|
|
630
|
+
>;
|
|
568
631
|
/**
|
|
569
632
|
* Distance between two symbol anchors.
|
|
570
633
|
*/
|
|
@@ -572,7 +635,7 @@ export interface SymbolLayerStyleProps {
|
|
|
572
635
|
/**
|
|
573
636
|
* If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.
|
|
574
637
|
*/
|
|
575
|
-
symbolAvoidEdges?: Value<
|
|
638
|
+
symbolAvoidEdges?: Value<boolean, ['zoom']>;
|
|
576
639
|
/**
|
|
577
640
|
* Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `iconAllowOverlap` or `textAllowOverlap` is `false`, features with a lower sort key will have priority during placement. When `iconAllowOverlap` or `textAllowOverlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.
|
|
578
641
|
*/
|
|
@@ -580,31 +643,37 @@ export interface SymbolLayerStyleProps {
|
|
|
580
643
|
/**
|
|
581
644
|
* Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their yPosition relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbolSortKey`.
|
|
582
645
|
*/
|
|
583
|
-
symbolZOrder?: Value<
|
|
646
|
+
symbolZOrder?: Value<
|
|
647
|
+
Enum<SymbolZOrderEnum, SymbolZOrderEnumValues>,
|
|
648
|
+
['zoom']
|
|
649
|
+
>;
|
|
584
650
|
/**
|
|
585
651
|
* If true, the icon will be visible even if it collides with other previously drawn symbols.
|
|
586
652
|
*
|
|
587
653
|
* @requires iconImage
|
|
588
654
|
*/
|
|
589
|
-
iconAllowOverlap?: Value<
|
|
655
|
+
iconAllowOverlap?: Value<boolean, ['zoom']>;
|
|
590
656
|
/**
|
|
591
657
|
* If true, other symbols can be visible even if they collide with the icon.
|
|
592
658
|
*
|
|
593
659
|
* @requires iconImage
|
|
594
660
|
*/
|
|
595
|
-
iconIgnorePlacement?: Value<
|
|
661
|
+
iconIgnorePlacement?: Value<boolean, ['zoom']>;
|
|
596
662
|
/**
|
|
597
663
|
* If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.
|
|
598
664
|
*
|
|
599
665
|
* @requires iconImage, textField
|
|
600
666
|
*/
|
|
601
|
-
iconOptional?: Value<
|
|
667
|
+
iconOptional?: Value<boolean, ['zoom']>;
|
|
602
668
|
/**
|
|
603
669
|
* In combination with `symbolPlacement`, determines the rotation behavior of icons.
|
|
604
670
|
*
|
|
605
671
|
* @requires iconImage
|
|
606
672
|
*/
|
|
607
|
-
iconRotationAlignment?: Value<
|
|
673
|
+
iconRotationAlignment?: Value<
|
|
674
|
+
Enum<IconRotationAlignmentEnum, IconRotationAlignmentEnumValues>,
|
|
675
|
+
['zoom']
|
|
676
|
+
>;
|
|
608
677
|
/**
|
|
609
678
|
* Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `iconSize`. 1 is the original size; 3 triples the size of the image.
|
|
610
679
|
*
|
|
@@ -616,7 +685,7 @@ export interface SymbolLayerStyleProps {
|
|
|
616
685
|
*
|
|
617
686
|
* @requires iconImage, textField
|
|
618
687
|
*/
|
|
619
|
-
iconTextFit?: Value<Enum<IconTextFitEnum>, ['zoom']>;
|
|
688
|
+
iconTextFit?: Value<Enum<IconTextFitEnum, IconTextFitEnumValues>, ['zoom']>;
|
|
620
689
|
/**
|
|
621
690
|
* Size of the additional area added to dimensions determined by `iconTextFit`, in clockwise order: top, right, bottom, left.
|
|
622
691
|
*
|
|
@@ -626,8 +695,7 @@ export interface SymbolLayerStyleProps {
|
|
|
626
695
|
/**
|
|
627
696
|
* Name of image in sprite to use for drawing an image background.
|
|
628
697
|
*/
|
|
629
|
-
iconImage?:
|
|
630
|
-
|
|
698
|
+
iconImage?: Value<ResolvedImageType, ['zoom', 'feature']>;
|
|
631
699
|
/**
|
|
632
700
|
* Rotates the icon clockwise.
|
|
633
701
|
*
|
|
@@ -645,7 +713,7 @@ export interface SymbolLayerStyleProps {
|
|
|
645
713
|
*
|
|
646
714
|
* @requires iconImage
|
|
647
715
|
*/
|
|
648
|
-
iconKeepUpright?: Value<
|
|
716
|
+
iconKeepUpright?: Value<boolean, ['zoom']>;
|
|
649
717
|
/**
|
|
650
718
|
* Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `iconSize` to obtain the final offset in pixels. When combined with `iconRotate` the offset will be as if the rotated direction was up.
|
|
651
719
|
*
|
|
@@ -657,29 +725,41 @@ export interface SymbolLayerStyleProps {
|
|
|
657
725
|
*
|
|
658
726
|
* @requires iconImage
|
|
659
727
|
*/
|
|
660
|
-
iconAnchor?: Value<
|
|
728
|
+
iconAnchor?: Value<
|
|
729
|
+
Enum<IconAnchorEnum, IconAnchorEnumValues>,
|
|
730
|
+
['zoom', 'feature']
|
|
731
|
+
>;
|
|
661
732
|
/**
|
|
662
733
|
* Orientation of icon when map is pitched.
|
|
663
734
|
*
|
|
664
735
|
* @requires iconImage
|
|
665
736
|
*/
|
|
666
|
-
iconPitchAlignment?: Value<
|
|
737
|
+
iconPitchAlignment?: Value<
|
|
738
|
+
Enum<IconPitchAlignmentEnum, IconPitchAlignmentEnumValues>,
|
|
739
|
+
['zoom']
|
|
740
|
+
>;
|
|
667
741
|
/**
|
|
668
742
|
* Orientation of text when map is pitched.
|
|
669
743
|
*
|
|
670
744
|
* @requires textField
|
|
671
745
|
*/
|
|
672
|
-
textPitchAlignment?: Value<
|
|
746
|
+
textPitchAlignment?: Value<
|
|
747
|
+
Enum<TextPitchAlignmentEnum, TextPitchAlignmentEnumValues>,
|
|
748
|
+
['zoom']
|
|
749
|
+
>;
|
|
673
750
|
/**
|
|
674
751
|
* In combination with `symbolPlacement`, determines the rotation behavior of the individual glyphs forming the text.
|
|
675
752
|
*
|
|
676
753
|
* @requires textField
|
|
677
754
|
*/
|
|
678
|
-
textRotationAlignment?: Value<
|
|
755
|
+
textRotationAlignment?: Value<
|
|
756
|
+
Enum<TextRotationAlignmentEnum, TextRotationAlignmentEnumValues>,
|
|
757
|
+
['zoom']
|
|
758
|
+
>;
|
|
679
759
|
/**
|
|
680
760
|
* Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options. SDF images are not supported in formatted text and will be ignored.
|
|
681
761
|
*/
|
|
682
|
-
textField?: Value<
|
|
762
|
+
textField?: Value<FormattedString, ['zoom', 'feature']>;
|
|
683
763
|
/**
|
|
684
764
|
* Font stack to use for displaying text.
|
|
685
765
|
*
|
|
@@ -715,7 +795,10 @@ export interface SymbolLayerStyleProps {
|
|
|
715
795
|
*
|
|
716
796
|
* @requires textField
|
|
717
797
|
*/
|
|
718
|
-
textJustify?: Value<
|
|
798
|
+
textJustify?: Value<
|
|
799
|
+
Enum<TextJustifyEnum, TextJustifyEnumValues>,
|
|
800
|
+
['zoom', 'feature']
|
|
801
|
+
>;
|
|
719
802
|
/**
|
|
720
803
|
* Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `textVariableAnchor`, which defaults to using the twoDimensional `textOffset` if present.
|
|
721
804
|
*
|
|
@@ -727,7 +810,10 @@ export interface SymbolLayerStyleProps {
|
|
|
727
810
|
*
|
|
728
811
|
* @requires textField
|
|
729
812
|
*/
|
|
730
|
-
textVariableAnchor?: Value<
|
|
813
|
+
textVariableAnchor?: Value<
|
|
814
|
+
Enum<TextVariableAnchorEnum, TextVariableAnchorEnumValues>[],
|
|
815
|
+
['zoom']
|
|
816
|
+
>;
|
|
731
817
|
/**
|
|
732
818
|
* Part of the text placed closest to the anchor.
|
|
733
819
|
*
|
|
@@ -735,7 +821,10 @@ export interface SymbolLayerStyleProps {
|
|
|
735
821
|
*
|
|
736
822
|
* @disabledBy textVariableAnchor
|
|
737
823
|
*/
|
|
738
|
-
textAnchor?: Value<
|
|
824
|
+
textAnchor?: Value<
|
|
825
|
+
Enum<TextAnchorEnum, TextAnchorEnumValues>,
|
|
826
|
+
['zoom', 'feature']
|
|
827
|
+
>;
|
|
739
828
|
/**
|
|
740
829
|
* Maximum angle change between adjacent characters.
|
|
741
830
|
*
|
|
@@ -747,7 +836,10 @@ export interface SymbolLayerStyleProps {
|
|
|
747
836
|
*
|
|
748
837
|
* @requires textField
|
|
749
838
|
*/
|
|
750
|
-
textWritingMode?: Value<
|
|
839
|
+
textWritingMode?: Value<
|
|
840
|
+
Enum<TextWritingModeEnum, TextWritingModeEnumValues>[],
|
|
841
|
+
['zoom']
|
|
842
|
+
>;
|
|
751
843
|
/**
|
|
752
844
|
* Rotates the text clockwise.
|
|
753
845
|
*
|
|
@@ -765,13 +857,16 @@ export interface SymbolLayerStyleProps {
|
|
|
765
857
|
*
|
|
766
858
|
* @requires textField
|
|
767
859
|
*/
|
|
768
|
-
textKeepUpright?: Value<
|
|
860
|
+
textKeepUpright?: Value<boolean, ['zoom']>;
|
|
769
861
|
/**
|
|
770
862
|
* Specifies how to capitalize text, similar to the CSS `textTransform` property.
|
|
771
863
|
*
|
|
772
864
|
* @requires textField
|
|
773
865
|
*/
|
|
774
|
-
textTransform?: Value<
|
|
866
|
+
textTransform?: Value<
|
|
867
|
+
Enum<TextTransformEnum, TextTransformEnumValues>,
|
|
868
|
+
['zoom', 'feature']
|
|
869
|
+
>;
|
|
775
870
|
/**
|
|
776
871
|
* Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with textVariableAnchor, input values will be taken as absolute values. Offsets along the x and yAxis will be applied automatically based on the anchor position.
|
|
777
872
|
*
|
|
@@ -785,23 +880,23 @@ export interface SymbolLayerStyleProps {
|
|
|
785
880
|
*
|
|
786
881
|
* @requires textField
|
|
787
882
|
*/
|
|
788
|
-
textAllowOverlap?: Value<
|
|
883
|
+
textAllowOverlap?: Value<boolean, ['zoom']>;
|
|
789
884
|
/**
|
|
790
885
|
* If true, other symbols can be visible even if they collide with the text.
|
|
791
886
|
*
|
|
792
887
|
* @requires textField
|
|
793
888
|
*/
|
|
794
|
-
textIgnorePlacement?: Value<
|
|
889
|
+
textIgnorePlacement?: Value<boolean, ['zoom']>;
|
|
795
890
|
/**
|
|
796
891
|
* If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
|
|
797
892
|
*
|
|
798
893
|
* @requires textField, iconImage
|
|
799
894
|
*/
|
|
800
|
-
textOptional?: Value<
|
|
895
|
+
textOptional?: Value<boolean, ['zoom']>;
|
|
801
896
|
/**
|
|
802
897
|
* Whether this layer is displayed.
|
|
803
898
|
*/
|
|
804
|
-
visibility?: Enum<VisibilityEnum>;
|
|
899
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
805
900
|
/**
|
|
806
901
|
* The opacity at which the icon will be drawn.
|
|
807
902
|
*
|
|
@@ -955,7 +1050,7 @@ export interface CircleLayerStyleProps {
|
|
|
955
1050
|
/**
|
|
956
1051
|
* Whether this layer is displayed.
|
|
957
1052
|
*/
|
|
958
|
-
visibility?: Enum<VisibilityEnum>;
|
|
1053
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
959
1054
|
/**
|
|
960
1055
|
* Circle radius.
|
|
961
1056
|
*/
|
|
@@ -1010,11 +1105,17 @@ export interface CircleLayerStyleProps {
|
|
|
1010
1105
|
/**
|
|
1011
1106
|
* Controls the scaling behavior of the circle when the map is pitched.
|
|
1012
1107
|
*/
|
|
1013
|
-
circlePitchScale?: Value<
|
|
1108
|
+
circlePitchScale?: Value<
|
|
1109
|
+
Enum<CirclePitchScaleEnum, CirclePitchScaleEnumValues>,
|
|
1110
|
+
['zoom']
|
|
1111
|
+
>;
|
|
1014
1112
|
/**
|
|
1015
1113
|
* Orientation of circle when map is pitched.
|
|
1016
1114
|
*/
|
|
1017
|
-
circlePitchAlignment?: Value<
|
|
1115
|
+
circlePitchAlignment?: Value<
|
|
1116
|
+
Enum<CirclePitchAlignmentEnum, CirclePitchAlignmentEnumValues>,
|
|
1117
|
+
['zoom']
|
|
1118
|
+
>;
|
|
1018
1119
|
/**
|
|
1019
1120
|
* The width of the circle's stroke. Strokes are placed outside of the `circleRadius`.
|
|
1020
1121
|
*/
|
|
@@ -1047,7 +1148,7 @@ export interface HeatmapLayerStyleProps {
|
|
|
1047
1148
|
/**
|
|
1048
1149
|
* Whether this layer is displayed.
|
|
1049
1150
|
*/
|
|
1050
|
-
visibility?: Enum<VisibilityEnum>;
|
|
1151
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
1051
1152
|
/**
|
|
1052
1153
|
* Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius.
|
|
1053
1154
|
*/
|
|
@@ -1088,7 +1189,7 @@ export interface FillExtrusionLayerStyleProps {
|
|
|
1088
1189
|
/**
|
|
1089
1190
|
* Whether this layer is displayed.
|
|
1090
1191
|
*/
|
|
1091
|
-
visibility?: Enum<VisibilityEnum>;
|
|
1192
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
1092
1193
|
/**
|
|
1093
1194
|
* The opacity of the entire fill extrusion layer. This is rendered on a perLayer, not perFeature, basis, and dataDriven styling is not available.
|
|
1094
1195
|
*/
|
|
@@ -1127,7 +1228,7 @@ export interface FillExtrusionLayerStyleProps {
|
|
|
1127
1228
|
/**
|
|
1128
1229
|
* Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
|
|
1129
1230
|
*/
|
|
1130
|
-
fillExtrusionPattern?:
|
|
1231
|
+
fillExtrusionPattern?: Value<ResolvedImageType, ['zoom', 'feature']>;
|
|
1131
1232
|
|
|
1132
1233
|
/**
|
|
1133
1234
|
* The transition affecting any changes to this layer’s fillExtrusionPattern property.
|
|
@@ -1156,7 +1257,7 @@ export interface FillExtrusionLayerStyleProps {
|
|
|
1156
1257
|
/**
|
|
1157
1258
|
* Whether to apply a vertical gradient to the sides of a fillExtrusion layer. If true, sides will be shaded slightly darker farther down.
|
|
1158
1259
|
*/
|
|
1159
|
-
fillExtrusionVerticalGradient?: Value<
|
|
1260
|
+
fillExtrusionVerticalGradient?: Value<boolean, ['zoom']>;
|
|
1160
1261
|
/**
|
|
1161
1262
|
* Controls the intensity of ambient occlusion (AO) shading. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.
|
|
1162
1263
|
*/
|
|
@@ -1180,7 +1281,7 @@ export interface RasterLayerStyleProps {
|
|
|
1180
1281
|
/**
|
|
1181
1282
|
* Whether this layer is displayed.
|
|
1182
1283
|
*/
|
|
1183
|
-
visibility?: Enum<VisibilityEnum>;
|
|
1284
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
1184
1285
|
/**
|
|
1185
1286
|
* The opacity at which the image will be drawn.
|
|
1186
1287
|
*/
|
|
@@ -1238,7 +1339,10 @@ export interface RasterLayerStyleProps {
|
|
|
1238
1339
|
/**
|
|
1239
1340
|
* The resampling/interpolation method to use for overscaling, also known as texture magnification filter
|
|
1240
1341
|
*/
|
|
1241
|
-
rasterResampling?: Value<
|
|
1342
|
+
rasterResampling?: Value<
|
|
1343
|
+
Enum<RasterResamplingEnum, RasterResamplingEnumValues>,
|
|
1344
|
+
['zoom']
|
|
1345
|
+
>;
|
|
1242
1346
|
/**
|
|
1243
1347
|
* Fade duration when a new tile is added.
|
|
1244
1348
|
*/
|
|
@@ -1248,7 +1352,7 @@ export interface HillshadeLayerStyleProps {
|
|
|
1248
1352
|
/**
|
|
1249
1353
|
* Whether this layer is displayed.
|
|
1250
1354
|
*/
|
|
1251
|
-
visibility?: Enum<VisibilityEnum>;
|
|
1355
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
1252
1356
|
/**
|
|
1253
1357
|
* The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshadeIlluminationAnchor` is set to `viewport` and due north if `hillshadeIlluminationAnchor` is set to `map`.
|
|
1254
1358
|
*/
|
|
@@ -1257,7 +1361,10 @@ export interface HillshadeLayerStyleProps {
|
|
|
1257
1361
|
* Direction of light source when map is rotated.
|
|
1258
1362
|
*/
|
|
1259
1363
|
hillshadeIlluminationAnchor?: Value<
|
|
1260
|
-
Enum<
|
|
1364
|
+
Enum<
|
|
1365
|
+
HillshadeIlluminationAnchorEnum,
|
|
1366
|
+
HillshadeIlluminationAnchorEnumValues
|
|
1367
|
+
>,
|
|
1261
1368
|
['zoom']
|
|
1262
1369
|
>;
|
|
1263
1370
|
/**
|
|
@@ -1301,7 +1408,7 @@ export interface BackgroundLayerStyleProps {
|
|
|
1301
1408
|
/**
|
|
1302
1409
|
* Whether this layer is displayed.
|
|
1303
1410
|
*/
|
|
1304
|
-
visibility?: Enum<VisibilityEnum>;
|
|
1411
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
1305
1412
|
/**
|
|
1306
1413
|
* The color with which the background will be drawn.
|
|
1307
1414
|
*
|
|
@@ -1316,7 +1423,7 @@ export interface BackgroundLayerStyleProps {
|
|
|
1316
1423
|
/**
|
|
1317
1424
|
* Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
|
|
1318
1425
|
*/
|
|
1319
|
-
backgroundPattern?:
|
|
1426
|
+
backgroundPattern?: Value<ResolvedImageType, ['zoom']>;
|
|
1320
1427
|
|
|
1321
1428
|
/**
|
|
1322
1429
|
* The transition affecting any changes to this layer’s backgroundPattern property.
|
|
@@ -1336,11 +1443,11 @@ export interface SkyLayerStyleProps {
|
|
|
1336
1443
|
/**
|
|
1337
1444
|
* Whether this layer is displayed.
|
|
1338
1445
|
*/
|
|
1339
|
-
visibility?: Enum<VisibilityEnum>;
|
|
1446
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
1340
1447
|
/**
|
|
1341
1448
|
* The type of the sky
|
|
1342
1449
|
*/
|
|
1343
|
-
skyType?: Value<Enum<SkyTypeEnum>, ['zoom']>;
|
|
1450
|
+
skyType?: Value<Enum<SkyTypeEnum, SkyTypeEnumValues>, ['zoom']>;
|
|
1344
1451
|
/**
|
|
1345
1452
|
* Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.
|
|
1346
1453
|
*/
|
|
@@ -1383,7 +1490,7 @@ export interface LightLayerStyleProps {
|
|
|
1383
1490
|
/**
|
|
1384
1491
|
* Whether extruded geometries are lit relative to the map or viewport.
|
|
1385
1492
|
*/
|
|
1386
|
-
anchor?: Value<Enum<AnchorEnum>, ['zoom']>;
|
|
1493
|
+
anchor?: Value<Enum<AnchorEnum, AnchorEnumValues>, ['zoom']>;
|
|
1387
1494
|
/**
|
|
1388
1495
|
* Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).
|
|
1389
1496
|
*/
|
|
@@ -1468,6 +1575,23 @@ export interface AtmosphereLayerStyleProps {
|
|
|
1468
1575
|
*/
|
|
1469
1576
|
starIntensityTransition?: Transition;
|
|
1470
1577
|
}
|
|
1578
|
+
export interface TerrainLayerStyleProps {
|
|
1579
|
+
/**
|
|
1580
|
+
* Name of a source of `raster_dem` type to be used for terrain elevation.
|
|
1581
|
+
*/
|
|
1582
|
+
source?: string;
|
|
1583
|
+
/**
|
|
1584
|
+
* Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.
|
|
1585
|
+
*
|
|
1586
|
+
* @requires source
|
|
1587
|
+
*/
|
|
1588
|
+
exaggeration?: Value<number, ['zoom']>;
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* The transition affecting any changes to this layer’s exaggeration property.
|
|
1592
|
+
*/
|
|
1593
|
+
exaggerationTransition?: Transition;
|
|
1594
|
+
}
|
|
1471
1595
|
|
|
1472
1596
|
export type AllLayerStyleProps =
|
|
1473
1597
|
| FillLayerStyleProps
|
|
@@ -1481,4 +1605,5 @@ export type AllLayerStyleProps =
|
|
|
1481
1605
|
| BackgroundLayerStyleProps
|
|
1482
1606
|
| SkyLayerStyleProps
|
|
1483
1607
|
| LightLayerStyleProps
|
|
1484
|
-
| AtmosphereLayerStyleProps
|
|
1608
|
+
| AtmosphereLayerStyleProps
|
|
1609
|
+
| TerrainLayerStyleProps;
|