@maplibre/maplibre-react-native 9.1.0 → 10.0.0-alpha.2
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 +10 -2
- package/.husky/pre-commit +5 -0
- package/.yarn/plugins/@yarnpkg/plugin-typescript.cjs +9 -0
- package/.yarn/sdks/eslint/bin/eslint.js +20 -0
- package/.yarn/sdks/eslint/lib/api.js +20 -0
- package/.yarn/sdks/eslint/package.json +6 -0
- package/.yarn/sdks/integrations.yml +5 -0
- package/.yarn/sdks/prettier/index.js +20 -0
- package/.yarn/sdks/prettier/package.json +6 -0
- package/.yarn/sdks/typescript/bin/tsc +20 -0
- package/.yarn/sdks/typescript/bin/tsserver +20 -0
- package/.yarn/sdks/typescript/lib/tsc.js +20 -0
- package/.yarn/sdks/typescript/lib/tsserver.js +225 -0
- package/.yarn/sdks/typescript/lib/tsserverlibrary.js +225 -0
- package/.yarn/sdks/typescript/lib/typescript.js +20 -0
- package/.yarn/sdks/typescript/package.json +6 -0
- package/CHANGELOG.md +18 -0
- package/android/rctmgl/build.gradle +7 -7
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/location/LocationManager.java +2 -2
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/modules/RCTMGLOfflineModule.java +21 -26
- package/docs/Annotation.md +8 -9
- package/docs/BackgroundLayer.md +2 -10
- package/docs/Callout.md +5 -5
- package/docs/Camera.md +18 -47
- package/docs/CircleLayer.md +2 -10
- package/docs/FillExtrusionLayer.md +2 -10
- package/docs/FillLayer.md +2 -10
- package/docs/HeatmapLayer.md +2 -10
- package/docs/ImageSource.md +3 -2
- package/docs/Images.md +5 -3
- package/docs/Light.md +1 -1
- package/docs/LineLayer.md +2 -10
- package/docs/MapView.md +53 -37
- package/docs/MarkerView.md +4 -2
- package/docs/NativeUserLocation.md +2 -2
- package/docs/PointAnnotation.md +5 -8
- package/docs/RasterLayer.md +2 -10
- package/docs/RasterSource.md +3 -2
- package/docs/ShapeSource.md +12 -7
- package/docs/Style.md +1 -1
- package/docs/SymbolLayer.md +3 -10
- package/docs/UserLocation.md +8 -10
- package/docs/VectorSource.md +6 -5
- package/docs/coordinates.md +6 -0
- package/docs/docs.json +518 -1272
- package/docs/location.md +6 -0
- package/docs/snapshotManager.md +3 -3
- package/javascript/@types/assets.d.ts +4 -0
- package/javascript/MGLModule.ts +37 -0
- package/javascript/Maplibre.ts +65 -0
- package/javascript/components/AbstractLayer.tsx +107 -0
- package/javascript/components/AbstractSource.tsx +27 -0
- package/javascript/components/BackgroundLayer.tsx +43 -0
- package/javascript/components/{Callout.js → Callout.tsx} +67 -65
- package/javascript/components/{Camera.js → Camera.tsx} +266 -251
- package/javascript/components/CircleLayer.tsx +46 -0
- package/javascript/components/FillExtrusionLayer.tsx +47 -0
- package/javascript/components/FillLayer.tsx +41 -0
- package/javascript/components/{HeadingIndicator.js → HeadingIndicator.tsx} +8 -8
- package/javascript/components/HeatmapLayer.tsx +44 -0
- package/javascript/components/ImageSource.tsx +78 -0
- package/javascript/components/Images.tsx +134 -0
- package/javascript/components/Light.tsx +67 -0
- package/javascript/components/LineLayer.tsx +42 -0
- package/javascript/components/{MapView.js → MapView.tsx} +365 -354
- package/javascript/components/MarkerView.tsx +104 -0
- package/javascript/components/{NativeBridgeComponent.js → NativeBridgeComponent.tsx} +44 -13
- package/javascript/components/NativeUserLocation.tsx +33 -0
- package/javascript/components/PointAnnotation.tsx +221 -0
- package/javascript/components/RasterLayer.tsx +41 -0
- package/javascript/components/RasterSource.tsx +117 -0
- package/javascript/components/ShapeSource.tsx +383 -0
- package/javascript/components/{Style.js → Style.tsx} +129 -38
- package/javascript/components/SymbolLayer.tsx +72 -0
- package/javascript/components/{UserLocation.js → UserLocation.tsx} +111 -110
- package/javascript/components/VectorSource.tsx +207 -0
- package/javascript/components/annotations/Annotation.tsx +134 -0
- package/javascript/index.ts +4 -0
- package/javascript/modules/location/{locationManager.js → locationManager.ts} +71 -10
- package/javascript/modules/offline/{OfflineCreatePackOptions.js → OfflineCreatePackOptions.ts} +20 -4
- package/javascript/modules/offline/{OfflinePack.js → OfflinePack.ts} +23 -7
- package/javascript/modules/offline/{offlineManager.js → offlineManager.ts} +81 -24
- package/javascript/modules/snapshot/{SnapshotOptions.js → SnapshotOptions.ts} +43 -6
- package/javascript/modules/snapshot/{snapshotManager.js → snapshotManager.ts} +5 -5
- package/javascript/requestAndroidLocationPermissions.ts +29 -0
- package/javascript/types/BaseProps.ts +5 -0
- package/javascript/types/OnPressEvent.ts +13 -0
- package/javascript/types/index.ts +7 -0
- package/javascript/utils/BridgeValue.ts +90 -0
- package/javascript/utils/{Logger.js → Logger.ts} +37 -18
- package/javascript/utils/MaplibreStyles.d.ts +1486 -0
- package/javascript/utils/StyleValue.ts +49 -0
- package/javascript/utils/animated/AbstractAnimatedCoordinates.ts +134 -0
- package/javascript/utils/animated/AnimatedCoordinatesArray.ts +112 -0
- package/javascript/utils/animated/{AnimatedExtractCoordinateFromArray.js → AnimatedExtractCoordinateFromArray.ts} +5 -5
- package/javascript/utils/animated/{AnimatedPoint.js → AnimatedPoint.ts} +20 -12
- package/javascript/utils/animated/{AnimatedRouteCoordinatesArray.js → AnimatedRouteCoordinatesArray.ts} +39 -14
- package/javascript/utils/animated/{AnimatedShape.js → AnimatedShape.ts} +31 -10
- package/javascript/utils/{deprecation.js → deprecation.ts} +9 -6
- package/javascript/utils/filterUtils.ts +9 -0
- package/javascript/utils/geoUtils.ts +79 -0
- package/javascript/utils/{index.js → index.ts} +44 -24
- package/javascript/utils/styleMap.ts +264 -0
- package/package.json +35 -27
- package/plugin/build/withMapLibre.js +18 -3
- package/scripts/autogenHelpers/globals.js +1 -1
- package/scripts/autogenerate.js +14 -6
- package/scripts/download-style-spec.sh +1 -1
- package/scripts/templates/MaplibreStyles.ts.ejs +99 -0
- package/scripts/templates/index.d.ts.ejs +71 -42
- package/scripts/templates/{styleMap.js.ejs → styleMap.ts.ejs} +3 -33
- package/setup-jest.js +1 -10
- package/tsconfig.json +20 -61
- package/index.d.ts +0 -955
- package/javascript/components/AbstractLayer.js +0 -75
- package/javascript/components/AbstractSource.js +0 -15
- package/javascript/components/BackgroundLayer.js +0 -97
- package/javascript/components/CircleLayer.js +0 -101
- package/javascript/components/FillExtrusionLayer.js +0 -98
- package/javascript/components/FillLayer.js +0 -94
- package/javascript/components/HeatmapLayer.js +0 -99
- package/javascript/components/ImageSource.js +0 -82
- package/javascript/components/Images.js +0 -119
- package/javascript/components/Light.js +0 -47
- package/javascript/components/LineLayer.js +0 -94
- package/javascript/components/MarkerView.js +0 -87
- package/javascript/components/NativeUserLocation.js +0 -41
- package/javascript/components/PointAnnotation.js +0 -216
- package/javascript/components/RasterLayer.js +0 -95
- package/javascript/components/RasterSource.js +0 -124
- package/javascript/components/ShapeSource.js +0 -372
- package/javascript/components/SymbolLayer.js +0 -120
- package/javascript/components/VectorSource.js +0 -200
- package/javascript/components/annotations/Annotation.js +0 -122
- package/javascript/index.js +0 -149
- package/javascript/utils/BridgeValue.js +0 -81
- package/javascript/utils/animated/AnimatedCoordinatesArray.js +0 -191
- package/javascript/utils/filterUtils.js +0 -7
- package/javascript/utils/geoUtils.js +0 -73
- package/javascript/utils/styleMap.js +0 -1932
- /package/javascript/utils/animated/{Animated.js → Animated.ts} +0 -0
|
@@ -0,0 +1,1486 @@
|
|
|
1
|
+
/* This file was generated from MapboxStyle.ts.ejs do not modify */
|
|
2
|
+
import {type ImageSourcePropType} from 'react-native';
|
|
3
|
+
|
|
4
|
+
export type Translation = {x: number; y: number} | [number, number];
|
|
5
|
+
|
|
6
|
+
export interface Transition {
|
|
7
|
+
duration: number;
|
|
8
|
+
delay: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type FormattedString = string; /* TODO */
|
|
12
|
+
|
|
13
|
+
type ExpressionName =
|
|
14
|
+
// Types
|
|
15
|
+
| 'array'
|
|
16
|
+
| 'boolean'
|
|
17
|
+
| 'collator'
|
|
18
|
+
| 'format'
|
|
19
|
+
| 'image'
|
|
20
|
+
| 'literal'
|
|
21
|
+
| 'number'
|
|
22
|
+
| 'number-format'
|
|
23
|
+
| 'object'
|
|
24
|
+
| 'string'
|
|
25
|
+
| 'to-boolean'
|
|
26
|
+
| 'to-color'
|
|
27
|
+
| 'to-number'
|
|
28
|
+
| 'to-string'
|
|
29
|
+
| 'typeof'
|
|
30
|
+
// Feature data
|
|
31
|
+
| 'accumulated'
|
|
32
|
+
| 'feature-state'
|
|
33
|
+
| 'geometry-type'
|
|
34
|
+
| 'id'
|
|
35
|
+
| 'line-progress'
|
|
36
|
+
| 'properties'
|
|
37
|
+
// Lookup
|
|
38
|
+
| 'at'
|
|
39
|
+
| 'get'
|
|
40
|
+
| 'has'
|
|
41
|
+
| 'in'
|
|
42
|
+
| 'index-of'
|
|
43
|
+
| 'length'
|
|
44
|
+
| 'slice'
|
|
45
|
+
// Decision
|
|
46
|
+
| '!'
|
|
47
|
+
| '!='
|
|
48
|
+
| '<'
|
|
49
|
+
| '<='
|
|
50
|
+
| '=='
|
|
51
|
+
| '>'
|
|
52
|
+
| '>='
|
|
53
|
+
| 'all'
|
|
54
|
+
| 'any'
|
|
55
|
+
| 'case'
|
|
56
|
+
| 'match'
|
|
57
|
+
| 'coalesce'
|
|
58
|
+
| 'within'
|
|
59
|
+
// Ramps, scales, curves
|
|
60
|
+
| 'interpolate'
|
|
61
|
+
| 'interpolate-hcl'
|
|
62
|
+
| 'interpolate-lab'
|
|
63
|
+
| 'step'
|
|
64
|
+
// Variable binding
|
|
65
|
+
| 'let'
|
|
66
|
+
| 'var'
|
|
67
|
+
// String
|
|
68
|
+
| 'concat'
|
|
69
|
+
| 'downcase'
|
|
70
|
+
| 'is-supported-script'
|
|
71
|
+
| 'resolved-locale'
|
|
72
|
+
| 'upcase'
|
|
73
|
+
// Color
|
|
74
|
+
| 'rgb'
|
|
75
|
+
| 'rgba'
|
|
76
|
+
| 'to-rgba'
|
|
77
|
+
// Math
|
|
78
|
+
| '-'
|
|
79
|
+
| '*'
|
|
80
|
+
| '/'
|
|
81
|
+
| '%'
|
|
82
|
+
| '^'
|
|
83
|
+
| '+'
|
|
84
|
+
| 'abs'
|
|
85
|
+
| 'acos'
|
|
86
|
+
| 'asin'
|
|
87
|
+
| 'atan'
|
|
88
|
+
| 'ceil'
|
|
89
|
+
| 'cos'
|
|
90
|
+
| 'distance'
|
|
91
|
+
| 'e'
|
|
92
|
+
| 'floor'
|
|
93
|
+
| 'ln'
|
|
94
|
+
| 'ln2'
|
|
95
|
+
| 'log10'
|
|
96
|
+
| 'log2'
|
|
97
|
+
| 'max'
|
|
98
|
+
| 'min'
|
|
99
|
+
| 'pi'
|
|
100
|
+
| 'round'
|
|
101
|
+
| 'sin'
|
|
102
|
+
| 'sqrt'
|
|
103
|
+
| 'tan'
|
|
104
|
+
// Zoom, Heatmap
|
|
105
|
+
| 'zoom'
|
|
106
|
+
| 'heatmap-density';
|
|
107
|
+
|
|
108
|
+
type ExpressionField =
|
|
109
|
+
| string
|
|
110
|
+
| number
|
|
111
|
+
| boolean
|
|
112
|
+
| Expression
|
|
113
|
+
| ExpressionField[]
|
|
114
|
+
| {[key: string]: ExpressionField};
|
|
115
|
+
|
|
116
|
+
export type Expression = readonly [ExpressionName, ...ExpressionField[]];
|
|
117
|
+
|
|
118
|
+
export type FilterExpression = Expression;
|
|
119
|
+
|
|
120
|
+
type ExpressionParameters =
|
|
121
|
+
| 'zoom'
|
|
122
|
+
| 'feature'
|
|
123
|
+
| 'feature-state'
|
|
124
|
+
| 'sky-radial-progress'
|
|
125
|
+
| 'line-progress'
|
|
126
|
+
| 'heatmap-density';
|
|
127
|
+
|
|
128
|
+
type ResolvedImageType = ImageSourcePropType | string;
|
|
129
|
+
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
131
|
+
export type Value<T, AllowedParameters extends ExpressionParameters[] = []> =
|
|
132
|
+
| T
|
|
133
|
+
| Expression;
|
|
134
|
+
|
|
135
|
+
enum VisibilityEnum {
|
|
136
|
+
/** The layer is shown. */
|
|
137
|
+
Visible = 'visible',
|
|
138
|
+
/** The layer is not shown. */
|
|
139
|
+
None = 'none',
|
|
140
|
+
}
|
|
141
|
+
type VisibilityEnumValues = 'visible' | 'none';
|
|
142
|
+
enum FillTranslateAnchorEnum {
|
|
143
|
+
/** The fill is translated relative to the map. */
|
|
144
|
+
Map = 'map',
|
|
145
|
+
/** The fill is translated relative to the viewport. */
|
|
146
|
+
Viewport = 'viewport',
|
|
147
|
+
}
|
|
148
|
+
type FillTranslateAnchorEnumValues = 'map' | 'viewport';
|
|
149
|
+
enum LineCapEnum {
|
|
150
|
+
/** A cap with a squared-off end which is drawn to the exact endpoint of the line. */
|
|
151
|
+
Butt = 'butt',
|
|
152
|
+
/** A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line. */
|
|
153
|
+
Round = 'round',
|
|
154
|
+
/** 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. */
|
|
155
|
+
Square = 'square',
|
|
156
|
+
}
|
|
157
|
+
type LineCapEnumValues = 'butt' | 'round' | 'square';
|
|
158
|
+
enum LineJoinEnum {
|
|
159
|
+
/** 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. */
|
|
160
|
+
Bevel = 'bevel',
|
|
161
|
+
/** A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line. */
|
|
162
|
+
Round = 'round',
|
|
163
|
+
/** A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet. */
|
|
164
|
+
Miter = 'miter',
|
|
165
|
+
}
|
|
166
|
+
type LineJoinEnumValues = 'bevel' | 'round' | 'miter';
|
|
167
|
+
enum LineTranslateAnchorEnum {
|
|
168
|
+
/** The line is translated relative to the map. */
|
|
169
|
+
Map = 'map',
|
|
170
|
+
/** The line is translated relative to the viewport. */
|
|
171
|
+
Viewport = 'viewport',
|
|
172
|
+
}
|
|
173
|
+
type LineTranslateAnchorEnumValues = 'map' | 'viewport';
|
|
174
|
+
enum SymbolPlacementEnum {
|
|
175
|
+
/** The label is placed at the point where the geometry is located. */
|
|
176
|
+
Point = 'point',
|
|
177
|
+
/** The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. */
|
|
178
|
+
Line = 'line',
|
|
179
|
+
/** 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. */
|
|
180
|
+
LineCenter = 'line-center',
|
|
181
|
+
}
|
|
182
|
+
type SymbolPlacementEnumValues = 'point' | 'line' | 'line-center';
|
|
183
|
+
enum SymbolZOrderEnum {
|
|
184
|
+
/** 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`. */
|
|
185
|
+
Auto = 'auto',
|
|
186
|
+
/** 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`. */
|
|
187
|
+
ViewportY = 'viewport-y',
|
|
188
|
+
/** Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data. */
|
|
189
|
+
Source = 'source',
|
|
190
|
+
}
|
|
191
|
+
type SymbolZOrderEnumValues = 'auto' | 'viewport-y' | 'source';
|
|
192
|
+
enum IconRotationAlignmentEnum {
|
|
193
|
+
/** 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. */
|
|
194
|
+
Map = 'map',
|
|
195
|
+
/** Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`. */
|
|
196
|
+
Viewport = 'viewport',
|
|
197
|
+
/** 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`. */
|
|
198
|
+
Auto = 'auto',
|
|
199
|
+
}
|
|
200
|
+
type IconRotationAlignmentEnumValues = 'map' | 'viewport' | 'auto';
|
|
201
|
+
enum IconTextFitEnum {
|
|
202
|
+
/** The icon is displayed at its intrinsic aspect ratio. */
|
|
203
|
+
None = 'none',
|
|
204
|
+
/** The icon is scaled in the x-dimension to fit the width of the text. */
|
|
205
|
+
Width = 'width',
|
|
206
|
+
/** The icon is scaled in the y-dimension to fit the height of the text. */
|
|
207
|
+
Height = 'height',
|
|
208
|
+
/** The icon is scaled in both x- and y-dimensions. */
|
|
209
|
+
Both = 'both',
|
|
210
|
+
}
|
|
211
|
+
type IconTextFitEnumValues = 'none' | 'width' | 'height' | 'both';
|
|
212
|
+
enum IconAnchorEnum {
|
|
213
|
+
/** The center of the icon is placed closest to the anchor. */
|
|
214
|
+
Center = 'center',
|
|
215
|
+
/** The left side of the icon is placed closest to the anchor. */
|
|
216
|
+
Left = 'left',
|
|
217
|
+
/** The right side of the icon is placed closest to the anchor. */
|
|
218
|
+
Right = 'right',
|
|
219
|
+
/** The top of the icon is placed closest to the anchor. */
|
|
220
|
+
Top = 'top',
|
|
221
|
+
/** The bottom of the icon is placed closest to the anchor. */
|
|
222
|
+
Bottom = 'bottom',
|
|
223
|
+
/** The top left corner of the icon is placed closest to the anchor. */
|
|
224
|
+
TopLeft = 'top-left',
|
|
225
|
+
/** The top right corner of the icon is placed closest to the anchor. */
|
|
226
|
+
TopRight = 'top-right',
|
|
227
|
+
/** The bottom left corner of the icon is placed closest to the anchor. */
|
|
228
|
+
BottomLeft = 'bottom-left',
|
|
229
|
+
/** The bottom right corner of the icon is placed closest to the anchor. */
|
|
230
|
+
BottomRight = 'bottom-right',
|
|
231
|
+
}
|
|
232
|
+
type IconAnchorEnumValues =
|
|
233
|
+
| 'center'
|
|
234
|
+
| 'left'
|
|
235
|
+
| 'right'
|
|
236
|
+
| 'top'
|
|
237
|
+
| 'bottom'
|
|
238
|
+
| 'top-left'
|
|
239
|
+
| 'top-right'
|
|
240
|
+
| 'bottom-left'
|
|
241
|
+
| 'bottom-right';
|
|
242
|
+
enum IconPitchAlignmentEnum {
|
|
243
|
+
/** The icon is aligned to the plane of the map. */
|
|
244
|
+
Map = 'map',
|
|
245
|
+
/** The icon is aligned to the plane of the viewport. */
|
|
246
|
+
Viewport = 'viewport',
|
|
247
|
+
/** Automatically matches the value of `icon-rotation-alignment`. */
|
|
248
|
+
Auto = 'auto',
|
|
249
|
+
}
|
|
250
|
+
type IconPitchAlignmentEnumValues = 'map' | 'viewport' | 'auto';
|
|
251
|
+
enum TextPitchAlignmentEnum {
|
|
252
|
+
/** The text is aligned to the plane of the map. */
|
|
253
|
+
Map = 'map',
|
|
254
|
+
/** The text is aligned to the plane of the viewport. */
|
|
255
|
+
Viewport = 'viewport',
|
|
256
|
+
/** Automatically matches the value of `text-rotation-alignment`. */
|
|
257
|
+
Auto = 'auto',
|
|
258
|
+
}
|
|
259
|
+
type TextPitchAlignmentEnumValues = 'map' | 'viewport' | 'auto';
|
|
260
|
+
enum TextRotationAlignmentEnum {
|
|
261
|
+
/** 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. */
|
|
262
|
+
Map = 'map',
|
|
263
|
+
/** Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`. */
|
|
264
|
+
Viewport = 'viewport',
|
|
265
|
+
/** When `symbol-placement` is set to `point`, aligns text to the x-axis of the viewport. When `symbol-placement` is set to `line` or `line-center`, aligns glyphs to the x-axis of the viewport and places them along the line. */
|
|
266
|
+
ViewportGlyph = 'viewport-glyph',
|
|
267
|
+
/** 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`. */
|
|
268
|
+
Auto = 'auto',
|
|
269
|
+
}
|
|
270
|
+
type TextRotationAlignmentEnumValues =
|
|
271
|
+
| 'map'
|
|
272
|
+
| 'viewport'
|
|
273
|
+
| 'viewport-glyph'
|
|
274
|
+
| 'auto';
|
|
275
|
+
enum TextJustifyEnum {
|
|
276
|
+
/** The text is aligned towards the anchor position. */
|
|
277
|
+
Auto = 'auto',
|
|
278
|
+
/** The text is aligned to the left. */
|
|
279
|
+
Left = 'left',
|
|
280
|
+
/** The text is centered. */
|
|
281
|
+
Center = 'center',
|
|
282
|
+
/** The text is aligned to the right. */
|
|
283
|
+
Right = 'right',
|
|
284
|
+
}
|
|
285
|
+
type TextJustifyEnumValues = 'auto' | 'left' | 'center' | 'right';
|
|
286
|
+
enum TextVariableAnchorEnum {
|
|
287
|
+
/** The center of the text is placed closest to the anchor. */
|
|
288
|
+
Center = 'center',
|
|
289
|
+
/** The left side of the text is placed closest to the anchor. */
|
|
290
|
+
Left = 'left',
|
|
291
|
+
/** The right side of the text is placed closest to the anchor. */
|
|
292
|
+
Right = 'right',
|
|
293
|
+
/** The top of the text is placed closest to the anchor. */
|
|
294
|
+
Top = 'top',
|
|
295
|
+
/** The bottom of the text is placed closest to the anchor. */
|
|
296
|
+
Bottom = 'bottom',
|
|
297
|
+
/** The top left corner of the text is placed closest to the anchor. */
|
|
298
|
+
TopLeft = 'top-left',
|
|
299
|
+
/** The top right corner of the text is placed closest to the anchor. */
|
|
300
|
+
TopRight = 'top-right',
|
|
301
|
+
/** The bottom left corner of the text is placed closest to the anchor. */
|
|
302
|
+
BottomLeft = 'bottom-left',
|
|
303
|
+
/** The bottom right corner of the text is placed closest to the anchor. */
|
|
304
|
+
BottomRight = 'bottom-right',
|
|
305
|
+
}
|
|
306
|
+
type TextVariableAnchorEnumValues =
|
|
307
|
+
| 'center'
|
|
308
|
+
| 'left'
|
|
309
|
+
| 'right'
|
|
310
|
+
| 'top'
|
|
311
|
+
| 'bottom'
|
|
312
|
+
| 'top-left'
|
|
313
|
+
| 'top-right'
|
|
314
|
+
| 'bottom-left'
|
|
315
|
+
| 'bottom-right';
|
|
316
|
+
enum TextAnchorEnum {
|
|
317
|
+
/** The center of the text is placed closest to the anchor. */
|
|
318
|
+
Center = 'center',
|
|
319
|
+
/** The left side of the text is placed closest to the anchor. */
|
|
320
|
+
Left = 'left',
|
|
321
|
+
/** The right side of the text is placed closest to the anchor. */
|
|
322
|
+
Right = 'right',
|
|
323
|
+
/** The top of the text is placed closest to the anchor. */
|
|
324
|
+
Top = 'top',
|
|
325
|
+
/** The bottom of the text is placed closest to the anchor. */
|
|
326
|
+
Bottom = 'bottom',
|
|
327
|
+
/** The top left corner of the text is placed closest to the anchor. */
|
|
328
|
+
TopLeft = 'top-left',
|
|
329
|
+
/** The top right corner of the text is placed closest to the anchor. */
|
|
330
|
+
TopRight = 'top-right',
|
|
331
|
+
/** The bottom left corner of the text is placed closest to the anchor. */
|
|
332
|
+
BottomLeft = 'bottom-left',
|
|
333
|
+
/** The bottom right corner of the text is placed closest to the anchor. */
|
|
334
|
+
BottomRight = 'bottom-right',
|
|
335
|
+
}
|
|
336
|
+
type TextAnchorEnumValues =
|
|
337
|
+
| 'center'
|
|
338
|
+
| 'left'
|
|
339
|
+
| 'right'
|
|
340
|
+
| 'top'
|
|
341
|
+
| 'bottom'
|
|
342
|
+
| 'top-left'
|
|
343
|
+
| 'top-right'
|
|
344
|
+
| 'bottom-left'
|
|
345
|
+
| 'bottom-right';
|
|
346
|
+
enum TextWritingModeEnum {
|
|
347
|
+
/** If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally. */
|
|
348
|
+
Horizontal = 'horizontal',
|
|
349
|
+
/** If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically. */
|
|
350
|
+
Vertical = 'vertical',
|
|
351
|
+
}
|
|
352
|
+
type TextWritingModeEnumValues = 'horizontal' | 'vertical';
|
|
353
|
+
enum TextTransformEnum {
|
|
354
|
+
/** The text is not altered. */
|
|
355
|
+
None = 'none',
|
|
356
|
+
/** Forces all letters to be displayed in uppercase. */
|
|
357
|
+
Uppercase = 'uppercase',
|
|
358
|
+
/** Forces all letters to be displayed in lowercase. */
|
|
359
|
+
Lowercase = 'lowercase',
|
|
360
|
+
}
|
|
361
|
+
type TextTransformEnumValues = 'none' | 'uppercase' | 'lowercase';
|
|
362
|
+
enum IconTranslateAnchorEnum {
|
|
363
|
+
/** Icons are translated relative to the map. */
|
|
364
|
+
Map = 'map',
|
|
365
|
+
/** Icons are translated relative to the viewport. */
|
|
366
|
+
Viewport = 'viewport',
|
|
367
|
+
}
|
|
368
|
+
type IconTranslateAnchorEnumValues = 'map' | 'viewport';
|
|
369
|
+
enum TextTranslateAnchorEnum {
|
|
370
|
+
/** The text is translated relative to the map. */
|
|
371
|
+
Map = 'map',
|
|
372
|
+
/** The text is translated relative to the viewport. */
|
|
373
|
+
Viewport = 'viewport',
|
|
374
|
+
}
|
|
375
|
+
type TextTranslateAnchorEnumValues = 'map' | 'viewport';
|
|
376
|
+
enum CircleTranslateAnchorEnum {
|
|
377
|
+
/** The circle is translated relative to the map. */
|
|
378
|
+
Map = 'map',
|
|
379
|
+
/** The circle is translated relative to the viewport. */
|
|
380
|
+
Viewport = 'viewport',
|
|
381
|
+
}
|
|
382
|
+
type CircleTranslateAnchorEnumValues = 'map' | 'viewport';
|
|
383
|
+
enum CirclePitchScaleEnum {
|
|
384
|
+
/** Circles are scaled according to their apparent distance to the camera. */
|
|
385
|
+
Map = 'map',
|
|
386
|
+
/** Circles are not scaled. */
|
|
387
|
+
Viewport = 'viewport',
|
|
388
|
+
}
|
|
389
|
+
type CirclePitchScaleEnumValues = 'map' | 'viewport';
|
|
390
|
+
enum CirclePitchAlignmentEnum {
|
|
391
|
+
/** The circle is aligned to the plane of the map. */
|
|
392
|
+
Map = 'map',
|
|
393
|
+
/** The circle is aligned to the plane of the viewport. */
|
|
394
|
+
Viewport = 'viewport',
|
|
395
|
+
}
|
|
396
|
+
type CirclePitchAlignmentEnumValues = 'map' | 'viewport';
|
|
397
|
+
enum FillExtrusionTranslateAnchorEnum {
|
|
398
|
+
/** The fill extrusion is translated relative to the map. */
|
|
399
|
+
Map = 'map',
|
|
400
|
+
/** The fill extrusion is translated relative to the viewport. */
|
|
401
|
+
Viewport = 'viewport',
|
|
402
|
+
}
|
|
403
|
+
type FillExtrusionTranslateAnchorEnumValues = 'map' | 'viewport';
|
|
404
|
+
enum RasterResamplingEnum {
|
|
405
|
+
/** (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 */
|
|
406
|
+
Linear = 'linear',
|
|
407
|
+
/** Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled */
|
|
408
|
+
Nearest = 'nearest',
|
|
409
|
+
}
|
|
410
|
+
type RasterResamplingEnumValues = 'linear' | 'nearest';
|
|
411
|
+
enum HillshadeIlluminationAnchorEnum {
|
|
412
|
+
/** The hillshade illumination is relative to the north direction. */
|
|
413
|
+
Map = 'map',
|
|
414
|
+
/** The hillshade illumination is relative to the top of the viewport. */
|
|
415
|
+
Viewport = 'viewport',
|
|
416
|
+
}
|
|
417
|
+
type HillshadeIlluminationAnchorEnumValues = 'map' | 'viewport';
|
|
418
|
+
enum AnchorEnum {
|
|
419
|
+
/** The position of the light source is aligned to the rotation of the map. */
|
|
420
|
+
Map = 'map',
|
|
421
|
+
/** The position of the light source is aligned to the rotation of the viewport. */
|
|
422
|
+
Viewport = 'viewport',
|
|
423
|
+
}
|
|
424
|
+
type AnchorEnumValues = 'map' | 'viewport';
|
|
425
|
+
|
|
426
|
+
type Enum<EnumType, EnumValues> = EnumType | EnumValues;
|
|
427
|
+
|
|
428
|
+
export interface FillLayerStyleProps {
|
|
429
|
+
/**
|
|
430
|
+
* Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
|
|
431
|
+
*/
|
|
432
|
+
fillSortKey?: Value<number, ['zoom', 'feature']>;
|
|
433
|
+
/**
|
|
434
|
+
* Whether this layer is displayed.
|
|
435
|
+
*/
|
|
436
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
437
|
+
/**
|
|
438
|
+
* Whether or not the fill should be antialiased.
|
|
439
|
+
*/
|
|
440
|
+
fillAntialias?: Value<boolean, ['zoom']>;
|
|
441
|
+
/**
|
|
442
|
+
* 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.
|
|
443
|
+
*/
|
|
444
|
+
fillOpacity?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* The transition affecting any changes to this layer’s fillOpacity property.
|
|
448
|
+
*/
|
|
449
|
+
fillOpacityTransition?: Transition;
|
|
450
|
+
/**
|
|
451
|
+
* The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
|
|
452
|
+
*
|
|
453
|
+
* @disabledBy fillPattern
|
|
454
|
+
*/
|
|
455
|
+
fillColor?: Value<string, ['zoom', 'feature', 'feature-state']>;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* The transition affecting any changes to this layer’s fillColor property.
|
|
459
|
+
*/
|
|
460
|
+
fillColorTransition?: Transition;
|
|
461
|
+
/**
|
|
462
|
+
* The outline color of the fill. Matches the value of `fillColor` if unspecified.
|
|
463
|
+
*
|
|
464
|
+
* @disabledBy fillPattern
|
|
465
|
+
*/
|
|
466
|
+
fillOutlineColor?: Value<string, ['zoom', 'feature', 'feature-state']>;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* The transition affecting any changes to this layer’s fillOutlineColor property.
|
|
470
|
+
*/
|
|
471
|
+
fillOutlineColorTransition?: Transition;
|
|
472
|
+
/**
|
|
473
|
+
* The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
|
|
474
|
+
*/
|
|
475
|
+
fillTranslate?: Value<Translation, ['zoom']>;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* The transition affecting any changes to this layer’s fillTranslate property.
|
|
479
|
+
*/
|
|
480
|
+
fillTranslateTransition?: Transition;
|
|
481
|
+
/**
|
|
482
|
+
* Controls the frame of reference for `fillTranslate`.
|
|
483
|
+
*
|
|
484
|
+
* @requires fillTranslate
|
|
485
|
+
*/
|
|
486
|
+
fillTranslateAnchor?: Value<
|
|
487
|
+
Enum<FillTranslateAnchorEnum, FillTranslateAnchorEnumValues>,
|
|
488
|
+
['zoom']
|
|
489
|
+
>;
|
|
490
|
+
/**
|
|
491
|
+
* 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.
|
|
492
|
+
*/
|
|
493
|
+
fillPattern?: Value<ResolvedImageType, ['zoom', 'feature']>;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* The transition affecting any changes to this layer’s fillPattern property.
|
|
497
|
+
*/
|
|
498
|
+
fillPatternTransition?: Transition;
|
|
499
|
+
}
|
|
500
|
+
export interface LineLayerStyleProps {
|
|
501
|
+
/**
|
|
502
|
+
* The display of line endings.
|
|
503
|
+
*/
|
|
504
|
+
lineCap?: Value<Enum<LineCapEnum, LineCapEnumValues>, ['zoom']>;
|
|
505
|
+
/**
|
|
506
|
+
* The display of lines when joining.
|
|
507
|
+
*/
|
|
508
|
+
lineJoin?: Value<Enum<LineJoinEnum, LineJoinEnumValues>, ['zoom', 'feature']>;
|
|
509
|
+
/**
|
|
510
|
+
* Used to automatically convert miter joins to bevel joins for sharp angles.
|
|
511
|
+
*/
|
|
512
|
+
lineMiterLimit?: Value<number, ['zoom']>;
|
|
513
|
+
/**
|
|
514
|
+
* Used to automatically convert round joins to miter joins for shallow angles.
|
|
515
|
+
*/
|
|
516
|
+
lineRoundLimit?: Value<number, ['zoom']>;
|
|
517
|
+
/**
|
|
518
|
+
* Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
|
|
519
|
+
*/
|
|
520
|
+
lineSortKey?: Value<number, ['zoom', 'feature']>;
|
|
521
|
+
/**
|
|
522
|
+
* Whether this layer is displayed.
|
|
523
|
+
*/
|
|
524
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
525
|
+
/**
|
|
526
|
+
* The opacity at which the line will be drawn.
|
|
527
|
+
*/
|
|
528
|
+
lineOpacity?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* The transition affecting any changes to this layer’s lineOpacity property.
|
|
532
|
+
*/
|
|
533
|
+
lineOpacityTransition?: Transition;
|
|
534
|
+
/**
|
|
535
|
+
* The color with which the line will be drawn.
|
|
536
|
+
*
|
|
537
|
+
* @disabledBy linePattern
|
|
538
|
+
*/
|
|
539
|
+
lineColor?: Value<string, ['zoom', 'feature', 'feature-state']>;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* The transition affecting any changes to this layer’s lineColor property.
|
|
543
|
+
*/
|
|
544
|
+
lineColorTransition?: Transition;
|
|
545
|
+
/**
|
|
546
|
+
* The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
|
|
547
|
+
*/
|
|
548
|
+
lineTranslate?: Value<Translation, ['zoom']>;
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* The transition affecting any changes to this layer’s lineTranslate property.
|
|
552
|
+
*/
|
|
553
|
+
lineTranslateTransition?: Transition;
|
|
554
|
+
/**
|
|
555
|
+
* Controls the frame of reference for `lineTranslate`.
|
|
556
|
+
*
|
|
557
|
+
* @requires lineTranslate
|
|
558
|
+
*/
|
|
559
|
+
lineTranslateAnchor?: Value<
|
|
560
|
+
Enum<LineTranslateAnchorEnum, LineTranslateAnchorEnumValues>,
|
|
561
|
+
['zoom']
|
|
562
|
+
>;
|
|
563
|
+
/**
|
|
564
|
+
* Stroke thickness.
|
|
565
|
+
*/
|
|
566
|
+
lineWidth?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* The transition affecting any changes to this layer’s lineWidth property.
|
|
570
|
+
*/
|
|
571
|
+
lineWidthTransition?: Transition;
|
|
572
|
+
/**
|
|
573
|
+
* Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
|
|
574
|
+
*/
|
|
575
|
+
lineGapWidth?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* The transition affecting any changes to this layer’s lineGapWidth property.
|
|
579
|
+
*/
|
|
580
|
+
lineGapWidthTransition?: Transition;
|
|
581
|
+
/**
|
|
582
|
+
* The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.
|
|
583
|
+
*/
|
|
584
|
+
lineOffset?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* The transition affecting any changes to this layer’s lineOffset property.
|
|
588
|
+
*/
|
|
589
|
+
lineOffsetTransition?: Transition;
|
|
590
|
+
/**
|
|
591
|
+
* Blur applied to the line, in pixels.
|
|
592
|
+
*/
|
|
593
|
+
lineBlur?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* The transition affecting any changes to this layer’s lineBlur property.
|
|
597
|
+
*/
|
|
598
|
+
lineBlurTransition?: Transition;
|
|
599
|
+
/**
|
|
600
|
+
* Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoomDependent expressions will be evaluated only at integer zoom levels.
|
|
601
|
+
*
|
|
602
|
+
* @disabledBy linePattern
|
|
603
|
+
*/
|
|
604
|
+
lineDasharray?: Value<number[], ['zoom']>;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* The transition affecting any changes to this layer’s lineDasharray property.
|
|
608
|
+
*/
|
|
609
|
+
lineDasharrayTransition?: Transition;
|
|
610
|
+
/**
|
|
611
|
+
* 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.
|
|
612
|
+
*/
|
|
613
|
+
linePattern?: Value<ResolvedImageType, ['zoom', 'feature']>;
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* The transition affecting any changes to this layer’s linePattern property.
|
|
617
|
+
*/
|
|
618
|
+
linePatternTransition?: Transition;
|
|
619
|
+
/**
|
|
620
|
+
* Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.
|
|
621
|
+
*
|
|
622
|
+
* @disabledBy lineDasharray, linePattern
|
|
623
|
+
*/
|
|
624
|
+
lineGradient?: Value<string, ['line-progress']>;
|
|
625
|
+
}
|
|
626
|
+
export interface SymbolLayerStyleProps {
|
|
627
|
+
/**
|
|
628
|
+
* Label placement relative to its geometry.
|
|
629
|
+
*/
|
|
630
|
+
symbolPlacement?: Value<
|
|
631
|
+
Enum<SymbolPlacementEnum, SymbolPlacementEnumValues>,
|
|
632
|
+
['zoom']
|
|
633
|
+
>;
|
|
634
|
+
/**
|
|
635
|
+
* Distance between two symbol anchors.
|
|
636
|
+
*/
|
|
637
|
+
symbolSpacing?: Value<number, ['zoom']>;
|
|
638
|
+
/**
|
|
639
|
+
* 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 MapLibre GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.
|
|
640
|
+
*/
|
|
641
|
+
symbolAvoidEdges?: Value<boolean, ['zoom']>;
|
|
642
|
+
/**
|
|
643
|
+
* 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.
|
|
644
|
+
*/
|
|
645
|
+
symbolSortKey?: Value<number, ['zoom', 'feature']>;
|
|
646
|
+
/**
|
|
647
|
+
* 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`.
|
|
648
|
+
*/
|
|
649
|
+
symbolZOrder?: Value<
|
|
650
|
+
Enum<SymbolZOrderEnum, SymbolZOrderEnumValues>,
|
|
651
|
+
['zoom']
|
|
652
|
+
>;
|
|
653
|
+
/**
|
|
654
|
+
* If true, the icon will be visible even if it collides with other previously drawn symbols.
|
|
655
|
+
*
|
|
656
|
+
* @requires iconImage
|
|
657
|
+
*
|
|
658
|
+
* @disabledBy iconOverlap
|
|
659
|
+
*/
|
|
660
|
+
iconAllowOverlap?: Value<boolean, ['zoom']>;
|
|
661
|
+
/**
|
|
662
|
+
* If true, other symbols can be visible even if they collide with the icon.
|
|
663
|
+
*
|
|
664
|
+
* @requires iconImage
|
|
665
|
+
*/
|
|
666
|
+
iconIgnorePlacement?: Value<boolean, ['zoom']>;
|
|
667
|
+
/**
|
|
668
|
+
* If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.
|
|
669
|
+
*
|
|
670
|
+
* @requires iconImage, textField
|
|
671
|
+
*/
|
|
672
|
+
iconOptional?: Value<boolean, ['zoom']>;
|
|
673
|
+
/**
|
|
674
|
+
* In combination with `symbolPlacement`, determines the rotation behavior of icons.
|
|
675
|
+
*
|
|
676
|
+
* @requires iconImage
|
|
677
|
+
*/
|
|
678
|
+
iconRotationAlignment?: Value<
|
|
679
|
+
Enum<IconRotationAlignmentEnum, IconRotationAlignmentEnumValues>,
|
|
680
|
+
['zoom']
|
|
681
|
+
>;
|
|
682
|
+
/**
|
|
683
|
+
* 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.
|
|
684
|
+
*
|
|
685
|
+
* @requires iconImage
|
|
686
|
+
*/
|
|
687
|
+
iconSize?: Value<number, ['zoom', 'feature']>;
|
|
688
|
+
/**
|
|
689
|
+
* Scales the icon to fit around the associated text.
|
|
690
|
+
*
|
|
691
|
+
* @requires iconImage, textField
|
|
692
|
+
*/
|
|
693
|
+
iconTextFit?: Value<Enum<IconTextFitEnum, IconTextFitEnumValues>, ['zoom']>;
|
|
694
|
+
/**
|
|
695
|
+
* Size of the additional area added to dimensions determined by `iconTextFit`, in clockwise order: top, right, bottom, left.
|
|
696
|
+
*
|
|
697
|
+
* @requires iconImage, textField
|
|
698
|
+
*/
|
|
699
|
+
iconTextFitPadding?: Value<number[], ['zoom']>;
|
|
700
|
+
/**
|
|
701
|
+
* Name of image in sprite to use for drawing an image background.
|
|
702
|
+
*/
|
|
703
|
+
iconImage?: Value<ResolvedImageType, ['zoom', 'feature']>;
|
|
704
|
+
/**
|
|
705
|
+
* Rotates the icon clockwise.
|
|
706
|
+
*
|
|
707
|
+
* @requires iconImage
|
|
708
|
+
*/
|
|
709
|
+
iconRotate?: Value<number, ['zoom', 'feature']>;
|
|
710
|
+
/**
|
|
711
|
+
* Size of additional area round the icon bounding box used for detecting symbol collisions. Values are declared using CSS margin shorthand syntax: a single value applies to all four sides; two values apply to [top/bottom, left/right]; three values apply to [top, left/right, bottom]; four values apply to [top, right, bottom, left]. For backwards compatibility, a single bare number is accepted, and treated the same as a oneElement array padding applied to all sides.
|
|
712
|
+
*
|
|
713
|
+
* @requires iconImage
|
|
714
|
+
*/
|
|
715
|
+
iconPadding?: Value<number, ['zoom', 'feature']>;
|
|
716
|
+
/**
|
|
717
|
+
* If true, the icon may be flipped to prevent it from being rendered upsideDown.
|
|
718
|
+
*
|
|
719
|
+
* @requires iconImage
|
|
720
|
+
*/
|
|
721
|
+
iconKeepUpright?: Value<boolean, ['zoom']>;
|
|
722
|
+
/**
|
|
723
|
+
* 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.
|
|
724
|
+
*
|
|
725
|
+
* @requires iconImage
|
|
726
|
+
*/
|
|
727
|
+
iconOffset?: Value<number[], ['zoom', 'feature']>;
|
|
728
|
+
/**
|
|
729
|
+
* Part of the icon placed closest to the anchor.
|
|
730
|
+
*
|
|
731
|
+
* @requires iconImage
|
|
732
|
+
*/
|
|
733
|
+
iconAnchor?: Value<
|
|
734
|
+
Enum<IconAnchorEnum, IconAnchorEnumValues>,
|
|
735
|
+
['zoom', 'feature']
|
|
736
|
+
>;
|
|
737
|
+
/**
|
|
738
|
+
* Orientation of icon when map is pitched.
|
|
739
|
+
*
|
|
740
|
+
* @requires iconImage
|
|
741
|
+
*/
|
|
742
|
+
iconPitchAlignment?: Value<
|
|
743
|
+
Enum<IconPitchAlignmentEnum, IconPitchAlignmentEnumValues>,
|
|
744
|
+
['zoom']
|
|
745
|
+
>;
|
|
746
|
+
/**
|
|
747
|
+
* Orientation of text when map is pitched.
|
|
748
|
+
*
|
|
749
|
+
* @requires textField
|
|
750
|
+
*/
|
|
751
|
+
textPitchAlignment?: Value<
|
|
752
|
+
Enum<TextPitchAlignmentEnum, TextPitchAlignmentEnumValues>,
|
|
753
|
+
['zoom']
|
|
754
|
+
>;
|
|
755
|
+
/**
|
|
756
|
+
* In combination with `symbolPlacement`, determines the rotation behavior of the individual glyphs forming the text.
|
|
757
|
+
*
|
|
758
|
+
* @requires textField
|
|
759
|
+
*/
|
|
760
|
+
textRotationAlignment?: Value<
|
|
761
|
+
Enum<TextRotationAlignmentEnum, TextRotationAlignmentEnumValues>,
|
|
762
|
+
['zoom']
|
|
763
|
+
>;
|
|
764
|
+
/**
|
|
765
|
+
* 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.
|
|
766
|
+
*/
|
|
767
|
+
textField?: Value<FormattedString, ['zoom', 'feature']>;
|
|
768
|
+
/**
|
|
769
|
+
* Font stack to use for displaying text.
|
|
770
|
+
*
|
|
771
|
+
* @requires textField
|
|
772
|
+
*/
|
|
773
|
+
textFont?: Value<string[], ['zoom', 'feature']>;
|
|
774
|
+
/**
|
|
775
|
+
* Font size.
|
|
776
|
+
*
|
|
777
|
+
* @requires textField
|
|
778
|
+
*/
|
|
779
|
+
textSize?: Value<number, ['zoom', 'feature']>;
|
|
780
|
+
/**
|
|
781
|
+
* The maximum line width for text wrapping.
|
|
782
|
+
*
|
|
783
|
+
* @requires textField
|
|
784
|
+
*/
|
|
785
|
+
textMaxWidth?: Value<number, ['zoom', 'feature']>;
|
|
786
|
+
/**
|
|
787
|
+
* Text leading value for multiLine text.
|
|
788
|
+
*
|
|
789
|
+
* @requires textField
|
|
790
|
+
*/
|
|
791
|
+
textLineHeight?: Value<number, ['zoom']>;
|
|
792
|
+
/**
|
|
793
|
+
* Text tracking amount.
|
|
794
|
+
*
|
|
795
|
+
* @requires textField
|
|
796
|
+
*/
|
|
797
|
+
textLetterSpacing?: Value<number, ['zoom', 'feature']>;
|
|
798
|
+
/**
|
|
799
|
+
* Text justification options.
|
|
800
|
+
*
|
|
801
|
+
* @requires textField
|
|
802
|
+
*/
|
|
803
|
+
textJustify?: Value<
|
|
804
|
+
Enum<TextJustifyEnum, TextJustifyEnumValues>,
|
|
805
|
+
['zoom', 'feature']
|
|
806
|
+
>;
|
|
807
|
+
/**
|
|
808
|
+
* 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.
|
|
809
|
+
*
|
|
810
|
+
* @requires textField
|
|
811
|
+
*/
|
|
812
|
+
textRadialOffset?: Value<number, ['zoom', 'feature']>;
|
|
813
|
+
/**
|
|
814
|
+
* To increase the chance of placing highPriority labels on the map, you can provide an array of `textAnchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `textJustify: auto` to choose justification based on anchor position. To apply an offset, use the `textRadialOffset` or the twoDimensional `textOffset`.
|
|
815
|
+
*
|
|
816
|
+
* @requires textField
|
|
817
|
+
*/
|
|
818
|
+
textVariableAnchor?: Value<
|
|
819
|
+
Enum<TextVariableAnchorEnum, TextVariableAnchorEnumValues>[],
|
|
820
|
+
['zoom']
|
|
821
|
+
>;
|
|
822
|
+
/**
|
|
823
|
+
* Part of the text placed closest to the anchor.
|
|
824
|
+
*
|
|
825
|
+
* @requires textField
|
|
826
|
+
*
|
|
827
|
+
* @disabledBy textVariableAnchor
|
|
828
|
+
*/
|
|
829
|
+
textAnchor?: Value<
|
|
830
|
+
Enum<TextAnchorEnum, TextAnchorEnumValues>,
|
|
831
|
+
['zoom', 'feature']
|
|
832
|
+
>;
|
|
833
|
+
/**
|
|
834
|
+
* Maximum angle change between adjacent characters.
|
|
835
|
+
*
|
|
836
|
+
* @requires textField
|
|
837
|
+
*/
|
|
838
|
+
textMaxAngle?: Value<number, ['zoom']>;
|
|
839
|
+
/**
|
|
840
|
+
* The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.
|
|
841
|
+
*
|
|
842
|
+
* @requires textField
|
|
843
|
+
*/
|
|
844
|
+
textWritingMode?: Value<
|
|
845
|
+
Enum<TextWritingModeEnum, TextWritingModeEnumValues>[],
|
|
846
|
+
['zoom']
|
|
847
|
+
>;
|
|
848
|
+
/**
|
|
849
|
+
* Rotates the text clockwise.
|
|
850
|
+
*
|
|
851
|
+
* @requires textField
|
|
852
|
+
*/
|
|
853
|
+
textRotate?: Value<number, ['zoom', 'feature']>;
|
|
854
|
+
/**
|
|
855
|
+
* Size of the additional area around the text bounding box used for detecting symbol collisions.
|
|
856
|
+
*
|
|
857
|
+
* @requires textField
|
|
858
|
+
*/
|
|
859
|
+
textPadding?: Value<number, ['zoom']>;
|
|
860
|
+
/**
|
|
861
|
+
* If true, the text may be flipped vertically to prevent it from being rendered upsideDown.
|
|
862
|
+
*
|
|
863
|
+
* @requires textField
|
|
864
|
+
*/
|
|
865
|
+
textKeepUpright?: Value<boolean, ['zoom']>;
|
|
866
|
+
/**
|
|
867
|
+
* Specifies how to capitalize text, similar to the CSS `textTransform` property.
|
|
868
|
+
*
|
|
869
|
+
* @requires textField
|
|
870
|
+
*/
|
|
871
|
+
textTransform?: Value<
|
|
872
|
+
Enum<TextTransformEnum, TextTransformEnumValues>,
|
|
873
|
+
['zoom', 'feature']
|
|
874
|
+
>;
|
|
875
|
+
/**
|
|
876
|
+
* 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.
|
|
877
|
+
*
|
|
878
|
+
* @requires textField
|
|
879
|
+
*
|
|
880
|
+
* @disabledBy textRadialOffset
|
|
881
|
+
*/
|
|
882
|
+
textOffset?: Value<number[], ['zoom', 'feature']>;
|
|
883
|
+
/**
|
|
884
|
+
* If true, the text will be visible even if it collides with other previously drawn symbols.
|
|
885
|
+
*
|
|
886
|
+
* @requires textField
|
|
887
|
+
*
|
|
888
|
+
* @disabledBy textOverlap
|
|
889
|
+
*/
|
|
890
|
+
textAllowOverlap?: Value<boolean, ['zoom']>;
|
|
891
|
+
/**
|
|
892
|
+
* If true, other symbols can be visible even if they collide with the text.
|
|
893
|
+
*
|
|
894
|
+
* @requires textField
|
|
895
|
+
*/
|
|
896
|
+
textIgnorePlacement?: Value<boolean, ['zoom']>;
|
|
897
|
+
/**
|
|
898
|
+
* If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
|
|
899
|
+
*
|
|
900
|
+
* @requires textField, iconImage
|
|
901
|
+
*/
|
|
902
|
+
textOptional?: Value<boolean, ['zoom']>;
|
|
903
|
+
/**
|
|
904
|
+
* Whether this layer is displayed.
|
|
905
|
+
*/
|
|
906
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
907
|
+
/**
|
|
908
|
+
* The opacity at which the icon will be drawn.
|
|
909
|
+
*
|
|
910
|
+
* @requires iconImage
|
|
911
|
+
*/
|
|
912
|
+
iconOpacity?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* The transition affecting any changes to this layer’s iconOpacity property.
|
|
916
|
+
*/
|
|
917
|
+
iconOpacityTransition?: Transition;
|
|
918
|
+
/**
|
|
919
|
+
* The color of the icon. This can only be used with sdf icons.
|
|
920
|
+
*
|
|
921
|
+
* @requires iconImage
|
|
922
|
+
*/
|
|
923
|
+
iconColor?: Value<string, ['zoom', 'feature', 'feature-state']>;
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* The transition affecting any changes to this layer’s iconColor property.
|
|
927
|
+
*/
|
|
928
|
+
iconColorTransition?: Transition;
|
|
929
|
+
/**
|
|
930
|
+
* The color of the icon's halo. Icon halos can only be used with SDF icons.
|
|
931
|
+
*
|
|
932
|
+
* @requires iconImage
|
|
933
|
+
*/
|
|
934
|
+
iconHaloColor?: Value<string, ['zoom', 'feature', 'feature-state']>;
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* The transition affecting any changes to this layer’s iconHaloColor property.
|
|
938
|
+
*/
|
|
939
|
+
iconHaloColorTransition?: Transition;
|
|
940
|
+
/**
|
|
941
|
+
* Distance of halo to the icon outline.
|
|
942
|
+
*
|
|
943
|
+
* @requires iconImage
|
|
944
|
+
*/
|
|
945
|
+
iconHaloWidth?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* The transition affecting any changes to this layer’s iconHaloWidth property.
|
|
949
|
+
*/
|
|
950
|
+
iconHaloWidthTransition?: Transition;
|
|
951
|
+
/**
|
|
952
|
+
* Fade out the halo towards the outside.
|
|
953
|
+
*
|
|
954
|
+
* @requires iconImage
|
|
955
|
+
*/
|
|
956
|
+
iconHaloBlur?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* The transition affecting any changes to this layer’s iconHaloBlur property.
|
|
960
|
+
*/
|
|
961
|
+
iconHaloBlurTransition?: Transition;
|
|
962
|
+
/**
|
|
963
|
+
* Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.
|
|
964
|
+
*
|
|
965
|
+
* @requires iconImage
|
|
966
|
+
*/
|
|
967
|
+
iconTranslate?: Value<Translation, ['zoom']>;
|
|
968
|
+
|
|
969
|
+
/**
|
|
970
|
+
* The transition affecting any changes to this layer’s iconTranslate property.
|
|
971
|
+
*/
|
|
972
|
+
iconTranslateTransition?: Transition;
|
|
973
|
+
/**
|
|
974
|
+
* Controls the frame of reference for `iconTranslate`.
|
|
975
|
+
*
|
|
976
|
+
* @requires iconImage, iconTranslate
|
|
977
|
+
*/
|
|
978
|
+
iconTranslateAnchor?: Value<
|
|
979
|
+
Enum<IconTranslateAnchorEnum, IconTranslateAnchorEnumValues>,
|
|
980
|
+
['zoom']
|
|
981
|
+
>;
|
|
982
|
+
/**
|
|
983
|
+
* The opacity at which the text will be drawn.
|
|
984
|
+
*
|
|
985
|
+
* @requires textField
|
|
986
|
+
*/
|
|
987
|
+
textOpacity?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* The transition affecting any changes to this layer’s textOpacity property.
|
|
991
|
+
*/
|
|
992
|
+
textOpacityTransition?: Transition;
|
|
993
|
+
/**
|
|
994
|
+
* The color with which the text will be drawn.
|
|
995
|
+
*
|
|
996
|
+
* @requires textField
|
|
997
|
+
*/
|
|
998
|
+
textColor?: Value<string, ['zoom', 'feature', 'feature-state']>;
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* The transition affecting any changes to this layer’s textColor property.
|
|
1002
|
+
*/
|
|
1003
|
+
textColorTransition?: Transition;
|
|
1004
|
+
/**
|
|
1005
|
+
* The color of the text's halo, which helps it stand out from backgrounds.
|
|
1006
|
+
*
|
|
1007
|
+
* @requires textField
|
|
1008
|
+
*/
|
|
1009
|
+
textHaloColor?: Value<string, ['zoom', 'feature', 'feature-state']>;
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* The transition affecting any changes to this layer’s textHaloColor property.
|
|
1013
|
+
*/
|
|
1014
|
+
textHaloColorTransition?: Transition;
|
|
1015
|
+
/**
|
|
1016
|
+
* Distance of halo to the font outline. Max text halo width is 1/4 of the fontSize.
|
|
1017
|
+
*
|
|
1018
|
+
* @requires textField
|
|
1019
|
+
*/
|
|
1020
|
+
textHaloWidth?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* The transition affecting any changes to this layer’s textHaloWidth property.
|
|
1024
|
+
*/
|
|
1025
|
+
textHaloWidthTransition?: Transition;
|
|
1026
|
+
/**
|
|
1027
|
+
* The halo's fadeout distance towards the outside.
|
|
1028
|
+
*
|
|
1029
|
+
* @requires textField
|
|
1030
|
+
*/
|
|
1031
|
+
textHaloBlur?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* The transition affecting any changes to this layer’s textHaloBlur property.
|
|
1035
|
+
*/
|
|
1036
|
+
textHaloBlurTransition?: Transition;
|
|
1037
|
+
/**
|
|
1038
|
+
* Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.
|
|
1039
|
+
*
|
|
1040
|
+
* @requires textField
|
|
1041
|
+
*/
|
|
1042
|
+
textTranslate?: Value<Translation, ['zoom']>;
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* The transition affecting any changes to this layer’s textTranslate property.
|
|
1046
|
+
*/
|
|
1047
|
+
textTranslateTransition?: Transition;
|
|
1048
|
+
/**
|
|
1049
|
+
* Controls the frame of reference for `textTranslate`.
|
|
1050
|
+
*
|
|
1051
|
+
* @requires textField, textTranslate
|
|
1052
|
+
*/
|
|
1053
|
+
textTranslateAnchor?: Value<
|
|
1054
|
+
Enum<TextTranslateAnchorEnum, TextTranslateAnchorEnumValues>,
|
|
1055
|
+
['zoom']
|
|
1056
|
+
>;
|
|
1057
|
+
}
|
|
1058
|
+
export interface CircleLayerStyleProps {
|
|
1059
|
+
/**
|
|
1060
|
+
* Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
|
|
1061
|
+
*/
|
|
1062
|
+
circleSortKey?: Value<number, ['zoom', 'feature']>;
|
|
1063
|
+
/**
|
|
1064
|
+
* Whether this layer is displayed.
|
|
1065
|
+
*/
|
|
1066
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
1067
|
+
/**
|
|
1068
|
+
* Circle radius.
|
|
1069
|
+
*/
|
|
1070
|
+
circleRadius?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* The transition affecting any changes to this layer’s circleRadius property.
|
|
1074
|
+
*/
|
|
1075
|
+
circleRadiusTransition?: Transition;
|
|
1076
|
+
/**
|
|
1077
|
+
* The fill color of the circle.
|
|
1078
|
+
*/
|
|
1079
|
+
circleColor?: Value<string, ['zoom', 'feature', 'feature-state']>;
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* The transition affecting any changes to this layer’s circleColor property.
|
|
1083
|
+
*/
|
|
1084
|
+
circleColorTransition?: Transition;
|
|
1085
|
+
/**
|
|
1086
|
+
* Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.
|
|
1087
|
+
*/
|
|
1088
|
+
circleBlur?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* The transition affecting any changes to this layer’s circleBlur property.
|
|
1092
|
+
*/
|
|
1093
|
+
circleBlurTransition?: Transition;
|
|
1094
|
+
/**
|
|
1095
|
+
* The opacity at which the circle will be drawn.
|
|
1096
|
+
*/
|
|
1097
|
+
circleOpacity?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* The transition affecting any changes to this layer’s circleOpacity property.
|
|
1101
|
+
*/
|
|
1102
|
+
circleOpacityTransition?: Transition;
|
|
1103
|
+
/**
|
|
1104
|
+
* The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
|
|
1105
|
+
*/
|
|
1106
|
+
circleTranslate?: Value<Translation, ['zoom']>;
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* The transition affecting any changes to this layer’s circleTranslate property.
|
|
1110
|
+
*/
|
|
1111
|
+
circleTranslateTransition?: Transition;
|
|
1112
|
+
/**
|
|
1113
|
+
* Controls the frame of reference for `circleTranslate`.
|
|
1114
|
+
*
|
|
1115
|
+
* @requires circleTranslate
|
|
1116
|
+
*/
|
|
1117
|
+
circleTranslateAnchor?: Value<
|
|
1118
|
+
Enum<CircleTranslateAnchorEnum, CircleTranslateAnchorEnumValues>,
|
|
1119
|
+
['zoom']
|
|
1120
|
+
>;
|
|
1121
|
+
/**
|
|
1122
|
+
* Controls the scaling behavior of the circle when the map is pitched.
|
|
1123
|
+
*/
|
|
1124
|
+
circlePitchScale?: Value<
|
|
1125
|
+
Enum<CirclePitchScaleEnum, CirclePitchScaleEnumValues>,
|
|
1126
|
+
['zoom']
|
|
1127
|
+
>;
|
|
1128
|
+
/**
|
|
1129
|
+
* Orientation of circle when map is pitched.
|
|
1130
|
+
*/
|
|
1131
|
+
circlePitchAlignment?: Value<
|
|
1132
|
+
Enum<CirclePitchAlignmentEnum, CirclePitchAlignmentEnumValues>,
|
|
1133
|
+
['zoom']
|
|
1134
|
+
>;
|
|
1135
|
+
/**
|
|
1136
|
+
* The width of the circle's stroke. Strokes are placed outside of the `circleRadius`.
|
|
1137
|
+
*/
|
|
1138
|
+
circleStrokeWidth?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
1139
|
+
|
|
1140
|
+
/**
|
|
1141
|
+
* The transition affecting any changes to this layer’s circleStrokeWidth property.
|
|
1142
|
+
*/
|
|
1143
|
+
circleStrokeWidthTransition?: Transition;
|
|
1144
|
+
/**
|
|
1145
|
+
* The stroke color of the circle.
|
|
1146
|
+
*/
|
|
1147
|
+
circleStrokeColor?: Value<string, ['zoom', 'feature', 'feature-state']>;
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* The transition affecting any changes to this layer’s circleStrokeColor property.
|
|
1151
|
+
*/
|
|
1152
|
+
circleStrokeColorTransition?: Transition;
|
|
1153
|
+
/**
|
|
1154
|
+
* The opacity of the circle's stroke.
|
|
1155
|
+
*/
|
|
1156
|
+
circleStrokeOpacity?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
1157
|
+
|
|
1158
|
+
/**
|
|
1159
|
+
* The transition affecting any changes to this layer’s circleStrokeOpacity property.
|
|
1160
|
+
*/
|
|
1161
|
+
circleStrokeOpacityTransition?: Transition;
|
|
1162
|
+
}
|
|
1163
|
+
export interface HeatmapLayerStyleProps {
|
|
1164
|
+
/**
|
|
1165
|
+
* Whether this layer is displayed.
|
|
1166
|
+
*/
|
|
1167
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
1168
|
+
/**
|
|
1169
|
+
* Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.
|
|
1170
|
+
*/
|
|
1171
|
+
heatmapRadius?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* The transition affecting any changes to this layer’s heatmapRadius property.
|
|
1175
|
+
*/
|
|
1176
|
+
heatmapRadiusTransition?: Transition;
|
|
1177
|
+
/**
|
|
1178
|
+
* A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.
|
|
1179
|
+
*/
|
|
1180
|
+
heatmapWeight?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
1181
|
+
/**
|
|
1182
|
+
* Similar to `heatmapWeight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.
|
|
1183
|
+
*/
|
|
1184
|
+
heatmapIntensity?: Value<number, ['zoom']>;
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* The transition affecting any changes to this layer’s heatmapIntensity property.
|
|
1188
|
+
*/
|
|
1189
|
+
heatmapIntensityTransition?: Transition;
|
|
1190
|
+
/**
|
|
1191
|
+
* Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmapDensity"]` as input.
|
|
1192
|
+
*/
|
|
1193
|
+
heatmapColor?: Value<string, ['heatmap-density']>;
|
|
1194
|
+
/**
|
|
1195
|
+
* The global opacity at which the heatmap layer will be drawn.
|
|
1196
|
+
*/
|
|
1197
|
+
heatmapOpacity?: Value<number, ['zoom']>;
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* The transition affecting any changes to this layer’s heatmapOpacity property.
|
|
1201
|
+
*/
|
|
1202
|
+
heatmapOpacityTransition?: Transition;
|
|
1203
|
+
}
|
|
1204
|
+
export interface FillExtrusionLayerStyleProps {
|
|
1205
|
+
/**
|
|
1206
|
+
* Whether this layer is displayed.
|
|
1207
|
+
*/
|
|
1208
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
1209
|
+
/**
|
|
1210
|
+
* The opacity of the entire fill extrusion layer. This is rendered on a perLayer, not perFeature, basis, and dataDriven styling is not available.
|
|
1211
|
+
*/
|
|
1212
|
+
fillExtrusionOpacity?: Value<number, ['zoom']>;
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* The transition affecting any changes to this layer’s fillExtrusionOpacity property.
|
|
1216
|
+
*/
|
|
1217
|
+
fillExtrusionOpacityTransition?: Transition;
|
|
1218
|
+
/**
|
|
1219
|
+
* The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fillExtrusionOpacity` to set layer opacity.
|
|
1220
|
+
*
|
|
1221
|
+
* @disabledBy fillExtrusionPattern
|
|
1222
|
+
*/
|
|
1223
|
+
fillExtrusionColor?: Value<string, ['zoom', 'feature', 'feature-state']>;
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* The transition affecting any changes to this layer’s fillExtrusionColor property.
|
|
1227
|
+
*/
|
|
1228
|
+
fillExtrusionColorTransition?: Transition;
|
|
1229
|
+
/**
|
|
1230
|
+
* The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.
|
|
1231
|
+
*/
|
|
1232
|
+
fillExtrusionTranslate?: Value<Translation, ['zoom']>;
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* The transition affecting any changes to this layer’s fillExtrusionTranslate property.
|
|
1236
|
+
*/
|
|
1237
|
+
fillExtrusionTranslateTransition?: Transition;
|
|
1238
|
+
/**
|
|
1239
|
+
* Controls the frame of reference for `fillExtrusionTranslate`.
|
|
1240
|
+
*
|
|
1241
|
+
* @requires fillExtrusionTranslate
|
|
1242
|
+
*/
|
|
1243
|
+
fillExtrusionTranslateAnchor?: Value<
|
|
1244
|
+
Enum<
|
|
1245
|
+
FillExtrusionTranslateAnchorEnum,
|
|
1246
|
+
FillExtrusionTranslateAnchorEnumValues
|
|
1247
|
+
>,
|
|
1248
|
+
['zoom']
|
|
1249
|
+
>;
|
|
1250
|
+
/**
|
|
1251
|
+
* 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.
|
|
1252
|
+
*/
|
|
1253
|
+
fillExtrusionPattern?: Value<ResolvedImageType, ['zoom', 'feature']>;
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* The transition affecting any changes to this layer’s fillExtrusionPattern property.
|
|
1257
|
+
*/
|
|
1258
|
+
fillExtrusionPatternTransition?: Transition;
|
|
1259
|
+
/**
|
|
1260
|
+
* The height with which to extrude this layer.
|
|
1261
|
+
*/
|
|
1262
|
+
fillExtrusionHeight?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
1263
|
+
|
|
1264
|
+
/**
|
|
1265
|
+
* The transition affecting any changes to this layer’s fillExtrusionHeight property.
|
|
1266
|
+
*/
|
|
1267
|
+
fillExtrusionHeightTransition?: Transition;
|
|
1268
|
+
/**
|
|
1269
|
+
* The height with which to extrude the base of this layer. Must be less than or equal to `fillExtrusionHeight`.
|
|
1270
|
+
*
|
|
1271
|
+
* @requires fillExtrusionHeight
|
|
1272
|
+
*/
|
|
1273
|
+
fillExtrusionBase?: Value<number, ['zoom', 'feature', 'feature-state']>;
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* The transition affecting any changes to this layer’s fillExtrusionBase property.
|
|
1277
|
+
*/
|
|
1278
|
+
fillExtrusionBaseTransition?: Transition;
|
|
1279
|
+
}
|
|
1280
|
+
export interface RasterLayerStyleProps {
|
|
1281
|
+
/**
|
|
1282
|
+
* Whether this layer is displayed.
|
|
1283
|
+
*/
|
|
1284
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
1285
|
+
/**
|
|
1286
|
+
* The opacity at which the image will be drawn.
|
|
1287
|
+
*/
|
|
1288
|
+
rasterOpacity?: Value<number, ['zoom']>;
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* The transition affecting any changes to this layer’s rasterOpacity property.
|
|
1292
|
+
*/
|
|
1293
|
+
rasterOpacityTransition?: Transition;
|
|
1294
|
+
/**
|
|
1295
|
+
* Rotates hues around the color wheel.
|
|
1296
|
+
*/
|
|
1297
|
+
rasterHueRotate?: Value<number, ['zoom']>;
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* The transition affecting any changes to this layer’s rasterHueRotate property.
|
|
1301
|
+
*/
|
|
1302
|
+
rasterHueRotateTransition?: Transition;
|
|
1303
|
+
/**
|
|
1304
|
+
* Increase or reduce the brightness of the image. The value is the minimum brightness.
|
|
1305
|
+
*/
|
|
1306
|
+
rasterBrightnessMin?: Value<number, ['zoom']>;
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* The transition affecting any changes to this layer’s rasterBrightnessMin property.
|
|
1310
|
+
*/
|
|
1311
|
+
rasterBrightnessMinTransition?: Transition;
|
|
1312
|
+
/**
|
|
1313
|
+
* Increase or reduce the brightness of the image. The value is the maximum brightness.
|
|
1314
|
+
*/
|
|
1315
|
+
rasterBrightnessMax?: Value<number, ['zoom']>;
|
|
1316
|
+
|
|
1317
|
+
/**
|
|
1318
|
+
* The transition affecting any changes to this layer’s rasterBrightnessMax property.
|
|
1319
|
+
*/
|
|
1320
|
+
rasterBrightnessMaxTransition?: Transition;
|
|
1321
|
+
/**
|
|
1322
|
+
* Increase or reduce the saturation of the image.
|
|
1323
|
+
*/
|
|
1324
|
+
rasterSaturation?: Value<number, ['zoom']>;
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* The transition affecting any changes to this layer’s rasterSaturation property.
|
|
1328
|
+
*/
|
|
1329
|
+
rasterSaturationTransition?: Transition;
|
|
1330
|
+
/**
|
|
1331
|
+
* Increase or reduce the contrast of the image.
|
|
1332
|
+
*/
|
|
1333
|
+
rasterContrast?: Value<number, ['zoom']>;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* The transition affecting any changes to this layer’s rasterContrast property.
|
|
1337
|
+
*/
|
|
1338
|
+
rasterContrastTransition?: Transition;
|
|
1339
|
+
/**
|
|
1340
|
+
* The resampling/interpolation method to use for overscaling, also known as texture magnification filter
|
|
1341
|
+
*/
|
|
1342
|
+
rasterResampling?: Value<
|
|
1343
|
+
Enum<RasterResamplingEnum, RasterResamplingEnumValues>,
|
|
1344
|
+
['zoom']
|
|
1345
|
+
>;
|
|
1346
|
+
/**
|
|
1347
|
+
* Fade duration when a new tile is added.
|
|
1348
|
+
*/
|
|
1349
|
+
rasterFadeDuration?: Value<number, ['zoom']>;
|
|
1350
|
+
}
|
|
1351
|
+
export interface HillshadeLayerStyleProps {
|
|
1352
|
+
/**
|
|
1353
|
+
* Whether this layer is displayed.
|
|
1354
|
+
*/
|
|
1355
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
1356
|
+
/**
|
|
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`.
|
|
1358
|
+
*/
|
|
1359
|
+
hillshadeIlluminationDirection?: Value<number, ['zoom']>;
|
|
1360
|
+
/**
|
|
1361
|
+
* Direction of light source when map is rotated.
|
|
1362
|
+
*/
|
|
1363
|
+
hillshadeIlluminationAnchor?: Value<
|
|
1364
|
+
Enum<
|
|
1365
|
+
HillshadeIlluminationAnchorEnum,
|
|
1366
|
+
HillshadeIlluminationAnchorEnumValues
|
|
1367
|
+
>,
|
|
1368
|
+
['zoom']
|
|
1369
|
+
>;
|
|
1370
|
+
/**
|
|
1371
|
+
* Intensity of the hillshade
|
|
1372
|
+
*/
|
|
1373
|
+
hillshadeExaggeration?: Value<number, ['zoom']>;
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* The transition affecting any changes to this layer’s hillshadeExaggeration property.
|
|
1377
|
+
*/
|
|
1378
|
+
hillshadeExaggerationTransition?: Transition;
|
|
1379
|
+
/**
|
|
1380
|
+
* The shading color of areas that face away from the light source.
|
|
1381
|
+
*/
|
|
1382
|
+
hillshadeShadowColor?: Value<string, ['zoom']>;
|
|
1383
|
+
|
|
1384
|
+
/**
|
|
1385
|
+
* The transition affecting any changes to this layer’s hillshadeShadowColor property.
|
|
1386
|
+
*/
|
|
1387
|
+
hillshadeShadowColorTransition?: Transition;
|
|
1388
|
+
/**
|
|
1389
|
+
* The shading color of areas that faces towards the light source.
|
|
1390
|
+
*/
|
|
1391
|
+
hillshadeHighlightColor?: Value<string, ['zoom']>;
|
|
1392
|
+
|
|
1393
|
+
/**
|
|
1394
|
+
* The transition affecting any changes to this layer’s hillshadeHighlightColor property.
|
|
1395
|
+
*/
|
|
1396
|
+
hillshadeHighlightColorTransition?: Transition;
|
|
1397
|
+
/**
|
|
1398
|
+
* The shading color used to accentuate rugged terrain like sharp cliffs and gorges.
|
|
1399
|
+
*/
|
|
1400
|
+
hillshadeAccentColor?: Value<string, ['zoom']>;
|
|
1401
|
+
|
|
1402
|
+
/**
|
|
1403
|
+
* The transition affecting any changes to this layer’s hillshadeAccentColor property.
|
|
1404
|
+
*/
|
|
1405
|
+
hillshadeAccentColorTransition?: Transition;
|
|
1406
|
+
}
|
|
1407
|
+
export interface BackgroundLayerStyleProps {
|
|
1408
|
+
/**
|
|
1409
|
+
* Whether this layer is displayed.
|
|
1410
|
+
*/
|
|
1411
|
+
visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
|
|
1412
|
+
/**
|
|
1413
|
+
* The color with which the background will be drawn.
|
|
1414
|
+
*
|
|
1415
|
+
* @disabledBy backgroundPattern
|
|
1416
|
+
*/
|
|
1417
|
+
backgroundColor?: Value<string, ['zoom']>;
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* The transition affecting any changes to this layer’s backgroundColor property.
|
|
1421
|
+
*/
|
|
1422
|
+
backgroundColorTransition?: Transition;
|
|
1423
|
+
/**
|
|
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.
|
|
1425
|
+
*/
|
|
1426
|
+
backgroundPattern?: Value<ResolvedImageType, ['zoom']>;
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* The transition affecting any changes to this layer’s backgroundPattern property.
|
|
1430
|
+
*/
|
|
1431
|
+
backgroundPatternTransition?: Transition;
|
|
1432
|
+
/**
|
|
1433
|
+
* The opacity at which the background will be drawn.
|
|
1434
|
+
*/
|
|
1435
|
+
backgroundOpacity?: Value<number, ['zoom']>;
|
|
1436
|
+
|
|
1437
|
+
/**
|
|
1438
|
+
* The transition affecting any changes to this layer’s backgroundOpacity property.
|
|
1439
|
+
*/
|
|
1440
|
+
backgroundOpacityTransition?: Transition;
|
|
1441
|
+
}
|
|
1442
|
+
export interface LightLayerStyleProps {
|
|
1443
|
+
/**
|
|
1444
|
+
* Whether extruded geometries are lit relative to the map or viewport.
|
|
1445
|
+
*/
|
|
1446
|
+
anchor?: Value<Enum<AnchorEnum, AnchorEnumValues>, ['zoom']>;
|
|
1447
|
+
/**
|
|
1448
|
+
* 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).
|
|
1449
|
+
*/
|
|
1450
|
+
position?: Value<number[], ['zoom']>;
|
|
1451
|
+
|
|
1452
|
+
/**
|
|
1453
|
+
* The transition affecting any changes to this layer’s position property.
|
|
1454
|
+
*/
|
|
1455
|
+
positionTransition?: Transition;
|
|
1456
|
+
/**
|
|
1457
|
+
* Color tint for lighting extruded geometries.
|
|
1458
|
+
*/
|
|
1459
|
+
color?: Value<string, ['zoom']>;
|
|
1460
|
+
|
|
1461
|
+
/**
|
|
1462
|
+
* The transition affecting any changes to this layer’s color property.
|
|
1463
|
+
*/
|
|
1464
|
+
colorTransition?: Transition;
|
|
1465
|
+
/**
|
|
1466
|
+
* Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.
|
|
1467
|
+
*/
|
|
1468
|
+
intensity?: Value<number, ['zoom']>;
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
* The transition affecting any changes to this layer’s intensity property.
|
|
1472
|
+
*/
|
|
1473
|
+
intensityTransition?: Transition;
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
export type AllLayerStyleProps =
|
|
1477
|
+
| FillLayerStyleProps
|
|
1478
|
+
| LineLayerStyleProps
|
|
1479
|
+
| SymbolLayerStyleProps
|
|
1480
|
+
| CircleLayerStyleProps
|
|
1481
|
+
| HeatmapLayerStyleProps
|
|
1482
|
+
| FillExtrusionLayerStyleProps
|
|
1483
|
+
| RasterLayerStyleProps
|
|
1484
|
+
| HillshadeLayerStyleProps
|
|
1485
|
+
| BackgroundLayerStyleProps
|
|
1486
|
+
| LightLayerStyleProps;
|