@mapbox/mapbox-gl-style-spec 13.19.2 → 13.21.0
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/CHANGELOG.md +20 -5
- package/diff.js +9 -1
- package/dist/{index.js → index.cjs} +213 -39
- package/dist/index.cjs.map +1 -0
- package/dist/index.es.js +212 -38
- package/dist/index.es.js.map +1 -1
- package/package.json +12 -3
- package/reference/v8.json +155 -36
- package/rollup.config.js +1 -1
- package/types.js +10 -3
- package/validate/validate.js +2 -0
- package/validate/validate_fog.js +46 -0
- package/validate_mapbox_api_supported.js +10 -2
- package/validate_style.min.js +2 -0
- package/dist/index.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
# 13.21.0
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### ✨ Features and improvements
|
|
4
|
+
* Add support for `text-writing-mode` property when using `symbol-placement: line` text labels. ([#10647](https://github.com/mapbox/mapbox-gl-js/pull/10647))
|
|
5
|
+
* Note: This change will bring following changes for CJK text block:
|
|
6
|
+
* 1. For vertical CJK text, all the characters including Latin and Numbers will be vertically placed now. Previously, Latin and Numbers are horizontally placed.
|
|
7
|
+
* 2. For horizontal CJK text, it may have a slight horizontal shift due to the anchor shift.
|
|
8
|
+
|
|
9
|
+
## 13.20.1
|
|
10
|
+
|
|
11
|
+
### 🐞 Bug fixes
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
* Increase strictness of the style API validation for source types ([#10779](https://github.com/mapbox/mapbox-gl-js/pull/10779))
|
|
14
|
+
* Remove strictly-increasing requirement for fog range validation ([#10772](https://github.com/mapbox/mapbox-gl-js/pull/10772))
|
|
15
|
+
|
|
16
|
+
## 13.20.0
|
|
17
|
+
|
|
18
|
+
### ✨ Features and improvements
|
|
6
19
|
|
|
7
|
-
*
|
|
20
|
+
* Add configurable fog as a root style specification ([#10564](https://github.com/mapbox/mapbox-gl-js/pull/10564))
|
|
21
|
+
* Add support for data-driven expressions in `line-dasharray` and `line-cap` properties. ([#10591](https://github.com/mapbox/mapbox-gl-js/pull/10591))
|
|
22
|
+
* Add support for data-driven `text-line-height` ([#10612](https://github.com/mapbox/mapbox-gl-js/pull/10612))
|
|
8
23
|
|
|
9
24
|
## 13.19.0
|
|
10
25
|
|
|
@@ -12,7 +27,7 @@
|
|
|
12
27
|
|
|
13
28
|
* Added array support to minimums and maximums, allowing for validation of multi-dimensional style-spec value constraints. ([#10272](https://github.com/mapbox/mapbox-gl-js/pull/10272))
|
|
14
29
|
|
|
15
|
-
|
|
30
|
+
## 13.18.1
|
|
16
31
|
|
|
17
32
|
### 🐞 Bug fixes
|
|
18
33
|
* Fixed a bug where `map.setStyle` couldn't be used to enable terrain. ([#10177](https://github.com/mapbox/mapbox-gl-js/pull/10177))
|
package/diff.js
CHANGED
|
@@ -101,7 +101,12 @@ const operations = {
|
|
|
101
101
|
/*
|
|
102
102
|
* { command: 'setTerrain', args: [terrainProperties] }
|
|
103
103
|
*/
|
|
104
|
-
setTerrain: 'setTerrain'
|
|
104
|
+
setTerrain: 'setTerrain',
|
|
105
|
+
|
|
106
|
+
/*
|
|
107
|
+
* { command: 'setFog', args: [fogProperties] }
|
|
108
|
+
*/
|
|
109
|
+
setFog: 'setFog'
|
|
105
110
|
|
|
106
111
|
};
|
|
107
112
|
|
|
@@ -355,6 +360,9 @@ function diffStyles(before, after) {
|
|
|
355
360
|
if (!isEqual(before.light, after.light)) {
|
|
356
361
|
commands.push({command: operations.setLight, args: [after.light]});
|
|
357
362
|
}
|
|
363
|
+
if (!isEqual(before.fog, after.fog)) {
|
|
364
|
+
commands.push({command: operations.setFog, args: [after.fog]});
|
|
365
|
+
}
|
|
358
366
|
|
|
359
367
|
// Handle changes to `sources`
|
|
360
368
|
// If a source is to be removed, we also--before the removeSource
|
|
@@ -66,6 +66,10 @@
|
|
|
66
66
|
type: "terrain",
|
|
67
67
|
doc: "A global modifier that elevates layers and markers based on a DEM data source."
|
|
68
68
|
},
|
|
69
|
+
fog: {
|
|
70
|
+
type: "fog",
|
|
71
|
+
doc: "A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features."
|
|
72
|
+
},
|
|
69
73
|
sources: {
|
|
70
74
|
required: true,
|
|
71
75
|
type: "sources",
|
|
@@ -617,7 +621,9 @@
|
|
|
617
621
|
doc: "A spherical dome around the map that is always rendered behind all other layers.",
|
|
618
622
|
"sdk-support": {
|
|
619
623
|
"basic functionality": {
|
|
620
|
-
js: "2.0.0"
|
|
624
|
+
js: "2.0.0",
|
|
625
|
+
ios: "10.0.0",
|
|
626
|
+
android: "10.0.0"
|
|
621
627
|
}
|
|
622
628
|
}
|
|
623
629
|
}
|
|
@@ -713,7 +719,9 @@
|
|
|
713
719
|
doc: "Whether this layer is displayed.",
|
|
714
720
|
"sdk-support": {
|
|
715
721
|
"basic functionality": {
|
|
716
|
-
js: "2.0.0"
|
|
722
|
+
js: "2.0.0",
|
|
723
|
+
ios: "10.0.0",
|
|
724
|
+
android: "10.0.0"
|
|
717
725
|
}
|
|
718
726
|
},
|
|
719
727
|
"property-type": "constant"
|
|
@@ -865,15 +873,19 @@
|
|
|
865
873
|
android: "2.0.1",
|
|
866
874
|
ios: "2.0.0",
|
|
867
875
|
macos: "0.1.0"
|
|
876
|
+
},
|
|
877
|
+
"data-driven styling": {
|
|
878
|
+
js: "2.3.0"
|
|
868
879
|
}
|
|
869
880
|
},
|
|
870
881
|
expression: {
|
|
871
882
|
interpolated: false,
|
|
872
883
|
parameters: [
|
|
873
|
-
"zoom"
|
|
884
|
+
"zoom",
|
|
885
|
+
"feature"
|
|
874
886
|
]
|
|
875
887
|
},
|
|
876
|
-
"property-type": "data-
|
|
888
|
+
"property-type": "data-driven"
|
|
877
889
|
},
|
|
878
890
|
"line-join": {
|
|
879
891
|
type: "enum",
|
|
@@ -1804,7 +1816,12 @@
|
|
|
1804
1816
|
units: "ems",
|
|
1805
1817
|
doc: "The maximum line width for text wrapping.",
|
|
1806
1818
|
requires: [
|
|
1807
|
-
"text-field"
|
|
1819
|
+
"text-field",
|
|
1820
|
+
{
|
|
1821
|
+
"symbol-placement": [
|
|
1822
|
+
"point"
|
|
1823
|
+
]
|
|
1824
|
+
}
|
|
1808
1825
|
],
|
|
1809
1826
|
"sdk-support": {
|
|
1810
1827
|
"basic functionality": {
|
|
@@ -1843,15 +1860,19 @@
|
|
|
1843
1860
|
android: "2.0.1",
|
|
1844
1861
|
ios: "2.0.0",
|
|
1845
1862
|
macos: "0.1.0"
|
|
1863
|
+
},
|
|
1864
|
+
"data-driven styling": {
|
|
1865
|
+
js: "2.3.0"
|
|
1846
1866
|
}
|
|
1847
1867
|
},
|
|
1848
1868
|
expression: {
|
|
1849
1869
|
interpolated: true,
|
|
1850
1870
|
parameters: [
|
|
1851
|
-
"zoom"
|
|
1871
|
+
"zoom",
|
|
1872
|
+
"feature"
|
|
1852
1873
|
]
|
|
1853
1874
|
},
|
|
1854
|
-
"property-type": "data-
|
|
1875
|
+
"property-type": "data-driven"
|
|
1855
1876
|
},
|
|
1856
1877
|
"text-letter-spacing": {
|
|
1857
1878
|
type: "number",
|
|
@@ -2119,20 +2140,15 @@
|
|
|
2119
2140
|
value: "enum",
|
|
2120
2141
|
values: {
|
|
2121
2142
|
horizontal: {
|
|
2122
|
-
doc: "If a text's language supports horizontal writing mode, symbols
|
|
2143
|
+
doc: "If a text's language supports horizontal writing mode, symbols would be laid out horizontally."
|
|
2123
2144
|
},
|
|
2124
2145
|
vertical: {
|
|
2125
|
-
doc: "If a text's language supports vertical writing mode, symbols
|
|
2146
|
+
doc: "If a text's language supports vertical writing mode, symbols would be laid out vertically."
|
|
2126
2147
|
}
|
|
2127
2148
|
},
|
|
2128
|
-
doc: "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.
|
|
2149
|
+
doc: "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. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.",
|
|
2129
2150
|
requires: [
|
|
2130
|
-
"text-field"
|
|
2131
|
-
{
|
|
2132
|
-
"symbol-placement": [
|
|
2133
|
-
"point"
|
|
2134
|
-
]
|
|
2135
|
-
}
|
|
2151
|
+
"text-field"
|
|
2136
2152
|
],
|
|
2137
2153
|
"sdk-support": {
|
|
2138
2154
|
"basic functionality": {
|
|
@@ -2610,7 +2626,7 @@
|
|
|
2610
2626
|
}
|
|
2611
2627
|
},
|
|
2612
2628
|
"in": {
|
|
2613
|
-
doc: "Determines whether an item exists in an array or a substring exists in a string.",
|
|
2629
|
+
doc: "Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).",
|
|
2614
2630
|
group: "Lookup",
|
|
2615
2631
|
"sdk-support": {
|
|
2616
2632
|
"basic functionality": {
|
|
@@ -2652,7 +2668,7 @@
|
|
|
2652
2668
|
}
|
|
2653
2669
|
},
|
|
2654
2670
|
match: {
|
|
2655
|
-
doc: "Selects the output
|
|
2671
|
+
doc: "Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `[\"get\", \"building_type\"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `[\"c\", \"b\"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `\"in\"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.",
|
|
2656
2672
|
group: "Decision",
|
|
2657
2673
|
"sdk-support": {
|
|
2658
2674
|
"basic functionality": {
|
|
@@ -2878,7 +2894,10 @@
|
|
|
2878
2894
|
group: "Types",
|
|
2879
2895
|
"sdk-support": {
|
|
2880
2896
|
"basic functionality": {
|
|
2881
|
-
js: "0.54.0"
|
|
2897
|
+
js: "0.54.0",
|
|
2898
|
+
android: "8.4.0",
|
|
2899
|
+
ios: "5.4.0",
|
|
2900
|
+
macos: "0.15.0"
|
|
2882
2901
|
}
|
|
2883
2902
|
}
|
|
2884
2903
|
},
|
|
@@ -3024,7 +3043,7 @@
|
|
|
3024
3043
|
}
|
|
3025
3044
|
},
|
|
3026
3045
|
"geometry-type": {
|
|
3027
|
-
doc: "Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",
|
|
3046
|
+
doc: "Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`. `Multi*` feature types are only returned in GeoJSON sources. When working with vector tile sources, use the singular forms.",
|
|
3028
3047
|
group: "Feature data",
|
|
3029
3048
|
"sdk-support": {
|
|
3030
3049
|
"basic functionality": {
|
|
@@ -3088,7 +3107,9 @@
|
|
|
3088
3107
|
group: "sky",
|
|
3089
3108
|
"sdk-support": {
|
|
3090
3109
|
"basic functionality": {
|
|
3091
|
-
js: "2.0.0"
|
|
3110
|
+
js: "2.0.0",
|
|
3111
|
+
ios: "10.0.0",
|
|
3112
|
+
android: "10.0.0"
|
|
3092
3113
|
}
|
|
3093
3114
|
}
|
|
3094
3115
|
},
|
|
@@ -3097,7 +3118,10 @@
|
|
|
3097
3118
|
group: "Feature data",
|
|
3098
3119
|
"sdk-support": {
|
|
3099
3120
|
"basic functionality": {
|
|
3100
|
-
js: "0.53.0"
|
|
3121
|
+
js: "0.53.0",
|
|
3122
|
+
android: "8.4.0",
|
|
3123
|
+
ios: "5.5.0",
|
|
3124
|
+
macos: "0.15.0"
|
|
3101
3125
|
}
|
|
3102
3126
|
}
|
|
3103
3127
|
},
|
|
@@ -3592,6 +3616,75 @@
|
|
|
3592
3616
|
}
|
|
3593
3617
|
}
|
|
3594
3618
|
};
|
|
3619
|
+
var fog = {
|
|
3620
|
+
range: {
|
|
3621
|
+
type: "array",
|
|
3622
|
+
"default": [
|
|
3623
|
+
0.5,
|
|
3624
|
+
10
|
|
3625
|
+
],
|
|
3626
|
+
minimum: -20,
|
|
3627
|
+
maximum: 20,
|
|
3628
|
+
length: 2,
|
|
3629
|
+
value: "number",
|
|
3630
|
+
"property-type": "data-constant",
|
|
3631
|
+
transition: true,
|
|
3632
|
+
expression: {
|
|
3633
|
+
interpolated: true,
|
|
3634
|
+
parameters: [
|
|
3635
|
+
"zoom"
|
|
3636
|
+
]
|
|
3637
|
+
},
|
|
3638
|
+
doc: "The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",
|
|
3639
|
+
example: [
|
|
3640
|
+
0.5,
|
|
3641
|
+
10
|
|
3642
|
+
],
|
|
3643
|
+
"sdk-support": {
|
|
3644
|
+
"basic functionality": {
|
|
3645
|
+
js: "2.3.0"
|
|
3646
|
+
}
|
|
3647
|
+
}
|
|
3648
|
+
},
|
|
3649
|
+
color: {
|
|
3650
|
+
type: "color",
|
|
3651
|
+
"property-type": "data-constant",
|
|
3652
|
+
"default": "#ffffff",
|
|
3653
|
+
expression: {
|
|
3654
|
+
interpolated: true,
|
|
3655
|
+
parameters: [
|
|
3656
|
+
"zoom"
|
|
3657
|
+
]
|
|
3658
|
+
},
|
|
3659
|
+
transition: true,
|
|
3660
|
+
doc: "The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.",
|
|
3661
|
+
"sdk-support": {
|
|
3662
|
+
"basic functionality": {
|
|
3663
|
+
js: "2.3.0"
|
|
3664
|
+
}
|
|
3665
|
+
}
|
|
3666
|
+
},
|
|
3667
|
+
"horizon-blend": {
|
|
3668
|
+
type: "number",
|
|
3669
|
+
"property-type": "data-constant",
|
|
3670
|
+
"default": 0.1,
|
|
3671
|
+
minimum: 0,
|
|
3672
|
+
maximum: 1,
|
|
3673
|
+
expression: {
|
|
3674
|
+
interpolated: true,
|
|
3675
|
+
parameters: [
|
|
3676
|
+
"zoom"
|
|
3677
|
+
]
|
|
3678
|
+
},
|
|
3679
|
+
transition: true,
|
|
3680
|
+
doc: "Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.",
|
|
3681
|
+
"sdk-support": {
|
|
3682
|
+
"basic functionality": {
|
|
3683
|
+
js: "2.3.0"
|
|
3684
|
+
}
|
|
3685
|
+
}
|
|
3686
|
+
}
|
|
3687
|
+
};
|
|
3595
3688
|
var light = {
|
|
3596
3689
|
anchor: {
|
|
3597
3690
|
type: "enum",
|
|
@@ -3707,7 +3800,9 @@
|
|
|
3707
3800
|
required: true,
|
|
3708
3801
|
"sdk-support": {
|
|
3709
3802
|
"basic functionality": {
|
|
3710
|
-
js: "2.0.0"
|
|
3803
|
+
js: "2.0.0",
|
|
3804
|
+
ios: "10.0.0",
|
|
3805
|
+
android: "10.0.0"
|
|
3711
3806
|
}
|
|
3712
3807
|
}
|
|
3713
3808
|
},
|
|
@@ -3727,7 +3822,9 @@
|
|
|
3727
3822
|
doc: "Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.",
|
|
3728
3823
|
"sdk-support": {
|
|
3729
3824
|
"basic functionality": {
|
|
3730
|
-
js: "2.0.0"
|
|
3825
|
+
js: "2.0.0",
|
|
3826
|
+
ios: "10.0.0",
|
|
3827
|
+
android: "10.0.0"
|
|
3731
3828
|
}
|
|
3732
3829
|
}
|
|
3733
3830
|
}
|
|
@@ -4219,15 +4316,17 @@
|
|
|
4219
4316
|
macos: "0.1.0"
|
|
4220
4317
|
},
|
|
4221
4318
|
"data-driven styling": {
|
|
4319
|
+
js: "2.3.0"
|
|
4222
4320
|
}
|
|
4223
4321
|
},
|
|
4224
4322
|
expression: {
|
|
4225
4323
|
interpolated: false,
|
|
4226
4324
|
parameters: [
|
|
4227
|
-
"zoom"
|
|
4325
|
+
"zoom",
|
|
4326
|
+
"feature"
|
|
4228
4327
|
]
|
|
4229
4328
|
},
|
|
4230
|
-
"property-type": "cross-faded"
|
|
4329
|
+
"property-type": "cross-faded-data-driven"
|
|
4231
4330
|
},
|
|
4232
4331
|
"line-pattern": {
|
|
4233
4332
|
type: "resolvedImage",
|
|
@@ -5648,7 +5747,9 @@
|
|
|
5648
5747
|
doc: "The type of the sky",
|
|
5649
5748
|
"sdk-support": {
|
|
5650
5749
|
"basic functionality": {
|
|
5651
|
-
js: "2.0.0"
|
|
5750
|
+
js: "2.0.0",
|
|
5751
|
+
ios: "10.0.0",
|
|
5752
|
+
android: "10.0.0"
|
|
5652
5753
|
}
|
|
5653
5754
|
},
|
|
5654
5755
|
expression: {
|
|
@@ -5676,7 +5777,9 @@
|
|
|
5676
5777
|
doc: "Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.",
|
|
5677
5778
|
"sdk-support": {
|
|
5678
5779
|
"basic functionality": {
|
|
5679
|
-
js: "2.0.0"
|
|
5780
|
+
js: "2.0.0",
|
|
5781
|
+
ios: "10.0.0",
|
|
5782
|
+
android: "10.0.0"
|
|
5680
5783
|
}
|
|
5681
5784
|
},
|
|
5682
5785
|
requires: [
|
|
@@ -5706,7 +5809,9 @@
|
|
|
5706
5809
|
doc: "Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.",
|
|
5707
5810
|
"sdk-support": {
|
|
5708
5811
|
"basic functionality": {
|
|
5709
|
-
js: "2.0.0"
|
|
5812
|
+
js: "2.0.0",
|
|
5813
|
+
ios: "10.0.0",
|
|
5814
|
+
android: "10.0.0"
|
|
5710
5815
|
}
|
|
5711
5816
|
},
|
|
5712
5817
|
"property-type": "data-constant"
|
|
@@ -5737,7 +5842,9 @@
|
|
|
5737
5842
|
doc: "Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.",
|
|
5738
5843
|
"sdk-support": {
|
|
5739
5844
|
"basic functionality": {
|
|
5740
|
-
js: "2.0.0"
|
|
5845
|
+
js: "2.0.0",
|
|
5846
|
+
ios: "10.0.0",
|
|
5847
|
+
android: "10.0.0"
|
|
5741
5848
|
}
|
|
5742
5849
|
},
|
|
5743
5850
|
expression: {
|
|
@@ -5762,7 +5869,9 @@
|
|
|
5762
5869
|
doc: "The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.",
|
|
5763
5870
|
"sdk-support": {
|
|
5764
5871
|
"basic functionality": {
|
|
5765
|
-
js: "2.0.0"
|
|
5872
|
+
js: "2.0.0",
|
|
5873
|
+
ios: "10.0.0",
|
|
5874
|
+
android: "10.0.0"
|
|
5766
5875
|
}
|
|
5767
5876
|
},
|
|
5768
5877
|
expression: {
|
|
@@ -5797,7 +5906,9 @@
|
|
|
5797
5906
|
],
|
|
5798
5907
|
"sdk-support": {
|
|
5799
5908
|
"basic functionality": {
|
|
5800
|
-
js: "2.0.0"
|
|
5909
|
+
js: "2.0.0",
|
|
5910
|
+
ios: "10.0.0",
|
|
5911
|
+
android: "10.0.0"
|
|
5801
5912
|
},
|
|
5802
5913
|
"data-driven styling": {
|
|
5803
5914
|
}
|
|
@@ -5822,7 +5933,9 @@
|
|
|
5822
5933
|
],
|
|
5823
5934
|
"sdk-support": {
|
|
5824
5935
|
"basic functionality": {
|
|
5825
|
-
js: "2.0.0"
|
|
5936
|
+
js: "2.0.0",
|
|
5937
|
+
ios: "10.0.0",
|
|
5938
|
+
android: "10.0.0"
|
|
5826
5939
|
}
|
|
5827
5940
|
},
|
|
5828
5941
|
"property-type": "data-constant"
|
|
@@ -5839,7 +5952,9 @@
|
|
|
5839
5952
|
],
|
|
5840
5953
|
"sdk-support": {
|
|
5841
5954
|
"basic functionality": {
|
|
5842
|
-
js: "2.0.0"
|
|
5955
|
+
js: "2.0.0",
|
|
5956
|
+
ios: "10.0.0",
|
|
5957
|
+
android: "10.0.0"
|
|
5843
5958
|
}
|
|
5844
5959
|
},
|
|
5845
5960
|
"property-type": "data-constant"
|
|
@@ -5853,7 +5968,9 @@
|
|
|
5853
5968
|
transition: true,
|
|
5854
5969
|
"sdk-support": {
|
|
5855
5970
|
"basic functionality": {
|
|
5856
|
-
js: "2.0.0"
|
|
5971
|
+
js: "2.0.0",
|
|
5972
|
+
ios: "10.0.0",
|
|
5973
|
+
android: "10.0.0"
|
|
5857
5974
|
}
|
|
5858
5975
|
},
|
|
5859
5976
|
expression: {
|
|
@@ -6001,6 +6118,7 @@
|
|
|
6001
6118
|
function_stop: function_stop,
|
|
6002
6119
|
expression: expression,
|
|
6003
6120
|
expression_name: expression_name,
|
|
6121
|
+
fog: fog,
|
|
6004
6122
|
light: light,
|
|
6005
6123
|
terrain: terrain,
|
|
6006
6124
|
paint: paint,
|
|
@@ -6221,6 +6339,7 @@
|
|
|
6221
6339
|
"sdk-support": {
|
|
6222
6340
|
"basic functionality": {
|
|
6223
6341
|
js: "0.50.0",
|
|
6342
|
+
android: "7.0.0",
|
|
6224
6343
|
ios: "4.7.0",
|
|
6225
6344
|
macos: "0.13.0"
|
|
6226
6345
|
}
|
|
@@ -12806,7 +12925,8 @@
|
|
|
12806
12925
|
setGlyphs: 'setGlyphs',
|
|
12807
12926
|
setTransition: 'setTransition',
|
|
12808
12927
|
setLight: 'setLight',
|
|
12809
|
-
setTerrain: 'setTerrain'
|
|
12928
|
+
setTerrain: 'setTerrain',
|
|
12929
|
+
setFog: 'setFog'
|
|
12810
12930
|
};
|
|
12811
12931
|
function addSource(sourceId, after, commands) {
|
|
12812
12932
|
commands.push({
|
|
@@ -13107,6 +13227,12 @@
|
|
|
13107
13227
|
args: [after.light]
|
|
13108
13228
|
});
|
|
13109
13229
|
}
|
|
13230
|
+
if (!deepEqual(before.fog, after.fog)) {
|
|
13231
|
+
commands.push({
|
|
13232
|
+
command: operations.setFog,
|
|
13233
|
+
args: [after.fog]
|
|
13234
|
+
});
|
|
13235
|
+
}
|
|
13110
13236
|
const sourcesRemoved = {};
|
|
13111
13237
|
const removeOrAddSourceCommands = [];
|
|
13112
13238
|
diffSources(before.sources, after.sources, removeOrAddSourceCommands, sourcesRemoved);
|
|
@@ -14046,6 +14172,44 @@
|
|
|
14046
14172
|
return errors;
|
|
14047
14173
|
}
|
|
14048
14174
|
|
|
14175
|
+
function validateFog(options) {
|
|
14176
|
+
const fog = options.value;
|
|
14177
|
+
const style = options.style;
|
|
14178
|
+
const styleSpec = options.styleSpec;
|
|
14179
|
+
const fogSpec = styleSpec.fog;
|
|
14180
|
+
let errors = [];
|
|
14181
|
+
const rootType = getType(fog);
|
|
14182
|
+
if (fog === undefined) {
|
|
14183
|
+
return errors;
|
|
14184
|
+
} else if (rootType !== 'object') {
|
|
14185
|
+
errors = errors.concat([new ValidationError('fog', fog, `object expected, ${ rootType } found`)]);
|
|
14186
|
+
return errors;
|
|
14187
|
+
}
|
|
14188
|
+
for (const key in fog) {
|
|
14189
|
+
const transitionMatch = key.match(/^(.*)-transition$/);
|
|
14190
|
+
if (transitionMatch && fogSpec[transitionMatch[1]] && fogSpec[transitionMatch[1]].transition) {
|
|
14191
|
+
errors = errors.concat(validate({
|
|
14192
|
+
key,
|
|
14193
|
+
value: fog[key],
|
|
14194
|
+
valueSpec: styleSpec.transition,
|
|
14195
|
+
style,
|
|
14196
|
+
styleSpec
|
|
14197
|
+
}));
|
|
14198
|
+
} else if (fogSpec[key]) {
|
|
14199
|
+
errors = errors.concat(validate({
|
|
14200
|
+
key,
|
|
14201
|
+
value: fog[key],
|
|
14202
|
+
valueSpec: fogSpec[key],
|
|
14203
|
+
style,
|
|
14204
|
+
styleSpec
|
|
14205
|
+
}));
|
|
14206
|
+
} else {
|
|
14207
|
+
errors = errors.concat([new ValidationError(key, fog[key], `unknown property "${ key }"`)]);
|
|
14208
|
+
}
|
|
14209
|
+
}
|
|
14210
|
+
return errors;
|
|
14211
|
+
}
|
|
14212
|
+
|
|
14049
14213
|
function validateFormatted(options) {
|
|
14050
14214
|
if (validateString(options).length === 0) {
|
|
14051
14215
|
return [];
|
|
@@ -14077,6 +14241,7 @@
|
|
|
14077
14241
|
'source': validateSource,
|
|
14078
14242
|
'light': validateLight,
|
|
14079
14243
|
'terrain': validateTerrain,
|
|
14244
|
+
'fog': validateFog,
|
|
14080
14245
|
'string': validateString,
|
|
14081
14246
|
'formatted': validateFormatted,
|
|
14082
14247
|
'resolvedImage': validateImage
|
|
@@ -14140,6 +14305,7 @@
|
|
|
14140
14305
|
validateStyleMin.source = wrapCleanErrors(validateSource);
|
|
14141
14306
|
validateStyleMin.light = wrapCleanErrors(validateLight);
|
|
14142
14307
|
validateStyleMin.terrain = wrapCleanErrors(validateTerrain);
|
|
14308
|
+
validateStyleMin.fog = wrapCleanErrors(validateFog);
|
|
14143
14309
|
validateStyleMin.layer = wrapCleanErrors(validateLayer);
|
|
14144
14310
|
validateStyleMin.filter = wrapCleanErrors(validateFilter);
|
|
14145
14311
|
validateStyleMin.paintProperty = wrapCleanErrors(validatePaintProperty);
|
|
@@ -14860,6 +15026,11 @@
|
|
|
14860
15026
|
});
|
|
14861
15027
|
return errors;
|
|
14862
15028
|
}
|
|
15029
|
+
const acceptedSourceTypes = new Set([
|
|
15030
|
+
'vector',
|
|
15031
|
+
'raster',
|
|
15032
|
+
'raster-dem'
|
|
15033
|
+
]);
|
|
14863
15034
|
function getSourceErrors(source, i) {
|
|
14864
15035
|
const errors = [];
|
|
14865
15036
|
const sourceKeys = [
|
|
@@ -14868,9 +15039,12 @@
|
|
|
14868
15039
|
'tileSize'
|
|
14869
15040
|
];
|
|
14870
15041
|
errors.push(...getAllowedKeyErrors(source, sourceKeys, 'source'));
|
|
15042
|
+
if (!acceptedSourceTypes.has(String(source.type))) {
|
|
15043
|
+
errors.push(new ValidationError(`sources[${ i }].type`, source.type, `Expected one of [${ Array.from(acceptedSourceTypes).join(', ') }]`));
|
|
15044
|
+
}
|
|
14871
15045
|
const sourceUrlPattern = /^mapbox:\/\/([^/]*)$/;
|
|
14872
|
-
if (!isValid(source.url, sourceUrlPattern)) {
|
|
14873
|
-
errors.push(new ValidationError(`sources[${ i }]`, source.url, '
|
|
15046
|
+
if (!source.url || !isValid(source.url, sourceUrlPattern)) {
|
|
15047
|
+
errors.push(new ValidationError(`sources[${ i }].url`, source.url, 'Expected a valid Mapbox tileset url'));
|
|
14874
15048
|
}
|
|
14875
15049
|
return errors;
|
|
14876
15050
|
}
|
|
@@ -14981,4 +15155,4 @@
|
|
|
14981
15155
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
14982
15156
|
|
|
14983
15157
|
})));
|
|
14984
|
-
//# sourceMappingURL=index.
|
|
15158
|
+
//# sourceMappingURL=index.cjs.map
|