@mapbox/mapbox-gl-style-spec 14.4.0 → 14.5.0-beta.1
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/bin/gl-style-composite.js +0 -5
- package/bin/gl-style-format.js +0 -5
- package/bin/gl-style-migrate.js +0 -5
- package/bin/gl-style-validate.js +0 -5
- package/{composite.js → composite.ts} +1 -1
- package/data/{extent.js → extent.ts} +0 -2
- package/{deref.js → deref.ts} +7 -9
- package/{diff.js → diff.ts} +44 -21
- package/dist/index.cjs +664 -1179
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1726 -0
- package/dist/index.es.js +664 -1179
- package/dist/index.es.js.map +1 -1
- package/{empty.js → empty.ts} +1 -2
- package/error/{parsing_error.js → parsing_error.ts} +0 -2
- package/error/{validation_error.js → validation_error.ts} +5 -5
- package/expression/{compound_expression.js → compound_expression.ts} +29 -19
- package/expression/definitions/{assertion.js → assertion.ts} +16 -13
- package/expression/definitions/{at.js → at.ts} +12 -13
- package/expression/definitions/{case.js → case.ts} +12 -11
- package/expression/definitions/{coalesce.js → coalesce.ts} +11 -11
- package/expression/definitions/{coercion.js → coercion.ts} +21 -20
- package/expression/definitions/{collator.js → collator.ts} +11 -11
- package/expression/definitions/{comparison.js → comparison.ts} +30 -24
- package/expression/definitions/{config.js → config.ts} +16 -16
- package/expression/definitions/{distance.js → distance.ts} +60 -52
- package/expression/definitions/{format.js → format.ts} +26 -15
- package/expression/definitions/{image.js → image.ts} +12 -12
- package/expression/definitions/{in.js → in.ts} +22 -13
- package/expression/definitions/{index.js → index.ts} +70 -83
- package/expression/definitions/{index_of.js → index_of.ts} +24 -15
- package/expression/definitions/{interpolate.js → interpolate.ts} +44 -25
- package/expression/definitions/{length.js → length.ts} +11 -10
- package/expression/definitions/{let.js → let.ts} +10 -7
- package/expression/definitions/{literal.js → literal.ts} +11 -12
- package/expression/definitions/{match.js → match.ts} +25 -15
- package/expression/definitions/{number_format.js → number_format.ts} +10 -10
- package/expression/definitions/{slice.js → slice.ts} +23 -15
- package/expression/definitions/{step.js → step.ts} +14 -12
- package/expression/definitions/{var.js → var.ts} +5 -7
- package/expression/definitions/{within.js → within.ts} +41 -29
- package/expression/{evaluation_context.js → evaluation_context.ts} +26 -23
- package/expression/expression.ts +29 -0
- package/expression/{index.js → index.ts} +208 -110
- package/expression/{is_constant.js → is_constant.ts} +5 -7
- package/expression/{parsing_context.js → parsing_context.ts} +47 -34
- package/expression/{parsing_error.js → parsing_error.ts} +0 -2
- package/expression/{runtime_error.js → runtime_error.ts} +0 -2
- package/expression/{scope.js → scope.ts} +5 -5
- package/expression/{stops.js → stops.ts} +2 -4
- package/expression/types/{collator.js → collator.ts} +1 -3
- package/expression/types/{formatted.js → formatted.ts} +8 -7
- package/expression/types/{resolved_image.js → resolved_image.ts} +5 -7
- package/expression/{types.js → types.ts} +53 -45
- package/expression/{values.js → values.ts} +12 -12
- package/feature_filter/{convert.js → convert.ts} +19 -18
- package/feature_filter/{index.js → index.ts} +33 -18
- package/{format.js → format.ts} +3 -3
- package/function/{convert.js → convert.ts} +36 -25
- package/function/{index.js → index.ts} +12 -12
- package/{group_by_layout.js → group_by_layout.ts} +11 -8
- package/migrate/{expressions.js → expressions.ts} +8 -14
- package/migrate/{v8.js → v8.ts} +2 -2
- package/migrate/{v9.js → v9.ts} +2 -2
- package/{migrate.js → migrate.ts} +3 -3
- package/package.json +20 -18
- package/{read_style.js → read_style.ts} +5 -4
- package/reference/latest.ts +5 -0
- package/reference/v8.json +190 -0
- package/rollup.config.js +6 -24
- package/{style-spec.js → style-spec.ts} +28 -30
- package/test.js +3 -2
- package/types/config_options.ts +13 -0
- package/types/lut.ts +7 -0
- package/types/tile_id.ts +5 -0
- package/{types.js → types.ts} +505 -165
- package/util/{color.js → color.ts} +89 -3
- package/util/{color_spaces.js → color_spaces.ts} +12 -14
- package/util/{deep_equal.js → deep_equal.ts} +1 -3
- package/util/{extend.js → extend.ts} +1 -3
- package/util/{geometry_util.js → geometry_util.ts} +23 -11
- package/util/{get_type.js → get_type.ts} +1 -3
- package/util/{interpolate.js → interpolate.ts} +1 -3
- package/util/{properties.js → properties.ts} +5 -4
- package/util/{random.js → random.ts} +0 -2
- package/util/{ref_properties.js → ref_properties.ts} +0 -1
- package/util/{result.js → result.ts} +7 -5
- package/util/{unbundle_jsonlint.js → unbundle_jsonlint.ts} +5 -5
- package/validate/{validate.js → validate.ts} +33 -35
- package/validate/{validate_array.js → validate_array.ts} +5 -7
- package/validate/{validate_boolean.js → validate_boolean.ts} +3 -5
- package/validate/{validate_color.js → validate_color.ts} +3 -5
- package/validate/{validate_enum.js → validate_enum.ts} +4 -5
- package/validate/{validate_expression.js → validate_expression.ts} +7 -9
- package/validate/{validate_filter.js → validate_filter.ts} +16 -12
- package/validate/{validate_fog.js → validate_fog.ts} +4 -6
- package/validate/validate_formatted.ts +13 -0
- package/validate/{validate_function.js → validate_function.ts} +14 -16
- package/validate/{validate_glyphs_url.js → validate_glyphs_url.ts} +3 -5
- package/validate/validate_image.ts +13 -0
- package/validate/{validate_import.js → validate_import.ts} +6 -8
- package/validate/{validate_layer.js → validate_layer.ts} +17 -15
- package/validate/{validate_layout_property.js → validate_layout_property.ts} +3 -5
- package/validate/{validate_light.js → validate_light.ts} +4 -6
- package/validate/{validate_lights.js → validate_lights.ts} +7 -9
- package/validate/{validate_model.js → validate_model.ts} +4 -6
- package/validate/{validate_number.js → validate_number.ts} +4 -6
- package/validate/{validate_object.js → validate_object.ts} +5 -8
- package/validate/{validate_paint_property.js → validate_paint_property.ts} +3 -5
- package/validate/{validate_projection.js → validate_projection.ts} +4 -6
- package/validate/{validate_property.js → validate_property.ts} +15 -15
- package/validate/{validate_source.js → validate_source.ts} +16 -13
- package/validate/validate_string.ts +16 -0
- package/validate/validate_style.ts +33 -0
- package/validate/{validate_terrain.js → validate_terrain.ts} +5 -7
- package/{validate_mapbox_api_supported.js → validate_mapbox_api_supported.ts} +22 -18
- package/{validate_style.min.js → validate_style.min.ts} +20 -21
- package/{validate_style.js → validate_style.ts} +9 -9
- package/{visit.js → visit.ts} +22 -17
- package/.eslintrc +0 -10
- package/expression/expression.js +0 -28
- package/flow-typed/cheap-ruler.js +0 -25
- package/flow-typed/geojson.js +0 -44
- package/flow-typed/gl-matrix.js +0 -119
- package/flow-typed/gl.js +0 -5
- package/flow-typed/intl.js +0 -58
- package/flow-typed/kdbush.js +0 -9
- package/flow-typed/mapbox-gl-supported.js +0 -16
- package/flow-typed/mapbox-unitbezier.js +0 -14
- package/flow-typed/offscreen-canvas.js +0 -9
- package/flow-typed/pbf.js +0 -26
- package/flow-typed/point-geometry.js +0 -46
- package/flow-typed/potpack.js +0 -13
- package/flow-typed/tiny-sdf.js +0 -31
- package/flow-typed/tracked_parameters_proxy.js +0 -82
- package/flow-typed/vector-tile.js +0 -49
- package/flow-typed/webgl2.js +0 -41
- package/reference/latest.js +0 -7
- package/validate/validate_formatted.js +0 -15
- package/validate/validate_image.js +0 -15
- package/validate/validate_string.js +0 -18
- package/validate/validate_style.js +0 -29
package/{types.js → types.ts}
RENAMED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated code; do not edit. Edit build/generate-flow-typed-style-spec.js instead.
|
|
1
|
+
// Generated code; do not edit. Edit build/generate-typed-style-spec.ts instead.
|
|
3
2
|
/* eslint-disable */
|
|
4
3
|
|
|
5
4
|
export type ColorSpecification = string;
|
|
@@ -19,7 +18,7 @@ export type FilterSpecification =
|
|
|
19
18
|
| ['>=', string, string | number | boolean]
|
|
20
19
|
| ['<', string, string | number | boolean]
|
|
21
20
|
| ['<=', string, string | number | boolean]
|
|
22
|
-
| Array<string | FilterSpecification>;
|
|
21
|
+
| Array<string | FilterSpecification>;
|
|
23
22
|
|
|
24
23
|
export type TransitionSpecification = {
|
|
25
24
|
duration?: number,
|
|
@@ -29,21 +28,21 @@ export type TransitionSpecification = {
|
|
|
29
28
|
// Note: doesn't capture interpolatable vs. non-interpolatable types.
|
|
30
29
|
|
|
31
30
|
export type CameraFunctionSpecification<T> =
|
|
32
|
-
| {
|
|
33
|
-
| {
|
|
31
|
+
| { type: 'exponential', stops: Array<[number, T]> }
|
|
32
|
+
| { type: 'interval', stops: Array<[number, T]> };
|
|
34
33
|
|
|
35
34
|
export type SourceFunctionSpecification<T> =
|
|
36
|
-
| {
|
|
37
|
-
| {
|
|
38
|
-
| {
|
|
39
|
-
| {
|
|
35
|
+
| { type: 'exponential', stops: Array<[number, T]>, property: string, default?: T }
|
|
36
|
+
| { type: 'interval', stops: Array<[number, T]>, property: string, default?: T }
|
|
37
|
+
| { type: 'categorical', stops: Array<[string | number | boolean, T]>, property: string, default?: T }
|
|
38
|
+
| { type: 'identity', property: string, default?: T };
|
|
40
39
|
|
|
41
40
|
export type CompositeFunctionSpecification<T> =
|
|
42
|
-
| {
|
|
43
|
-
| {
|
|
44
|
-
| {
|
|
41
|
+
| { type: 'exponential', stops: Array<[{zoom: number, value: number}, T]>, property: string, default?: T }
|
|
42
|
+
| { type: 'interval', stops: Array<[{zoom: number, value: number}, T]>, property: string, default?: T }
|
|
43
|
+
| { type: 'categorical', stops: Array<[{zoom: number, value: string | number | boolean}, T]>, property: string, default?: T };
|
|
45
44
|
|
|
46
|
-
export type ExpressionSpecification =
|
|
45
|
+
export type ExpressionSpecification = [string, ...any[]];
|
|
47
46
|
|
|
48
47
|
export type PropertyValueSpecification<T> =
|
|
49
48
|
| T
|
|
@@ -57,20 +56,21 @@ export type DataDrivenPropertyValueSpecification<T> =
|
|
|
57
56
|
| CompositeFunctionSpecification<T>
|
|
58
57
|
| ExpressionSpecification;
|
|
59
58
|
|
|
60
|
-
export type StyleSpecification = {
|
|
59
|
+
export type StyleSpecification = {
|
|
61
60
|
"version": 8,
|
|
62
61
|
"fragment"?: boolean,
|
|
63
62
|
"name"?: string,
|
|
64
|
-
"metadata"?:
|
|
63
|
+
"metadata"?: unknown,
|
|
65
64
|
"center"?: Array<number>,
|
|
66
65
|
"zoom"?: number,
|
|
67
66
|
"bearing"?: number,
|
|
68
67
|
"pitch"?: number,
|
|
69
68
|
"light"?: LightSpecification,
|
|
70
69
|
"lights"?: Array<LightsSpecification>,
|
|
71
|
-
"terrain"?:
|
|
70
|
+
"terrain"?: TerrainSpecification | null | undefined,
|
|
72
71
|
"fog"?: FogSpecification,
|
|
73
72
|
"camera"?: CameraSpecification,
|
|
73
|
+
"color-theme"?: ColorThemeSpecification,
|
|
74
74
|
"imports"?: Array<ImportSpecification>,
|
|
75
75
|
"schema"?: SchemaSpecification,
|
|
76
76
|
"sources": SourcesSpecification,
|
|
@@ -80,7 +80,7 @@ export type StyleSpecification = {|
|
|
|
80
80
|
"projection"?: ProjectionSpecification,
|
|
81
81
|
"layers": Array<LayerSpecification>,
|
|
82
82
|
"models"?: ModelsSpecification
|
|
83
|
-
|
|
83
|
+
}
|
|
84
84
|
|
|
85
85
|
export type SourcesSpecification = {
|
|
86
86
|
[_: string]: SourceSpecification
|
|
@@ -90,7 +90,7 @@ export type ModelsSpecification = {
|
|
|
90
90
|
[_: string]: ModelSpecification
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
export type LightSpecification = {
|
|
93
|
+
export type LightSpecification = {
|
|
94
94
|
"anchor"?: PropertyValueSpecification<"map" | "viewport">,
|
|
95
95
|
"position"?: PropertyValueSpecification<[number, number, number]>,
|
|
96
96
|
"position-transition"?: TransitionSpecification,
|
|
@@ -98,15 +98,15 @@ export type LightSpecification = {|
|
|
|
98
98
|
"color-transition"?: TransitionSpecification,
|
|
99
99
|
"intensity"?: PropertyValueSpecification<number>,
|
|
100
100
|
"intensity-transition"?: TransitionSpecification
|
|
101
|
-
|
|
101
|
+
}
|
|
102
102
|
|
|
103
|
-
export type TerrainSpecification = {
|
|
103
|
+
export type TerrainSpecification = {
|
|
104
104
|
"source": string,
|
|
105
105
|
"exaggeration"?: PropertyValueSpecification<number>,
|
|
106
106
|
"exaggeration-transition"?: TransitionSpecification
|
|
107
|
-
|
|
107
|
+
}
|
|
108
108
|
|
|
109
|
-
export type FogSpecification = {
|
|
109
|
+
export type FogSpecification = {
|
|
110
110
|
"range"?: PropertyValueSpecification<[number, number]>,
|
|
111
111
|
"range-transition"?: TransitionSpecification,
|
|
112
112
|
"color"?: PropertyValueSpecification<ColorSpecification>,
|
|
@@ -121,44 +121,48 @@ export type FogSpecification = {|
|
|
|
121
121
|
"star-intensity-transition"?: TransitionSpecification,
|
|
122
122
|
"vertical-range"?: PropertyValueSpecification<[number, number]>,
|
|
123
123
|
"vertical-range-transition"?: TransitionSpecification
|
|
124
|
-
|
|
124
|
+
}
|
|
125
125
|
|
|
126
|
-
export type CameraSpecification = {
|
|
126
|
+
export type CameraSpecification = {
|
|
127
127
|
"camera-projection"?: PropertyValueSpecification<"perspective" | "orthographic">,
|
|
128
128
|
"camera-projection-transition"?: TransitionSpecification
|
|
129
|
-
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type ColorThemeSpecification = {
|
|
132
|
+
"data"?: ExpressionSpecification
|
|
133
|
+
}
|
|
130
134
|
|
|
131
|
-
export type ProjectionSpecification = {
|
|
135
|
+
export type ProjectionSpecification = {
|
|
132
136
|
"name": "albers" | "equalEarth" | "equirectangular" | "lambertConformalConic" | "mercator" | "naturalEarth" | "winkelTripel" | "globe",
|
|
133
137
|
"center"?: [number, number],
|
|
134
138
|
"parallels"?: [number, number]
|
|
135
|
-
|
|
139
|
+
}
|
|
136
140
|
|
|
137
|
-
export type ImportSpecification = {
|
|
141
|
+
export type ImportSpecification = {
|
|
138
142
|
"id": string,
|
|
139
143
|
"url": string,
|
|
140
144
|
"config"?: ConfigSpecification,
|
|
141
145
|
"data"?: StyleSpecification
|
|
142
|
-
|
|
146
|
+
}
|
|
143
147
|
|
|
144
148
|
export type ConfigSpecification = {
|
|
145
|
-
[_: string]:
|
|
149
|
+
[_: string]: unknown
|
|
146
150
|
}
|
|
147
151
|
|
|
148
152
|
export type SchemaSpecification = {
|
|
149
153
|
[_: string]: OptionSpecification
|
|
150
154
|
}
|
|
151
155
|
|
|
152
|
-
export type OptionSpecification = {
|
|
153
|
-
"default":
|
|
156
|
+
export type OptionSpecification = {
|
|
157
|
+
"default": ExpressionSpecification,
|
|
154
158
|
"type"?: "string" | "number" | "boolean" | "color",
|
|
155
159
|
"array"?: boolean,
|
|
156
160
|
"minValue"?: number,
|
|
157
161
|
"maxValue"?: number,
|
|
158
162
|
"stepValue"?: number,
|
|
159
|
-
"values"?: Array<
|
|
160
|
-
"metadata"?:
|
|
161
|
-
|
|
163
|
+
"values"?: Array<unknown>,
|
|
164
|
+
"metadata"?: unknown
|
|
165
|
+
}
|
|
162
166
|
|
|
163
167
|
export type VectorSourceSpecification = {
|
|
164
168
|
"type": "vector",
|
|
@@ -171,7 +175,7 @@ export type VectorSourceSpecification = {
|
|
|
171
175
|
"attribution"?: string,
|
|
172
176
|
"promoteId"?: PromoteIdSpecification,
|
|
173
177
|
"volatile"?: boolean,
|
|
174
|
-
[_: string]:
|
|
178
|
+
[_: string]: unknown
|
|
175
179
|
}
|
|
176
180
|
|
|
177
181
|
export type RasterSourceSpecification = {
|
|
@@ -185,7 +189,7 @@ export type RasterSourceSpecification = {
|
|
|
185
189
|
"scheme"?: "xyz" | "tms",
|
|
186
190
|
"attribution"?: string,
|
|
187
191
|
"volatile"?: boolean,
|
|
188
|
-
[_: string]:
|
|
192
|
+
[_: string]: unknown
|
|
189
193
|
}
|
|
190
194
|
|
|
191
195
|
export type RasterDEMSourceSpecification = {
|
|
@@ -199,9 +203,12 @@ export type RasterDEMSourceSpecification = {
|
|
|
199
203
|
"attribution"?: string,
|
|
200
204
|
"encoding"?: "terrarium" | "mapbox",
|
|
201
205
|
"volatile"?: boolean,
|
|
202
|
-
[_: string]:
|
|
206
|
+
[_: string]: unknown
|
|
203
207
|
}
|
|
204
208
|
|
|
209
|
+
/**
|
|
210
|
+
* @experimental This is experimental and subject to change in future versions.
|
|
211
|
+
*/
|
|
205
212
|
export type RasterArraySourceSpecification = {
|
|
206
213
|
"type": "raster-array",
|
|
207
214
|
"url"?: string,
|
|
@@ -211,49 +218,49 @@ export type RasterArraySourceSpecification = {
|
|
|
211
218
|
"maxzoom"?: number,
|
|
212
219
|
"tileSize"?: number,
|
|
213
220
|
"attribution"?: string,
|
|
214
|
-
"rasterLayers"?:
|
|
221
|
+
"rasterLayers"?: unknown,
|
|
215
222
|
"volatile"?: boolean,
|
|
216
|
-
[_: string]:
|
|
223
|
+
[_: string]: unknown
|
|
217
224
|
}
|
|
218
225
|
|
|
219
|
-
export type GeoJSONSourceSpecification = {
|
|
226
|
+
export type GeoJSONSourceSpecification = {
|
|
220
227
|
"type": "geojson",
|
|
221
|
-
"data"?:
|
|
228
|
+
"data"?: GeoJSON.GeoJSON | string,
|
|
222
229
|
"maxzoom"?: number,
|
|
223
230
|
"minzoom"?: number,
|
|
224
231
|
"attribution"?: string,
|
|
225
232
|
"buffer"?: number,
|
|
226
|
-
"filter"?:
|
|
233
|
+
"filter"?: unknown,
|
|
227
234
|
"tolerance"?: number,
|
|
228
235
|
"cluster"?: boolean,
|
|
229
236
|
"clusterRadius"?: number,
|
|
230
237
|
"clusterMaxZoom"?: number,
|
|
231
238
|
"clusterMinPoints"?: number,
|
|
232
|
-
"clusterProperties"?:
|
|
239
|
+
"clusterProperties"?: unknown,
|
|
233
240
|
"lineMetrics"?: boolean,
|
|
234
241
|
"generateId"?: boolean,
|
|
235
242
|
"promoteId"?: PromoteIdSpecification,
|
|
236
243
|
"dynamic"?: boolean
|
|
237
|
-
|
|
244
|
+
}
|
|
238
245
|
|
|
239
|
-
export type VideoSourceSpecification = {
|
|
246
|
+
export type VideoSourceSpecification = {
|
|
240
247
|
"type": "video",
|
|
241
248
|
"urls": Array<string>,
|
|
242
249
|
"coordinates": [[number, number], [number, number], [number, number], [number, number]]
|
|
243
|
-
|
|
250
|
+
}
|
|
244
251
|
|
|
245
|
-
export type ImageSourceSpecification = {
|
|
252
|
+
export type ImageSourceSpecification = {
|
|
246
253
|
"type": "image",
|
|
247
254
|
"url"?: string,
|
|
248
255
|
"coordinates": [[number, number], [number, number], [number, number], [number, number]]
|
|
249
|
-
|
|
256
|
+
}
|
|
250
257
|
|
|
251
|
-
export type ModelSourceSpecification = {
|
|
258
|
+
export type ModelSourceSpecification = {
|
|
252
259
|
"type": "model" | "batched-model",
|
|
253
260
|
"maxzoom"?: number,
|
|
254
261
|
"minzoom"?: number,
|
|
255
262
|
"tiles"?: Array<string>
|
|
256
|
-
|
|
263
|
+
}
|
|
257
264
|
|
|
258
265
|
export type SourceSpecification =
|
|
259
266
|
| VectorSourceSpecification
|
|
@@ -267,20 +274,20 @@ export type SourceSpecification =
|
|
|
267
274
|
|
|
268
275
|
export type ModelSpecification = string;
|
|
269
276
|
|
|
270
|
-
export type AmbientLightSpecification = {
|
|
277
|
+
export type AmbientLightSpecification = {
|
|
271
278
|
"id": string,
|
|
272
|
-
"properties"?: {
|
|
279
|
+
"properties"?: {
|
|
273
280
|
"color"?: PropertyValueSpecification<ColorSpecification>,
|
|
274
281
|
"color-transition"?: TransitionSpecification,
|
|
275
282
|
"intensity"?: PropertyValueSpecification<number>,
|
|
276
283
|
"intensity-transition"?: TransitionSpecification
|
|
277
|
-
|
|
284
|
+
},
|
|
278
285
|
"type": "ambient"
|
|
279
|
-
|
|
286
|
+
}
|
|
280
287
|
|
|
281
|
-
export type DirectionalLightSpecification = {
|
|
288
|
+
export type DirectionalLightSpecification = {
|
|
282
289
|
"id": string,
|
|
283
|
-
"properties"?: {
|
|
290
|
+
"properties"?: {
|
|
284
291
|
"direction"?: PropertyValueSpecification<[number, number]>,
|
|
285
292
|
"direction-transition"?: TransitionSpecification,
|
|
286
293
|
"color"?: PropertyValueSpecification<ColorSpecification>,
|
|
@@ -290,13 +297,13 @@ export type DirectionalLightSpecification = {|
|
|
|
290
297
|
"cast-shadows"?: ExpressionSpecification,
|
|
291
298
|
"shadow-intensity"?: PropertyValueSpecification<number>,
|
|
292
299
|
"shadow-intensity-transition"?: TransitionSpecification
|
|
293
|
-
|
|
300
|
+
},
|
|
294
301
|
"type": "directional"
|
|
295
|
-
|
|
302
|
+
}
|
|
296
303
|
|
|
297
|
-
export type FlatLightSpecification = {
|
|
304
|
+
export type FlatLightSpecification = {
|
|
298
305
|
"id": string,
|
|
299
|
-
"properties"?: {
|
|
306
|
+
"properties"?: {
|
|
300
307
|
"anchor"?: PropertyValueSpecification<"map" | "viewport">,
|
|
301
308
|
"position"?: PropertyValueSpecification<[number, number, number]>,
|
|
302
309
|
"position-transition"?: TransitionSpecification,
|
|
@@ -304,30 +311,30 @@ export type FlatLightSpecification = {|
|
|
|
304
311
|
"color-transition"?: TransitionSpecification,
|
|
305
312
|
"intensity"?: PropertyValueSpecification<number>,
|
|
306
313
|
"intensity-transition"?: TransitionSpecification
|
|
307
|
-
|
|
314
|
+
},
|
|
308
315
|
"type": "flat"
|
|
309
|
-
|
|
316
|
+
}
|
|
310
317
|
|
|
311
318
|
export type LightsSpecification =
|
|
312
319
|
| AmbientLightSpecification
|
|
313
320
|
| DirectionalLightSpecification
|
|
314
321
|
| FlatLightSpecification;
|
|
315
322
|
|
|
316
|
-
export type FillLayerSpecification = {
|
|
323
|
+
export type FillLayerSpecification = {
|
|
317
324
|
"id": string,
|
|
318
325
|
"type": "fill",
|
|
319
|
-
"metadata"?:
|
|
326
|
+
"metadata"?: unknown,
|
|
320
327
|
"source": string,
|
|
321
328
|
"source-layer"?: string,
|
|
322
329
|
"slot"?: string,
|
|
323
330
|
"minzoom"?: number,
|
|
324
331
|
"maxzoom"?: number,
|
|
325
332
|
"filter"?: FilterSpecification,
|
|
326
|
-
"layout"?: {
|
|
333
|
+
"layout"?: {
|
|
327
334
|
"fill-sort-key"?: DataDrivenPropertyValueSpecification<number>,
|
|
328
|
-
"visibility"?: ExpressionSpecification
|
|
329
|
-
|
|
330
|
-
"paint"?: {
|
|
335
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification
|
|
336
|
+
},
|
|
337
|
+
"paint"?: {
|
|
331
338
|
"fill-antialias"?: PropertyValueSpecification<boolean>,
|
|
332
339
|
"fill-opacity"?: DataDrivenPropertyValueSpecification<number>,
|
|
333
340
|
"fill-opacity-transition"?: TransitionSpecification,
|
|
@@ -341,28 +348,42 @@ export type FillLayerSpecification = {|
|
|
|
341
348
|
"fill-pattern"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>,
|
|
342
349
|
"fill-emissive-strength"?: PropertyValueSpecification<number>,
|
|
343
350
|
"fill-emissive-strength-transition"?: TransitionSpecification
|
|
344
|
-
|
|
345
|
-
|
|
351
|
+
}
|
|
352
|
+
}
|
|
346
353
|
|
|
347
|
-
|
|
354
|
+
/**
|
|
355
|
+
* @deprecated Use `FillLayerSpecification['layout']` instead.
|
|
356
|
+
*/
|
|
357
|
+
export type FillLayout = FillLayerSpecification['layout'];
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* @deprecated Use `FillLayerSpecification['paint']` instead.
|
|
361
|
+
*/
|
|
362
|
+
export type FillPaint = FillLayerSpecification['paint'];
|
|
363
|
+
|
|
364
|
+
export type LineLayerSpecification = {
|
|
348
365
|
"id": string,
|
|
349
366
|
"type": "line",
|
|
350
|
-
"metadata"?:
|
|
367
|
+
"metadata"?: unknown,
|
|
351
368
|
"source": string,
|
|
352
369
|
"source-layer"?: string,
|
|
353
370
|
"slot"?: string,
|
|
354
371
|
"minzoom"?: number,
|
|
355
372
|
"maxzoom"?: number,
|
|
356
373
|
"filter"?: FilterSpecification,
|
|
357
|
-
"layout"?: {
|
|
374
|
+
"layout"?: {
|
|
358
375
|
"line-cap"?: DataDrivenPropertyValueSpecification<"butt" | "round" | "square">,
|
|
359
376
|
"line-join"?: DataDrivenPropertyValueSpecification<"bevel" | "round" | "miter" | "none">,
|
|
360
377
|
"line-miter-limit"?: PropertyValueSpecification<number>,
|
|
361
378
|
"line-round-limit"?: PropertyValueSpecification<number>,
|
|
362
379
|
"line-sort-key"?: DataDrivenPropertyValueSpecification<number>,
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
380
|
+
/**
|
|
381
|
+
* @experimental This property is experimental and subject to change in future versions.
|
|
382
|
+
*/
|
|
383
|
+
"line-z-offset"?: DataDrivenPropertyValueSpecification<number>,
|
|
384
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification
|
|
385
|
+
},
|
|
386
|
+
"paint"?: {
|
|
366
387
|
"line-opacity"?: DataDrivenPropertyValueSpecification<number>,
|
|
367
388
|
"line-opacity-transition"?: TransitionSpecification,
|
|
368
389
|
"line-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>,
|
|
@@ -387,21 +408,33 @@ export type LineLayerSpecification = {|
|
|
|
387
408
|
"line-border-width"?: DataDrivenPropertyValueSpecification<number>,
|
|
388
409
|
"line-border-width-transition"?: TransitionSpecification,
|
|
389
410
|
"line-border-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>,
|
|
390
|
-
"line-border-color-transition"?: TransitionSpecification
|
|
391
|
-
|
|
392
|
-
|
|
411
|
+
"line-border-color-transition"?: TransitionSpecification,
|
|
412
|
+
"line-occlusion-opacity"?: PropertyValueSpecification<number>,
|
|
413
|
+
"line-occlusion-opacity-transition"?: TransitionSpecification
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* @deprecated Use `LineLayerSpecification['layout']` instead.
|
|
419
|
+
*/
|
|
420
|
+
export type LineLayout = LineLayerSpecification['layout'];
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* @deprecated Use `LineLayerSpecification['paint']` instead.
|
|
424
|
+
*/
|
|
425
|
+
export type LinePaint = LineLayerSpecification['paint'];
|
|
393
426
|
|
|
394
|
-
export type SymbolLayerSpecification = {
|
|
427
|
+
export type SymbolLayerSpecification = {
|
|
395
428
|
"id": string,
|
|
396
429
|
"type": "symbol",
|
|
397
|
-
"metadata"?:
|
|
430
|
+
"metadata"?: unknown,
|
|
398
431
|
"source": string,
|
|
399
432
|
"source-layer"?: string,
|
|
400
433
|
"slot"?: string,
|
|
401
434
|
"minzoom"?: number,
|
|
402
435
|
"maxzoom"?: number,
|
|
403
436
|
"filter"?: FilterSpecification,
|
|
404
|
-
"layout"?: {
|
|
437
|
+
"layout"?: {
|
|
405
438
|
"symbol-placement"?: PropertyValueSpecification<"point" | "line" | "line-center">,
|
|
406
439
|
"symbol-spacing"?: PropertyValueSpecification<number>,
|
|
407
440
|
"symbol-avoid-edges"?: PropertyValueSpecification<boolean>,
|
|
@@ -444,11 +477,13 @@ export type SymbolLayerSpecification = {|
|
|
|
444
477
|
"text-allow-overlap"?: PropertyValueSpecification<boolean>,
|
|
445
478
|
"text-ignore-placement"?: PropertyValueSpecification<boolean>,
|
|
446
479
|
"text-optional"?: PropertyValueSpecification<boolean>,
|
|
447
|
-
"visibility"?: ExpressionSpecification
|
|
448
|
-
|
|
449
|
-
"paint"?: {
|
|
480
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification
|
|
481
|
+
},
|
|
482
|
+
"paint"?: {
|
|
450
483
|
"icon-opacity"?: DataDrivenPropertyValueSpecification<number>,
|
|
451
484
|
"icon-opacity-transition"?: TransitionSpecification,
|
|
485
|
+
"icon-occlusion-opacity"?: DataDrivenPropertyValueSpecification<number>,
|
|
486
|
+
"icon-occlusion-opacity-transition"?: TransitionSpecification,
|
|
452
487
|
"icon-emissive-strength"?: DataDrivenPropertyValueSpecification<number>,
|
|
453
488
|
"icon-emissive-strength-transition"?: TransitionSpecification,
|
|
454
489
|
"text-emissive-strength"?: DataDrivenPropertyValueSpecification<number>,
|
|
@@ -468,6 +503,8 @@ export type SymbolLayerSpecification = {|
|
|
|
468
503
|
"icon-image-cross-fade-transition"?: TransitionSpecification,
|
|
469
504
|
"text-opacity"?: DataDrivenPropertyValueSpecification<number>,
|
|
470
505
|
"text-opacity-transition"?: TransitionSpecification,
|
|
506
|
+
"text-occlusion-opacity"?: DataDrivenPropertyValueSpecification<number>,
|
|
507
|
+
"text-occlusion-opacity-transition"?: TransitionSpecification,
|
|
471
508
|
"text-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>,
|
|
472
509
|
"text-color-transition"?: TransitionSpecification,
|
|
473
510
|
"text-halo-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>,
|
|
@@ -483,24 +520,34 @@ export type SymbolLayerSpecification = {|
|
|
|
483
520
|
"icon-color-contrast"?: ExpressionSpecification,
|
|
484
521
|
"icon-color-brightness-min"?: ExpressionSpecification,
|
|
485
522
|
"icon-color-brightness-max"?: ExpressionSpecification
|
|
486
|
-
|
|
487
|
-
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* @deprecated Use `SymbolLayerSpecification['layout']` instead.
|
|
528
|
+
*/
|
|
529
|
+
export type SymbolLayout = SymbolLayerSpecification['layout'];
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* @deprecated Use `SymbolLayerSpecification['paint']` instead.
|
|
533
|
+
*/
|
|
534
|
+
export type SymbolPaint = SymbolLayerSpecification['paint'];
|
|
488
535
|
|
|
489
|
-
export type CircleLayerSpecification = {
|
|
536
|
+
export type CircleLayerSpecification = {
|
|
490
537
|
"id": string,
|
|
491
538
|
"type": "circle",
|
|
492
|
-
"metadata"?:
|
|
539
|
+
"metadata"?: unknown,
|
|
493
540
|
"source": string,
|
|
494
541
|
"source-layer"?: string,
|
|
495
542
|
"slot"?: string,
|
|
496
543
|
"minzoom"?: number,
|
|
497
544
|
"maxzoom"?: number,
|
|
498
545
|
"filter"?: FilterSpecification,
|
|
499
|
-
"layout"?: {
|
|
546
|
+
"layout"?: {
|
|
500
547
|
"circle-sort-key"?: DataDrivenPropertyValueSpecification<number>,
|
|
501
|
-
"visibility"?: ExpressionSpecification
|
|
502
|
-
|
|
503
|
-
"paint"?: {
|
|
548
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification
|
|
549
|
+
},
|
|
550
|
+
"paint"?: {
|
|
504
551
|
"circle-radius"?: DataDrivenPropertyValueSpecification<number>,
|
|
505
552
|
"circle-radius-transition"?: TransitionSpecification,
|
|
506
553
|
"circle-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>,
|
|
@@ -522,23 +569,33 @@ export type CircleLayerSpecification = {|
|
|
|
522
569
|
"circle-stroke-opacity-transition"?: TransitionSpecification,
|
|
523
570
|
"circle-emissive-strength"?: PropertyValueSpecification<number>,
|
|
524
571
|
"circle-emissive-strength-transition"?: TransitionSpecification
|
|
525
|
-
|
|
526
|
-
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* @deprecated Use `CircleLayerSpecification['layout']` instead.
|
|
577
|
+
*/
|
|
578
|
+
export type CircleLayout = CircleLayerSpecification['layout'];
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* @deprecated Use `CircleLayerSpecification['paint']` instead.
|
|
582
|
+
*/
|
|
583
|
+
export type CirclePaint = CircleLayerSpecification['paint'];
|
|
527
584
|
|
|
528
|
-
export type HeatmapLayerSpecification = {
|
|
585
|
+
export type HeatmapLayerSpecification = {
|
|
529
586
|
"id": string,
|
|
530
587
|
"type": "heatmap",
|
|
531
|
-
"metadata"?:
|
|
588
|
+
"metadata"?: unknown,
|
|
532
589
|
"source": string,
|
|
533
590
|
"source-layer"?: string,
|
|
534
591
|
"slot"?: string,
|
|
535
592
|
"minzoom"?: number,
|
|
536
593
|
"maxzoom"?: number,
|
|
537
594
|
"filter"?: FilterSpecification,
|
|
538
|
-
"layout"?: {
|
|
539
|
-
"visibility"?: ExpressionSpecification
|
|
540
|
-
|
|
541
|
-
"paint"?: {
|
|
595
|
+
"layout"?: {
|
|
596
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification
|
|
597
|
+
},
|
|
598
|
+
"paint"?: {
|
|
542
599
|
"heatmap-radius"?: DataDrivenPropertyValueSpecification<number>,
|
|
543
600
|
"heatmap-radius-transition"?: TransitionSpecification,
|
|
544
601
|
"heatmap-weight"?: DataDrivenPropertyValueSpecification<number>,
|
|
@@ -547,24 +604,37 @@ export type HeatmapLayerSpecification = {|
|
|
|
547
604
|
"heatmap-color"?: ExpressionSpecification,
|
|
548
605
|
"heatmap-opacity"?: PropertyValueSpecification<number>,
|
|
549
606
|
"heatmap-opacity-transition"?: TransitionSpecification
|
|
550
|
-
|
|
551
|
-
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* @deprecated Use `HeatmapLayerSpecification['layout']` instead.
|
|
612
|
+
*/
|
|
613
|
+
export type HeatmapLayout = HeatmapLayerSpecification['layout'];
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* @deprecated Use `HeatmapLayerSpecification['paint']` instead.
|
|
617
|
+
*/
|
|
618
|
+
export type HeatmapPaint = HeatmapLayerSpecification['paint'];
|
|
552
619
|
|
|
553
|
-
export type FillExtrusionLayerSpecification = {
|
|
620
|
+
export type FillExtrusionLayerSpecification = {
|
|
554
621
|
"id": string,
|
|
555
622
|
"type": "fill-extrusion",
|
|
556
|
-
"metadata"?:
|
|
623
|
+
"metadata"?: unknown,
|
|
557
624
|
"source": string,
|
|
558
625
|
"source-layer"?: string,
|
|
559
626
|
"slot"?: string,
|
|
560
627
|
"minzoom"?: number,
|
|
561
628
|
"maxzoom"?: number,
|
|
562
629
|
"filter"?: FilterSpecification,
|
|
563
|
-
"layout"?: {
|
|
564
|
-
"visibility"?: ExpressionSpecification,
|
|
630
|
+
"layout"?: {
|
|
631
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification,
|
|
632
|
+
/**
|
|
633
|
+
* @experimental This property is experimental and subject to change in future versions.
|
|
634
|
+
*/
|
|
565
635
|
"fill-extrusion-edge-radius"?: ExpressionSpecification
|
|
566
|
-
|
|
567
|
-
"paint"?: {
|
|
636
|
+
},
|
|
637
|
+
"paint"?: {
|
|
568
638
|
"fill-extrusion-opacity"?: PropertyValueSpecification<number>,
|
|
569
639
|
"fill-extrusion-opacity-transition"?: TransitionSpecification,
|
|
570
640
|
"fill-extrusion-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>,
|
|
@@ -600,27 +670,40 @@ export type FillExtrusionLayerSpecification = {|
|
|
|
600
670
|
"fill-extrusion-flood-light-ground-attenuation-transition"?: TransitionSpecification,
|
|
601
671
|
"fill-extrusion-vertical-scale"?: PropertyValueSpecification<number>,
|
|
602
672
|
"fill-extrusion-vertical-scale-transition"?: TransitionSpecification,
|
|
673
|
+
/**
|
|
674
|
+
* @experimental This property is experimental and subject to change in future versions.
|
|
675
|
+
*/
|
|
603
676
|
"fill-extrusion-rounded-roof"?: PropertyValueSpecification<boolean>,
|
|
604
677
|
"fill-extrusion-cutoff-fade-range"?: ExpressionSpecification,
|
|
605
678
|
"fill-extrusion-emissive-strength"?: PropertyValueSpecification<number>,
|
|
606
679
|
"fill-extrusion-emissive-strength-transition"?: TransitionSpecification
|
|
607
|
-
|
|
608
|
-
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* @deprecated Use `FillExtrusionLayerSpecification['layout']` instead.
|
|
685
|
+
*/
|
|
686
|
+
export type FillExtrusionLayout = FillExtrusionLayerSpecification['layout'];
|
|
609
687
|
|
|
610
|
-
|
|
688
|
+
/**
|
|
689
|
+
* @deprecated Use `FillExtrusionLayerSpecification['paint']` instead.
|
|
690
|
+
*/
|
|
691
|
+
export type FillExtrusionPaint = FillExtrusionLayerSpecification['paint'];
|
|
692
|
+
|
|
693
|
+
export type RasterLayerSpecification = {
|
|
611
694
|
"id": string,
|
|
612
695
|
"type": "raster",
|
|
613
|
-
"metadata"?:
|
|
696
|
+
"metadata"?: unknown,
|
|
614
697
|
"source": string,
|
|
615
698
|
"source-layer"?: string,
|
|
616
699
|
"slot"?: string,
|
|
617
700
|
"minzoom"?: number,
|
|
618
701
|
"maxzoom"?: number,
|
|
619
702
|
"filter"?: FilterSpecification,
|
|
620
|
-
"layout"?: {
|
|
621
|
-
"visibility"?: ExpressionSpecification
|
|
622
|
-
|
|
623
|
-
"paint"?: {
|
|
703
|
+
"layout"?: {
|
|
704
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification
|
|
705
|
+
},
|
|
706
|
+
"paint"?: {
|
|
624
707
|
"raster-opacity"?: PropertyValueSpecification<number>,
|
|
625
708
|
"raster-opacity-transition"?: TransitionSpecification,
|
|
626
709
|
"raster-color"?: ExpressionSpecification,
|
|
@@ -642,26 +725,39 @@ export type RasterLayerSpecification = {|
|
|
|
642
725
|
"raster-fade-duration"?: PropertyValueSpecification<number>,
|
|
643
726
|
"raster-emissive-strength"?: PropertyValueSpecification<number>,
|
|
644
727
|
"raster-emissive-strength-transition"?: TransitionSpecification,
|
|
728
|
+
/**
|
|
729
|
+
* @experimental This property is experimental and subject to change in future versions.
|
|
730
|
+
*/
|
|
645
731
|
"raster-array-band"?: string,
|
|
646
732
|
"raster-elevation"?: PropertyValueSpecification<number>,
|
|
647
733
|
"raster-elevation-transition"?: TransitionSpecification
|
|
648
|
-
|
|
649
|
-
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* @deprecated Use `RasterLayerSpecification['layout']` instead.
|
|
739
|
+
*/
|
|
740
|
+
export type RasterLayout = RasterLayerSpecification['layout'];
|
|
650
741
|
|
|
651
|
-
|
|
742
|
+
/**
|
|
743
|
+
* @deprecated Use `RasterLayerSpecification['paint']` instead.
|
|
744
|
+
*/
|
|
745
|
+
export type RasterPaint = RasterLayerSpecification['paint'];
|
|
746
|
+
|
|
747
|
+
export type RasterParticleLayerSpecification = {
|
|
652
748
|
"id": string,
|
|
653
749
|
"type": "raster-particle",
|
|
654
|
-
"metadata"?:
|
|
750
|
+
"metadata"?: unknown,
|
|
655
751
|
"source": string,
|
|
656
752
|
"source-layer"?: string,
|
|
657
753
|
"slot"?: string,
|
|
658
754
|
"minzoom"?: number,
|
|
659
755
|
"maxzoom"?: number,
|
|
660
756
|
"filter"?: FilterSpecification,
|
|
661
|
-
"layout"?: {
|
|
662
|
-
"visibility"?: ExpressionSpecification
|
|
663
|
-
|
|
664
|
-
"paint"?: {
|
|
757
|
+
"layout"?: {
|
|
758
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification
|
|
759
|
+
},
|
|
760
|
+
"paint"?: {
|
|
665
761
|
"raster-particle-array-band"?: string,
|
|
666
762
|
"raster-particle-count"?: number,
|
|
667
763
|
"raster-particle-color"?: ExpressionSpecification,
|
|
@@ -671,23 +767,33 @@ export type RasterParticleLayerSpecification = {|
|
|
|
671
767
|
"raster-particle-fade-opacity-factor"?: PropertyValueSpecification<number>,
|
|
672
768
|
"raster-particle-fade-opacity-factor-transition"?: TransitionSpecification,
|
|
673
769
|
"raster-particle-reset-rate-factor"?: number
|
|
674
|
-
|
|
675
|
-
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* @deprecated Use `RasterParticleLayerSpecification['layout']` instead.
|
|
775
|
+
*/
|
|
776
|
+
export type RasterParticleLayout = RasterParticleLayerSpecification['layout'];
|
|
676
777
|
|
|
677
|
-
|
|
778
|
+
/**
|
|
779
|
+
* @deprecated Use `RasterParticleLayerSpecification['paint']` instead.
|
|
780
|
+
*/
|
|
781
|
+
export type RasterParticlePaint = RasterParticleLayerSpecification['paint'];
|
|
782
|
+
|
|
783
|
+
export type HillshadeLayerSpecification = {
|
|
678
784
|
"id": string,
|
|
679
785
|
"type": "hillshade",
|
|
680
|
-
"metadata"?:
|
|
786
|
+
"metadata"?: unknown,
|
|
681
787
|
"source": string,
|
|
682
788
|
"source-layer"?: string,
|
|
683
789
|
"slot"?: string,
|
|
684
790
|
"minzoom"?: number,
|
|
685
791
|
"maxzoom"?: number,
|
|
686
792
|
"filter"?: FilterSpecification,
|
|
687
|
-
"layout"?: {
|
|
688
|
-
"visibility"?: ExpressionSpecification
|
|
689
|
-
|
|
690
|
-
"paint"?: {
|
|
793
|
+
"layout"?: {
|
|
794
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification
|
|
795
|
+
},
|
|
796
|
+
"paint"?: {
|
|
691
797
|
"hillshade-illumination-direction"?: PropertyValueSpecification<number>,
|
|
692
798
|
"hillshade-illumination-anchor"?: PropertyValueSpecification<"map" | "viewport">,
|
|
693
799
|
"hillshade-exaggeration"?: PropertyValueSpecification<number>,
|
|
@@ -700,24 +806,34 @@ export type HillshadeLayerSpecification = {|
|
|
|
700
806
|
"hillshade-accent-color-transition"?: TransitionSpecification,
|
|
701
807
|
"hillshade-emissive-strength"?: PropertyValueSpecification<number>,
|
|
702
808
|
"hillshade-emissive-strength-transition"?: TransitionSpecification
|
|
703
|
-
|
|
704
|
-
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* @deprecated Use `HillshadeLayerSpecification['layout']` instead.
|
|
814
|
+
*/
|
|
815
|
+
export type HillshadeLayout = HillshadeLayerSpecification['layout'];
|
|
705
816
|
|
|
706
|
-
|
|
817
|
+
/**
|
|
818
|
+
* @deprecated Use `HillshadeLayerSpecification['paint']` instead.
|
|
819
|
+
*/
|
|
820
|
+
export type HillshadePaint = HillshadeLayerSpecification['paint'];
|
|
821
|
+
|
|
822
|
+
export type ModelLayerSpecification = {
|
|
707
823
|
"id": string,
|
|
708
824
|
"type": "model",
|
|
709
|
-
"metadata"?:
|
|
825
|
+
"metadata"?: unknown,
|
|
710
826
|
"source": string,
|
|
711
827
|
"source-layer"?: string,
|
|
712
828
|
"slot"?: string,
|
|
713
829
|
"minzoom"?: number,
|
|
714
830
|
"maxzoom"?: number,
|
|
715
831
|
"filter"?: FilterSpecification,
|
|
716
|
-
"layout"?: {
|
|
717
|
-
"visibility"?: ExpressionSpecification,
|
|
832
|
+
"layout"?: {
|
|
833
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification,
|
|
718
834
|
"model-id"?: DataDrivenPropertyValueSpecification<string>
|
|
719
|
-
|
|
720
|
-
"paint"?: {
|
|
835
|
+
},
|
|
836
|
+
"paint"?: {
|
|
721
837
|
"model-opacity"?: PropertyValueSpecification<number>,
|
|
722
838
|
"model-opacity-transition"?: TransitionSpecification,
|
|
723
839
|
"model-rotation"?: DataDrivenPropertyValueSpecification<[number, number, number]>,
|
|
@@ -743,20 +859,33 @@ export type ModelLayerSpecification = {|
|
|
|
743
859
|
"model-height-based-emissive-strength-multiplier-transition"?: TransitionSpecification,
|
|
744
860
|
"model-cutoff-fade-range"?: ExpressionSpecification,
|
|
745
861
|
"model-front-cutoff"?: PropertyValueSpecification<[number, number, number]>
|
|
746
|
-
|
|
747
|
-
|
|
862
|
+
}
|
|
863
|
+
}
|
|
748
864
|
|
|
749
|
-
|
|
865
|
+
/**
|
|
866
|
+
* @deprecated Use `ModelLayerSpecification['layout']` instead.
|
|
867
|
+
*/
|
|
868
|
+
export type ModelLayout = ModelLayerSpecification['layout'];
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* @deprecated Use `ModelLayerSpecification['paint']` instead.
|
|
872
|
+
*/
|
|
873
|
+
export type ModelPaint = ModelLayerSpecification['paint'];
|
|
874
|
+
|
|
875
|
+
export type BackgroundLayerSpecification = {
|
|
750
876
|
"id": string,
|
|
751
877
|
"type": "background",
|
|
752
|
-
"metadata"?:
|
|
878
|
+
"metadata"?: unknown,
|
|
879
|
+
"source"?: never,
|
|
880
|
+
"source-layer"?: never,
|
|
753
881
|
"slot"?: string,
|
|
754
882
|
"minzoom"?: number,
|
|
755
883
|
"maxzoom"?: number,
|
|
756
|
-
"
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
884
|
+
"filter"?: never,
|
|
885
|
+
"layout"?: {
|
|
886
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification
|
|
887
|
+
},
|
|
888
|
+
"paint"?: {
|
|
760
889
|
"background-color"?: PropertyValueSpecification<ColorSpecification>,
|
|
761
890
|
"background-color-transition"?: TransitionSpecification,
|
|
762
891
|
"background-pattern"?: PropertyValueSpecification<ResolvedImageSpecification>,
|
|
@@ -764,20 +893,33 @@ export type BackgroundLayerSpecification = {|
|
|
|
764
893
|
"background-opacity-transition"?: TransitionSpecification,
|
|
765
894
|
"background-emissive-strength"?: PropertyValueSpecification<number>,
|
|
766
895
|
"background-emissive-strength-transition"?: TransitionSpecification
|
|
767
|
-
|
|
768
|
-
|
|
896
|
+
}
|
|
897
|
+
}
|
|
769
898
|
|
|
770
|
-
|
|
899
|
+
/**
|
|
900
|
+
* @deprecated Use `BackgroundLayerSpecification['layout']` instead.
|
|
901
|
+
*/
|
|
902
|
+
export type BackgroundLayout = BackgroundLayerSpecification['layout'];
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* @deprecated Use `BackgroundLayerSpecification['paint']` instead.
|
|
906
|
+
*/
|
|
907
|
+
export type BackgroundPaint = BackgroundLayerSpecification['paint'];
|
|
908
|
+
|
|
909
|
+
export type SkyLayerSpecification = {
|
|
771
910
|
"id": string,
|
|
772
911
|
"type": "sky",
|
|
773
|
-
"metadata"?:
|
|
912
|
+
"metadata"?: unknown,
|
|
913
|
+
"source"?: never,
|
|
914
|
+
"source-layer"?: never,
|
|
774
915
|
"slot"?: string,
|
|
775
916
|
"minzoom"?: number,
|
|
776
917
|
"maxzoom"?: number,
|
|
777
|
-
"
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
918
|
+
"filter"?: never,
|
|
919
|
+
"layout"?: {
|
|
920
|
+
"visibility"?: "visible" | "none" | ExpressionSpecification
|
|
921
|
+
},
|
|
922
|
+
"paint"?: {
|
|
781
923
|
"sky-type"?: PropertyValueSpecification<"gradient" | "atmosphere">,
|
|
782
924
|
"sky-atmosphere-sun"?: PropertyValueSpecification<[number, number]>,
|
|
783
925
|
"sky-atmosphere-sun-intensity"?: number,
|
|
@@ -788,15 +930,56 @@ export type SkyLayerSpecification = {|
|
|
|
788
930
|
"sky-atmosphere-color"?: ColorSpecification,
|
|
789
931
|
"sky-opacity"?: PropertyValueSpecification<number>,
|
|
790
932
|
"sky-opacity-transition"?: TransitionSpecification
|
|
791
|
-
|
|
792
|
-
|
|
933
|
+
}
|
|
934
|
+
}
|
|
793
935
|
|
|
794
|
-
|
|
936
|
+
/**
|
|
937
|
+
* @deprecated Use `SkyLayerSpecification['layout']` instead.
|
|
938
|
+
*/
|
|
939
|
+
export type SkyLayout = SkyLayerSpecification['layout'];
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* @deprecated Use `SkyLayerSpecification['paint']` instead.
|
|
943
|
+
*/
|
|
944
|
+
export type SkyPaint = SkyLayerSpecification['paint'];
|
|
945
|
+
|
|
946
|
+
export type SlotLayerSpecification = {
|
|
795
947
|
"id": string,
|
|
796
948
|
"type": "slot",
|
|
797
|
-
"metadata"?:
|
|
798
|
-
"
|
|
799
|
-
|
|
949
|
+
"metadata"?: unknown,
|
|
950
|
+
"source"?: never,
|
|
951
|
+
"source-layer"?: never,
|
|
952
|
+
"slot"?: string,
|
|
953
|
+
"minzoom"?: never,
|
|
954
|
+
"maxzoom"?: never,
|
|
955
|
+
"filter"?: never,
|
|
956
|
+
"layout"?: never,
|
|
957
|
+
"paint"?: never
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
export type ClipLayerSpecification = {
|
|
961
|
+
"id": string,
|
|
962
|
+
"type": "clip",
|
|
963
|
+
"metadata"?: unknown,
|
|
964
|
+
"source": string,
|
|
965
|
+
"source-layer"?: string,
|
|
966
|
+
"slot"?: string,
|
|
967
|
+
"minzoom"?: number,
|
|
968
|
+
"maxzoom"?: number,
|
|
969
|
+
"filter"?: FilterSpecification,
|
|
970
|
+
"layout"?: {
|
|
971
|
+
/**
|
|
972
|
+
* @experimental This property is experimental and subject to change in future versions.
|
|
973
|
+
*/
|
|
974
|
+
"clip-layer-types"?: ExpressionSpecification
|
|
975
|
+
},
|
|
976
|
+
"paint"?: never
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* @deprecated Use `ClipLayerSpecification['layout']` instead.
|
|
981
|
+
*/
|
|
982
|
+
export type ClipLayout = ClipLayerSpecification['layout'];
|
|
800
983
|
|
|
801
984
|
export type LayerSpecification =
|
|
802
985
|
| FillLayerSpecification
|
|
@@ -811,5 +994,162 @@ export type LayerSpecification =
|
|
|
811
994
|
| ModelLayerSpecification
|
|
812
995
|
| BackgroundLayerSpecification
|
|
813
996
|
| SkyLayerSpecification
|
|
814
|
-
| SlotLayerSpecification
|
|
997
|
+
| SlotLayerSpecification
|
|
998
|
+
| ClipLayerSpecification;
|
|
999
|
+
|
|
1000
|
+
// Aliases for easier migration from @types/mapbox-gl
|
|
1001
|
+
|
|
1002
|
+
export type Layer = Pick<
|
|
1003
|
+
LayerSpecification,
|
|
1004
|
+
| "id"
|
|
1005
|
+
| "type"
|
|
1006
|
+
| "source"
|
|
1007
|
+
| "source-layer"
|
|
1008
|
+
| "slot"
|
|
1009
|
+
| "filter"
|
|
1010
|
+
| "layout"
|
|
1011
|
+
| "paint"
|
|
1012
|
+
| "minzoom"
|
|
1013
|
+
| "maxzoom"
|
|
1014
|
+
| "metadata"
|
|
1015
|
+
>;
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* @deprecated Use `StyleSpecification` instead.
|
|
1019
|
+
*/
|
|
1020
|
+
export type Style = StyleSpecification;
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* @deprecated Use `LayerSpecification` instead.
|
|
1024
|
+
*/
|
|
1025
|
+
export type AnyLayer = LayerSpecification;
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* @deprecated Use `FillLayerSpecification` instead.
|
|
1029
|
+
*/
|
|
1030
|
+
export type FillLayer = FillLayerSpecification;
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* @deprecated Use `LineLayerSpecification` instead.
|
|
1034
|
+
*/
|
|
1035
|
+
export type LineLayer = LineLayerSpecification;
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* @deprecated Use `SymbolLayerSpecification` instead.
|
|
1039
|
+
*/
|
|
1040
|
+
export type SymbolLayer = SymbolLayerSpecification;
|
|
1041
|
+
|
|
1042
|
+
/**
|
|
1043
|
+
* @deprecated Use `CircleLayerSpecification` instead.
|
|
1044
|
+
*/
|
|
1045
|
+
export type CircleLayer = CircleLayerSpecification;
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* @deprecated Use `HeatmapLayerSpecification` instead.
|
|
1049
|
+
*/
|
|
1050
|
+
export type HeatmapLayer = HeatmapLayerSpecification;
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* @deprecated Use `FillExtrusionLayerSpecification` instead.
|
|
1054
|
+
*/
|
|
1055
|
+
export type FillExtrusionLayer = FillExtrusionLayerSpecification;
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* @deprecated Use `RasterLayerSpecification` instead.
|
|
1059
|
+
*/
|
|
1060
|
+
export type RasterLayer = RasterLayerSpecification;
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* @deprecated Use `RasterParticleLayerSpecification` instead.
|
|
1064
|
+
*/
|
|
1065
|
+
export type RasterParticleLayer = RasterParticleLayerSpecification;
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* @deprecated Use `HillshadeLayerSpecification` instead.
|
|
1069
|
+
*/
|
|
1070
|
+
export type HillshadeLayer = HillshadeLayerSpecification;
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* @deprecated Use `ModelLayerSpecification` instead.
|
|
1074
|
+
*/
|
|
1075
|
+
export type ModelLayer = ModelLayerSpecification;
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* @deprecated Use `BackgroundLayerSpecification` instead.
|
|
1079
|
+
*/
|
|
1080
|
+
export type BackgroundLayer = BackgroundLayerSpecification;
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* @deprecated Use `SkyLayerSpecification` instead.
|
|
1084
|
+
*/
|
|
1085
|
+
export type SkyLayer = SkyLayerSpecification;
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* @deprecated Use `SlotLayerSpecification` instead.
|
|
1089
|
+
*/
|
|
1090
|
+
export type SlotLayer = SlotLayerSpecification;
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* @deprecated Use `ClipLayerSpecification` instead.
|
|
1094
|
+
*/
|
|
1095
|
+
export type ClipLayer = ClipLayerSpecification;
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* @deprecated
|
|
1099
|
+
*/
|
|
1100
|
+
export type AnyLayout =
|
|
1101
|
+
| FillLayout
|
|
1102
|
+
| LineLayout
|
|
1103
|
+
| SymbolLayout
|
|
1104
|
+
| CircleLayout
|
|
1105
|
+
| HeatmapLayout
|
|
1106
|
+
| FillExtrusionLayout
|
|
1107
|
+
| RasterLayout
|
|
1108
|
+
| RasterParticleLayout
|
|
1109
|
+
| HillshadeLayout
|
|
1110
|
+
| ModelLayout
|
|
1111
|
+
| BackgroundLayout
|
|
1112
|
+
| SkyLayout
|
|
1113
|
+
| ClipLayout;
|
|
1114
|
+
|
|
1115
|
+
/**
|
|
1116
|
+
* @deprecated
|
|
1117
|
+
*/
|
|
1118
|
+
export type AnyPaint =
|
|
1119
|
+
| FillPaint
|
|
1120
|
+
| LinePaint
|
|
1121
|
+
| SymbolPaint
|
|
1122
|
+
| CirclePaint
|
|
1123
|
+
| HeatmapPaint
|
|
1124
|
+
| FillExtrusionPaint
|
|
1125
|
+
| RasterPaint
|
|
1126
|
+
| RasterParticlePaint
|
|
1127
|
+
| HillshadePaint
|
|
1128
|
+
| ModelPaint
|
|
1129
|
+
| BackgroundPaint
|
|
1130
|
+
| SkyPaint;
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* @deprecated Use `ExpressionSpecification` instead.
|
|
1134
|
+
*/
|
|
1135
|
+
export type Expression = ExpressionSpecification;
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* @deprecated Use `TransitionSpecification` instead.
|
|
1139
|
+
*/
|
|
1140
|
+
export type Transition = TransitionSpecification;
|
|
1141
|
+
|
|
1142
|
+
/**
|
|
1143
|
+
* @deprecated Use `SourceSpecification` instead.
|
|
1144
|
+
*/
|
|
1145
|
+
export type AnySourceData = SourceSpecification;
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* @deprecated Use `SourcesSpecification` instead.
|
|
1149
|
+
*/
|
|
1150
|
+
export type Sources = SourcesSpecification;
|
|
815
1151
|
|
|
1152
|
+
/**
|
|
1153
|
+
* @deprecated Use `ProjectionSpecification` instead.
|
|
1154
|
+
*/
|
|
1155
|
+
export type Projection = ProjectionSpecification;
|