@mapbox/mapbox-gl-style-spec 14.0.0-beta.1 → 14.0.0-beta.3
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/LICENSE.txt +47 -0
- package/README.md +7 -0
- package/bin/gl-style-composite.js +2 -2
- package/bin/gl-style-format.js +2 -2
- package/bin/gl-style-migrate.js +2 -2
- package/bin/gl-style-validate.js +2 -2
- package/diff.js +25 -2
- package/dist/index.cjs +172 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +172 -14
- package/dist/index.es.js.map +1 -1
- package/flow-typed/gl-matrix.js +2 -1
- package/flow-typed/gl.js +1 -1
- package/flow-typed/webgl2.js +20 -0
- package/package.json +2 -2
- package/reference/v8.json +133 -19
- package/types.js +7 -3
- package/validate/validate_property.js +1 -1
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Copyright © 2021 - 2023 Mapbox, Inc. All rights reserved.
|
|
2
|
+
|
|
3
|
+
The software and files in this repository (collectively, "Software") are
|
|
4
|
+
licensed under the Mapbox TOS for use only with the relevant Mapbox product(s)
|
|
5
|
+
listed at www.mapbox.com/pricing. This license allows developers with a
|
|
6
|
+
current active Mapbox account to use and modify the authorized portions of the
|
|
7
|
+
Software as needed for use only with the relevant Mapbox product(s) through
|
|
8
|
+
their Mapbox account in accordance with the Mapbox TOS. This license
|
|
9
|
+
terminates automatically if a developer no longer has a Mapbox account in good
|
|
10
|
+
standing or breaches the Mapbox TOS. For the license terms, please see the
|
|
11
|
+
Mapbox TOS at https://www.mapbox.com/legal/tos/ which incorporates the Mapbox
|
|
12
|
+
Product Terms at www.mapbox.com/legal/service-terms. If this Software is a
|
|
13
|
+
SDK, modifications that change or interfere with marked portions of the code
|
|
14
|
+
related to billing, accounting, or data collection are not authorized and the
|
|
15
|
+
SDK sends limited de-identified location and usage data which is used in
|
|
16
|
+
accordance with the Mapbox TOS. [Updated 2023-01]
|
|
17
|
+
|
|
18
|
+
-------------------------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
Contains code from mapbox-gl-js v1.13 and earlier
|
|
21
|
+
|
|
22
|
+
Version v1.13 of mapbox-gl-js and earlier are licensed under a BSD-3-Clause license
|
|
23
|
+
|
|
24
|
+
Copyright (c) 2020, Mapbox
|
|
25
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
26
|
+
are permitted provided that the following conditions are met:
|
|
27
|
+
|
|
28
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
29
|
+
this list of conditions and the following disclaimer.
|
|
30
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
31
|
+
this list of conditions and the following disclaimer in the documentation
|
|
32
|
+
and/or other materials provided with the distribution.
|
|
33
|
+
* Neither the name of Mapbox GL JS nor the names of its contributors
|
|
34
|
+
may be used to endorse or promote products derived from this software
|
|
35
|
+
without specific prior written permission.
|
|
36
|
+
|
|
37
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
38
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
39
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
40
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
41
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
42
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
43
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
44
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
45
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
46
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
47
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
CHANGED
|
@@ -57,3 +57,10 @@ Will validate the given style JSON and print errors to stdout. Provide a
|
|
|
57
57
|
`--json` flag to get JSON output.
|
|
58
58
|
|
|
59
59
|
To validate that a style can be uploaded to the Mapbox Styles API, use the `--mapbox-api-supported` flag.
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
This project uses the standard Mapbox license, which is designed to provide flexibility for our customers and a sustained foundation for the development of our technology. Please consult LICENSE.txt for its specific details.
|
|
64
|
+
|
|
65
|
+
We understand that the Mapbox Style Specification embodied in this module may be useful in a wide variety of projects. If you are interested in using this module in a manner not expressly permitted by its license, please do not hesitate to contact legal@mapbox.com with details of what you have in mind.
|
|
66
|
+
```
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import fs from 'fs';
|
|
7
7
|
import minimist from 'minimist';
|
|
8
8
|
|
|
9
|
-
/* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec
|
|
9
|
+
/* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec$'] }] */
|
|
10
10
|
/* $FlowFixMe[cannot-resolve-module] */
|
|
11
|
-
import {format, composite} from '@mapbox/mapbox-gl-style-spec
|
|
11
|
+
import {format, composite} from '@mapbox/mapbox-gl-style-spec';
|
|
12
12
|
|
|
13
13
|
const argv = minimist(process.argv.slice(2));
|
|
14
14
|
|
package/bin/gl-style-format.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import fs from 'fs';
|
|
7
7
|
import minimist from 'minimist';
|
|
8
8
|
|
|
9
|
-
/* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec
|
|
9
|
+
/* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec$'] }] */
|
|
10
10
|
/* $FlowFixMe[cannot-resolve-module] */
|
|
11
|
-
import {format} from '@mapbox/mapbox-gl-style-spec
|
|
11
|
+
import {format} from '@mapbox/mapbox-gl-style-spec';
|
|
12
12
|
|
|
13
13
|
const argv = minimist(process.argv.slice(2));
|
|
14
14
|
|
package/bin/gl-style-migrate.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import fs from 'fs';
|
|
7
7
|
import minimist from 'minimist';
|
|
8
8
|
|
|
9
|
-
/* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec
|
|
9
|
+
/* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec$'] }] */
|
|
10
10
|
/* $FlowFixMe[cannot-resolve-module] */
|
|
11
|
-
import {format, migrate} from '@mapbox/mapbox-gl-style-spec
|
|
11
|
+
import {format, migrate} from '@mapbox/mapbox-gl-style-spec';
|
|
12
12
|
|
|
13
13
|
const argv = minimist(process.argv.slice(2));
|
|
14
14
|
|
package/bin/gl-style-validate.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import rw from 'rw';
|
|
7
7
|
import minimist from 'minimist';
|
|
8
8
|
|
|
9
|
-
/* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec
|
|
9
|
+
/* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec$'] }] */
|
|
10
10
|
/* $FlowFixMe[cannot-resolve-module] */
|
|
11
|
-
import {validate, validateMapboxApiSupported} from '@mapbox/mapbox-gl-style-spec
|
|
11
|
+
import {validate, validateMapboxApiSupported} from '@mapbox/mapbox-gl-style-spec';
|
|
12
12
|
|
|
13
13
|
const argv = minimist(process.argv.slice(2), {
|
|
14
14
|
boolean: ['json', 'mapbox-api-supported'],
|
package/diff.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import isEqual from './util/deep_equal.js';
|
|
4
4
|
|
|
5
|
-
import type {StyleSpecification, SourceSpecification, LayerSpecification} from './types.js';
|
|
5
|
+
import type {StyleSpecification, ImportSpecification, SourceSpecification, LayerSpecification} from './types.js';
|
|
6
6
|
|
|
7
7
|
type Sources = { [string]: SourceSpecification };
|
|
8
8
|
|
|
@@ -131,7 +131,17 @@ export const operations: {[_: string]: string} = {
|
|
|
131
131
|
/*
|
|
132
132
|
* { command: 'setProjection', args: [projectionProperties] }
|
|
133
133
|
*/
|
|
134
|
-
setProjection: 'setProjection'
|
|
134
|
+
setProjection: 'setProjection',
|
|
135
|
+
|
|
136
|
+
/*
|
|
137
|
+
* { command: 'addImport', args: [importProperties] }
|
|
138
|
+
*/
|
|
139
|
+
addImport: 'addImport',
|
|
140
|
+
|
|
141
|
+
/*
|
|
142
|
+
* { command: 'removeImport', args: [importId] }
|
|
143
|
+
*/
|
|
144
|
+
removeImport: 'removeImport'
|
|
135
145
|
};
|
|
136
146
|
|
|
137
147
|
function addSource(sourceId: string, after: Sources, commands: Array<Command>) {
|
|
@@ -335,6 +345,17 @@ function diffLayers(before: Array<LayerSpecification>, after: Array<LayerSpecifi
|
|
|
335
345
|
}
|
|
336
346
|
}
|
|
337
347
|
|
|
348
|
+
function diffImports(before: Array<ImportSpecification> = [], after: Array<ImportSpecification> = [], commands: Array<Command>) {
|
|
349
|
+
// no diff for the imports, must remove then add
|
|
350
|
+
for (const beforeImport of before) {
|
|
351
|
+
commands.push({command: operations.removeImport, args: [beforeImport.id]});
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
for (const afterImport of after) {
|
|
355
|
+
commands.push({command: operations.addImport, args: [afterImport]});
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
338
359
|
/**
|
|
339
360
|
* Diff two stylesheet
|
|
340
361
|
*
|
|
@@ -445,6 +466,8 @@ export default function diffStyles(before: StyleSpecification, after: StyleSpeci
|
|
|
445
466
|
// Handle changes to `layers`
|
|
446
467
|
diffLayers(beforeLayers, after.layers, commands);
|
|
447
468
|
|
|
469
|
+
// Handle changes to `imports`
|
|
470
|
+
diffImports(before.imports, after.imports, commands);
|
|
448
471
|
} catch (e) {
|
|
449
472
|
// fall back to setStyle
|
|
450
473
|
console.warn('Unable to compute style diff:', e);
|
package/dist/index.cjs
CHANGED
|
@@ -153,6 +153,7 @@
|
|
|
153
153
|
glyphs: {
|
|
154
154
|
type: "string",
|
|
155
155
|
doc: "A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",
|
|
156
|
+
"default": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
|
|
156
157
|
example: "mapbox://fonts/mapbox/{fontstack}/{range}.pbf"
|
|
157
158
|
},
|
|
158
159
|
transition: {
|
|
@@ -290,6 +291,14 @@
|
|
|
290
291
|
210,
|
|
291
292
|
30
|
|
292
293
|
],
|
|
294
|
+
minimum: [
|
|
295
|
+
0,
|
|
296
|
+
0
|
|
297
|
+
],
|
|
298
|
+
maximum: [
|
|
299
|
+
360,
|
|
300
|
+
90
|
|
301
|
+
],
|
|
293
302
|
length: 2,
|
|
294
303
|
value: "number",
|
|
295
304
|
"property-type": "data-constant",
|
|
@@ -303,7 +312,7 @@
|
|
|
303
312
|
doc: "Direction of the light source specified as [a azimuthal angle, p polar angle] where a indicates the azimuthal angle of the light relative to north (in degrees and proceeding clockwise), and p indicates polar angle of the light (from 0°, directly above, to 180°, directly below).",
|
|
304
313
|
example: [
|
|
305
314
|
90,
|
|
306
|
-
|
|
315
|
+
40
|
|
307
316
|
]
|
|
308
317
|
},
|
|
309
318
|
color: {
|
|
@@ -1726,6 +1735,37 @@
|
|
|
1726
1735
|
},
|
|
1727
1736
|
"property-type": "data-constant"
|
|
1728
1737
|
},
|
|
1738
|
+
"symbol-z-elevate": {
|
|
1739
|
+
type: "boolean",
|
|
1740
|
+
"default": false,
|
|
1741
|
+
doc: "Position symbol on buildings (both fill extrusions and models) roof tops. In order to have minimal impact on performance, this is supported only when `fill-extrusion-height` is not zoom-dependent and not edited after initial bucket creation. For fading in buildings when zooming in, fill-extrusion-vertical-scale should be used and symbols would raise with building roofs. Symbols are sorted by elevation, except in case when `viewport-y` sorting or `symbol-sort-key` are applied.",
|
|
1742
|
+
"sdk-support": {
|
|
1743
|
+
"basic functionality": {
|
|
1744
|
+
js: "3.0.0",
|
|
1745
|
+
android: "11.0.0",
|
|
1746
|
+
ios: "11.0.0"
|
|
1747
|
+
}
|
|
1748
|
+
},
|
|
1749
|
+
requires: [
|
|
1750
|
+
{
|
|
1751
|
+
"symbol-placement": [
|
|
1752
|
+
"point"
|
|
1753
|
+
]
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
"symbol-z-order": [
|
|
1757
|
+
"auto"
|
|
1758
|
+
]
|
|
1759
|
+
}
|
|
1760
|
+
],
|
|
1761
|
+
expression: {
|
|
1762
|
+
interpolated: false,
|
|
1763
|
+
parameters: [
|
|
1764
|
+
"zoom"
|
|
1765
|
+
]
|
|
1766
|
+
},
|
|
1767
|
+
"property-type": "data-constant"
|
|
1768
|
+
},
|
|
1729
1769
|
"icon-allow-overlap": {
|
|
1730
1770
|
type: "boolean",
|
|
1731
1771
|
"default": false,
|
|
@@ -4567,6 +4607,34 @@
|
|
|
4567
4607
|
ios: "10.6.0"
|
|
4568
4608
|
}
|
|
4569
4609
|
}
|
|
4610
|
+
},
|
|
4611
|
+
"vertical-range": {
|
|
4612
|
+
type: "array",
|
|
4613
|
+
"default": [
|
|
4614
|
+
0,
|
|
4615
|
+
0
|
|
4616
|
+
],
|
|
4617
|
+
minimum: 0,
|
|
4618
|
+
length: 2,
|
|
4619
|
+
value: "number",
|
|
4620
|
+
"property-type": "data-constant",
|
|
4621
|
+
transition: true,
|
|
4622
|
+
expression: {
|
|
4623
|
+
interpolated: true,
|
|
4624
|
+
parameters: [
|
|
4625
|
+
"zoom",
|
|
4626
|
+
"measure-light"
|
|
4627
|
+
],
|
|
4628
|
+
relaxZoomRestriction: true
|
|
4629
|
+
},
|
|
4630
|
+
doc: "Specify the vertical range, measured in meters, over which the fog should gradually fade out. When both parameters are set to zero, the fog will be rendered without any vertical constraints.",
|
|
4631
|
+
"sdk-support": {
|
|
4632
|
+
"basic functionality": {
|
|
4633
|
+
js: "3.0.0",
|
|
4634
|
+
android: "11.0.0",
|
|
4635
|
+
ios: "11.0.0"
|
|
4636
|
+
}
|
|
4637
|
+
}
|
|
4570
4638
|
}
|
|
4571
4639
|
};
|
|
4572
4640
|
var camera = {
|
|
@@ -5082,7 +5150,7 @@
|
|
|
5082
5150
|
minimum: 0,
|
|
5083
5151
|
transition: true,
|
|
5084
5152
|
units: "intensity",
|
|
5085
|
-
doc: "
|
|
5153
|
+
doc: "Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when `lights` root property is defined.",
|
|
5086
5154
|
"sdk-support": {
|
|
5087
5155
|
"basic functionality": {
|
|
5088
5156
|
js: "3.0.0",
|
|
@@ -5414,7 +5482,28 @@
|
|
|
5414
5482
|
},
|
|
5415
5483
|
"line-gradient": {
|
|
5416
5484
|
type: "color",
|
|
5417
|
-
doc: "
|
|
5485
|
+
doc: "A gradient used to color a line feature at various distances along its length. Defined using a `step` or `interpolate` expression which outputs a color for each corresponding `line-progress` input value. `line-progress` is a percentage of the line feature's total length as measured on the webmercator projected coordinate plane (a `number` between `0` and `1`). Can only be used with GeoJSON sources that specify `\"lineMetrics\": true`.",
|
|
5486
|
+
example: [
|
|
5487
|
+
"interpolate",
|
|
5488
|
+
[
|
|
5489
|
+
"linear"
|
|
5490
|
+
],
|
|
5491
|
+
[
|
|
5492
|
+
"line-progress"
|
|
5493
|
+
],
|
|
5494
|
+
0,
|
|
5495
|
+
"blue",
|
|
5496
|
+
0.1,
|
|
5497
|
+
"royalblue",
|
|
5498
|
+
0.3,
|
|
5499
|
+
"cyan",
|
|
5500
|
+
0.5,
|
|
5501
|
+
"lime",
|
|
5502
|
+
0.7,
|
|
5503
|
+
"yellow",
|
|
5504
|
+
1,
|
|
5505
|
+
"red"
|
|
5506
|
+
],
|
|
5418
5507
|
transition: false,
|
|
5419
5508
|
requires: [
|
|
5420
5509
|
{
|
|
@@ -5487,7 +5576,7 @@
|
|
|
5487
5576
|
minimum: 0,
|
|
5488
5577
|
transition: true,
|
|
5489
5578
|
units: "intensity",
|
|
5490
|
-
doc: "
|
|
5579
|
+
doc: "Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when `lights` root property is defined.",
|
|
5491
5580
|
"sdk-support": {
|
|
5492
5581
|
"basic functionality": {
|
|
5493
5582
|
js: "3.0.0",
|
|
@@ -5901,7 +5990,7 @@
|
|
|
5901
5990
|
minimum: 0,
|
|
5902
5991
|
transition: true,
|
|
5903
5992
|
units: "intensity",
|
|
5904
|
-
doc: "
|
|
5993
|
+
doc: "Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when `lights` root property is defined.",
|
|
5905
5994
|
"sdk-support": {
|
|
5906
5995
|
"basic functionality": {
|
|
5907
5996
|
js: "3.0.0",
|
|
@@ -6114,7 +6203,7 @@
|
|
|
6114
6203
|
minimum: 0,
|
|
6115
6204
|
transition: true,
|
|
6116
6205
|
units: "intensity",
|
|
6117
|
-
doc: "
|
|
6206
|
+
doc: "Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when `lights` root property is defined.",
|
|
6118
6207
|
"sdk-support": {
|
|
6119
6208
|
"basic functionality": {
|
|
6120
6209
|
js: "3.0.0",
|
|
@@ -6142,7 +6231,7 @@
|
|
|
6142
6231
|
minimum: 0,
|
|
6143
6232
|
transition: true,
|
|
6144
6233
|
units: "intensity",
|
|
6145
|
-
doc: "
|
|
6234
|
+
doc: "Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when `lights` root property is defined.",
|
|
6146
6235
|
"sdk-support": {
|
|
6147
6236
|
"basic functionality": {
|
|
6148
6237
|
js: "3.0.0",
|
|
@@ -6684,6 +6773,9 @@
|
|
|
6684
6773
|
value: "number",
|
|
6685
6774
|
"property-type": "data-constant",
|
|
6686
6775
|
transition: true,
|
|
6776
|
+
requires: [
|
|
6777
|
+
"raster-color"
|
|
6778
|
+
],
|
|
6687
6779
|
expression: {
|
|
6688
6780
|
interpolated: true,
|
|
6689
6781
|
parameters: [
|
|
@@ -6715,6 +6807,9 @@
|
|
|
6715
6807
|
value: "number",
|
|
6716
6808
|
"property-type": "data-constant",
|
|
6717
6809
|
transition: true,
|
|
6810
|
+
requires: [
|
|
6811
|
+
"raster-color"
|
|
6812
|
+
],
|
|
6718
6813
|
expression: {
|
|
6719
6814
|
interpolated: true,
|
|
6720
6815
|
parameters: [
|
|
@@ -7116,7 +7211,7 @@
|
|
|
7116
7211
|
minimum: 0,
|
|
7117
7212
|
transition: true,
|
|
7118
7213
|
units: "intensity",
|
|
7119
|
-
doc: "
|
|
7214
|
+
doc: "Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when `lights` root property is defined.",
|
|
7120
7215
|
"sdk-support": {
|
|
7121
7216
|
"basic functionality": {
|
|
7122
7217
|
js: "3.0.0",
|
|
@@ -7731,6 +7826,25 @@
|
|
|
7731
7826
|
}
|
|
7732
7827
|
},
|
|
7733
7828
|
transition: true
|
|
7829
|
+
},
|
|
7830
|
+
"model-cutoff-fade-range": {
|
|
7831
|
+
type: "number",
|
|
7832
|
+
"default": 0,
|
|
7833
|
+
minimum: 0,
|
|
7834
|
+
maximum: 1,
|
|
7835
|
+
doc: "This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled.",
|
|
7836
|
+
transition: false,
|
|
7837
|
+
expression: {
|
|
7838
|
+
interpolated: false
|
|
7839
|
+
},
|
|
7840
|
+
"sdk-support": {
|
|
7841
|
+
"basic functionality": {
|
|
7842
|
+
js: "3.0.0",
|
|
7843
|
+
android: "11.0.0",
|
|
7844
|
+
ios: "11.0.0"
|
|
7845
|
+
}
|
|
7846
|
+
},
|
|
7847
|
+
"property-type": "data-constant"
|
|
7734
7848
|
}
|
|
7735
7849
|
};
|
|
7736
7850
|
var transition = {
|
|
@@ -7892,7 +8006,7 @@
|
|
|
7892
8006
|
doc: "Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.",
|
|
7893
8007
|
"sdk-support": {
|
|
7894
8008
|
"basic functionality": {
|
|
7895
|
-
js: "
|
|
8009
|
+
js: "3.0.0",
|
|
7896
8010
|
android: "10.7.0",
|
|
7897
8011
|
ios: "10.7.0"
|
|
7898
8012
|
},
|
|
@@ -8256,7 +8370,7 @@
|
|
|
8256
8370
|
doc: "Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.",
|
|
8257
8371
|
"sdk-support": {
|
|
8258
8372
|
"basic functionality": {
|
|
8259
|
-
js: "
|
|
8373
|
+
js: "3.0.0",
|
|
8260
8374
|
android: "10.7.0",
|
|
8261
8375
|
ios: "10.7.0"
|
|
8262
8376
|
}
|
|
@@ -8281,7 +8395,7 @@
|
|
|
8281
8395
|
],
|
|
8282
8396
|
"sdk-support": {
|
|
8283
8397
|
"basic functionality": {
|
|
8284
|
-
js: "
|
|
8398
|
+
js: "3.0.0",
|
|
8285
8399
|
android: "10.7.0",
|
|
8286
8400
|
ios: "10.7.0"
|
|
8287
8401
|
}
|
|
@@ -8508,7 +8622,7 @@
|
|
|
8508
8622
|
transition: false,
|
|
8509
8623
|
"sdk-support": {
|
|
8510
8624
|
"basic functionality": {
|
|
8511
|
-
js: "
|
|
8625
|
+
js: "3.0.0",
|
|
8512
8626
|
android: "10.10.0",
|
|
8513
8627
|
ios: "10.10.0"
|
|
8514
8628
|
}
|
|
@@ -8519,6 +8633,25 @@
|
|
|
8519
8633
|
"zoom"
|
|
8520
8634
|
]
|
|
8521
8635
|
}
|
|
8636
|
+
},
|
|
8637
|
+
"fill-extrusion-cutoff-fade-range": {
|
|
8638
|
+
type: "number",
|
|
8639
|
+
"default": 0,
|
|
8640
|
+
minimum: 0,
|
|
8641
|
+
maximum: 1,
|
|
8642
|
+
doc: "This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled.",
|
|
8643
|
+
transition: false,
|
|
8644
|
+
expression: {
|
|
8645
|
+
interpolated: false
|
|
8646
|
+
},
|
|
8647
|
+
"sdk-support": {
|
|
8648
|
+
"basic functionality": {
|
|
8649
|
+
js: "3.0.0",
|
|
8650
|
+
android: "11.0.0",
|
|
8651
|
+
ios: "11.0.0"
|
|
8652
|
+
}
|
|
8653
|
+
},
|
|
8654
|
+
"property-type": "data-constant"
|
|
8522
8655
|
}
|
|
8523
8656
|
},
|
|
8524
8657
|
paint_line: paint_line,
|
|
@@ -18420,7 +18553,15 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
18420
18553
|
/*
|
|
18421
18554
|
* { command: 'setProjection', args: [projectionProperties] }
|
|
18422
18555
|
*/
|
|
18423
|
-
setProjection: 'setProjection'
|
|
18556
|
+
setProjection: 'setProjection',
|
|
18557
|
+
/*
|
|
18558
|
+
* { command: 'addImport', args: [importProperties] }
|
|
18559
|
+
*/
|
|
18560
|
+
addImport: 'addImport',
|
|
18561
|
+
/*
|
|
18562
|
+
* { command: 'removeImport', args: [importId] }
|
|
18563
|
+
*/
|
|
18564
|
+
removeImport: 'removeImport'
|
|
18424
18565
|
};
|
|
18425
18566
|
function addSource(sourceId, after, commands) {
|
|
18426
18567
|
commands.push({
|
|
@@ -18683,6 +18824,21 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
18683
18824
|
}
|
|
18684
18825
|
}
|
|
18685
18826
|
}
|
|
18827
|
+
function diffImports(before = [], after = [], commands) {
|
|
18828
|
+
// no diff for the imports, must remove then add
|
|
18829
|
+
for (const beforeImport of before) {
|
|
18830
|
+
commands.push({
|
|
18831
|
+
command: operations.removeImport,
|
|
18832
|
+
args: [beforeImport.id]
|
|
18833
|
+
});
|
|
18834
|
+
}
|
|
18835
|
+
for (const afterImport of after) {
|
|
18836
|
+
commands.push({
|
|
18837
|
+
command: operations.addImport,
|
|
18838
|
+
args: [afterImport]
|
|
18839
|
+
});
|
|
18840
|
+
}
|
|
18841
|
+
}
|
|
18686
18842
|
/**
|
|
18687
18843
|
* Diff two stylesheet
|
|
18688
18844
|
*
|
|
@@ -18835,6 +18991,8 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
18835
18991
|
}
|
|
18836
18992
|
// Handle changes to `layers`
|
|
18837
18993
|
diffLayers(beforeLayers, after.layers, commands);
|
|
18994
|
+
// Handle changes to `imports`
|
|
18995
|
+
diffImports(before.imports, after.imports, commands);
|
|
18838
18996
|
} catch (e) {
|
|
18839
18997
|
// fall back to setStyle
|
|
18840
18998
|
console.warn('Unable to compute style diff:', e);
|
|
@@ -19423,7 +19581,7 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
19423
19581
|
}
|
|
19424
19582
|
const errors = [];
|
|
19425
19583
|
if (options.layerType === 'symbol') {
|
|
19426
|
-
if (propertyKey === 'text-field' && style && !style.glyphs) {
|
|
19584
|
+
if (propertyKey === 'text-field' && style && !style.glyphs && !style.imports) {
|
|
19427
19585
|
errors.push(new ValidationError(key, value, 'use of "text-field" requires a style "glyphs" property'));
|
|
19428
19586
|
}
|
|
19429
19587
|
if (propertyKey === 'text-font' && isFunction(deepUnbundle(value)) && unbundle(value.type) === 'identity') {
|