@mapbox/mapbox-gl-style-spec 14.0.0-rc.2 → 14.1.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/diff.js +25 -7
- package/dist/index.cjs +199 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +199 -11
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/reference/v8.json +166 -7
- package/types.js +6 -2
package/dist/index.es.js
CHANGED
|
@@ -89,7 +89,15 @@ var $root = {
|
|
|
89
89
|
"shadow-intensity": 0.2
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
]
|
|
92
|
+
],
|
|
93
|
+
"sdk-support": {
|
|
94
|
+
"basic functionality": {
|
|
95
|
+
js: "3.0.0",
|
|
96
|
+
android: "11.0.0",
|
|
97
|
+
ios: "11.0.0",
|
|
98
|
+
macos: "11.0.0"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
93
101
|
},
|
|
94
102
|
terrain: {
|
|
95
103
|
type: "terrain",
|
|
@@ -556,6 +564,7 @@ var source = [
|
|
|
556
564
|
"source_vector",
|
|
557
565
|
"source_raster",
|
|
558
566
|
"source_raster_dem",
|
|
567
|
+
"source_raster_array",
|
|
559
568
|
"source_geojson",
|
|
560
569
|
"source_video",
|
|
561
570
|
"source_image",
|
|
@@ -802,6 +811,67 @@ var source_raster_dem = {
|
|
|
802
811
|
doc: "Other keys to configure the data source."
|
|
803
812
|
}
|
|
804
813
|
};
|
|
814
|
+
var source_raster_array = {
|
|
815
|
+
type: {
|
|
816
|
+
required: true,
|
|
817
|
+
type: "enum",
|
|
818
|
+
values: {
|
|
819
|
+
"raster-array": {
|
|
820
|
+
doc: "A raster array source"
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
doc: "The type of the source."
|
|
824
|
+
},
|
|
825
|
+
url: {
|
|
826
|
+
type: "string",
|
|
827
|
+
doc: "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."
|
|
828
|
+
},
|
|
829
|
+
tiles: {
|
|
830
|
+
type: "array",
|
|
831
|
+
value: "string",
|
|
832
|
+
doc: "An array of one or more tile source URLs, as in the TileJSON spec."
|
|
833
|
+
},
|
|
834
|
+
bounds: {
|
|
835
|
+
type: "array",
|
|
836
|
+
value: "number",
|
|
837
|
+
length: 4,
|
|
838
|
+
"default": [
|
|
839
|
+
-180,
|
|
840
|
+
-85.051129,
|
|
841
|
+
180,
|
|
842
|
+
85.051129
|
|
843
|
+
],
|
|
844
|
+
doc: "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."
|
|
845
|
+
},
|
|
846
|
+
minzoom: {
|
|
847
|
+
type: "number",
|
|
848
|
+
"default": 0,
|
|
849
|
+
doc: "Minimum zoom level for which tiles are available, as in the TileJSON spec."
|
|
850
|
+
},
|
|
851
|
+
maxzoom: {
|
|
852
|
+
type: "number",
|
|
853
|
+
"default": 22,
|
|
854
|
+
doc: "Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."
|
|
855
|
+
},
|
|
856
|
+
tileSize: {
|
|
857
|
+
type: "number",
|
|
858
|
+
"default": 512,
|
|
859
|
+
units: "pixels",
|
|
860
|
+
doc: "The minimum visual size to display tiles for this layer. Only configurable for raster layers."
|
|
861
|
+
},
|
|
862
|
+
attribution: {
|
|
863
|
+
type: "string",
|
|
864
|
+
doc: "Contains an attribution to be displayed when the map is shown to a user."
|
|
865
|
+
},
|
|
866
|
+
rasterLayers: {
|
|
867
|
+
type: "*",
|
|
868
|
+
doc: "Contains the description of the raster data layers and the bands contained within the tiles."
|
|
869
|
+
},
|
|
870
|
+
"*": {
|
|
871
|
+
type: "*",
|
|
872
|
+
doc: "Other keys to configure the data source."
|
|
873
|
+
}
|
|
874
|
+
};
|
|
805
875
|
var source_geojson = {
|
|
806
876
|
type: {
|
|
807
877
|
required: true,
|
|
@@ -1778,7 +1848,7 @@ var layout_symbol = {
|
|
|
1778
1848
|
"symbol-z-elevate": {
|
|
1779
1849
|
type: "boolean",
|
|
1780
1850
|
"default": false,
|
|
1781
|
-
doc: "Position symbol on buildings (both fill extrusions and models)
|
|
1851
|
+
doc: "Position symbol on buildings (both fill extrusions and models) rooftops. In order to have minimal impact on performance, this is supported only when `fill-extrusion-height` is not zoom-dependent and remains unchanged. For fading in buildings when zooming in, fill-extrusion-vertical-scale should be used and symbols would raise with building rooftops. Symbols are sorted by elevation, except in cases when `viewport-y` sorting or `symbol-sort-key` are applied.",
|
|
1782
1852
|
"sdk-support": {
|
|
1783
1853
|
"basic functionality": {
|
|
1784
1854
|
js: "3.0.0",
|
|
@@ -7049,6 +7119,66 @@ var paint_raster = {
|
|
|
7049
7119
|
]
|
|
7050
7120
|
},
|
|
7051
7121
|
"property-type": "data-constant"
|
|
7122
|
+
},
|
|
7123
|
+
"raster-emissive-strength": {
|
|
7124
|
+
type: "number",
|
|
7125
|
+
"default": 0,
|
|
7126
|
+
minimum: 0,
|
|
7127
|
+
transition: true,
|
|
7128
|
+
units: "intensity",
|
|
7129
|
+
doc: "Controls the intensity of light emitted on the source features.",
|
|
7130
|
+
requires: [
|
|
7131
|
+
"lights"
|
|
7132
|
+
],
|
|
7133
|
+
"sdk-support": {
|
|
7134
|
+
"basic functionality": {
|
|
7135
|
+
js: "3.0.0",
|
|
7136
|
+
android: "11.0.0",
|
|
7137
|
+
ios: "11.0.0"
|
|
7138
|
+
}
|
|
7139
|
+
},
|
|
7140
|
+
expression: {
|
|
7141
|
+
interpolated: true,
|
|
7142
|
+
parameters: [
|
|
7143
|
+
"zoom",
|
|
7144
|
+
"measure-light"
|
|
7145
|
+
]
|
|
7146
|
+
},
|
|
7147
|
+
"property-type": "data-constant"
|
|
7148
|
+
},
|
|
7149
|
+
"raster-array-band": {
|
|
7150
|
+
type: "string",
|
|
7151
|
+
required: false,
|
|
7152
|
+
"property-type": "data-constant",
|
|
7153
|
+
transition: false,
|
|
7154
|
+
doc: "Displayed band of raster array source layer",
|
|
7155
|
+
example: "band-name",
|
|
7156
|
+
"sdk-support": {
|
|
7157
|
+
"basic functionality": {
|
|
7158
|
+
js: "3.1.0",
|
|
7159
|
+
android: "11.1.0",
|
|
7160
|
+
ios: "11.1.0"
|
|
7161
|
+
}
|
|
7162
|
+
}
|
|
7163
|
+
},
|
|
7164
|
+
"raster-elevation": {
|
|
7165
|
+
type: "number",
|
|
7166
|
+
doc: "Specifies an uniform elevation from the ground, in meters. Only supported with image sources.",
|
|
7167
|
+
"default": 0,
|
|
7168
|
+
minimum: 0,
|
|
7169
|
+
transition: true,
|
|
7170
|
+
"sdk-support": {
|
|
7171
|
+
"basic functionality": {
|
|
7172
|
+
js: "3.1.0"
|
|
7173
|
+
}
|
|
7174
|
+
},
|
|
7175
|
+
expression: {
|
|
7176
|
+
interpolated: true,
|
|
7177
|
+
parameters: [
|
|
7178
|
+
"zoom"
|
|
7179
|
+
]
|
|
7180
|
+
},
|
|
7181
|
+
"property-type": "data-constant"
|
|
7052
7182
|
}
|
|
7053
7183
|
};
|
|
7054
7184
|
var paint_hillshade = {
|
|
@@ -7198,7 +7328,10 @@ var paint_hillshade = {
|
|
|
7198
7328
|
minimum: 0,
|
|
7199
7329
|
transition: true,
|
|
7200
7330
|
units: "intensity",
|
|
7201
|
-
doc: "Controls the intensity of light emitted on the source features.
|
|
7331
|
+
doc: "Controls the intensity of light emitted on the source features.",
|
|
7332
|
+
requires: [
|
|
7333
|
+
"lights"
|
|
7334
|
+
],
|
|
7202
7335
|
"sdk-support": {
|
|
7203
7336
|
"basic functionality": {
|
|
7204
7337
|
js: "3.0.0",
|
|
@@ -8009,7 +8142,7 @@ var v8 = {
|
|
|
8009
8142
|
}
|
|
8010
8143
|
},
|
|
8011
8144
|
directional: {
|
|
8012
|
-
doc: "A light that has a direction and is located at infinite, so its rays are parallel.
|
|
8145
|
+
doc: "A light that has a direction and is located at infinite distance, so its rays are parallel. It simulates the sun light and can cast shadows.",
|
|
8013
8146
|
"sdk-support": {
|
|
8014
8147
|
"basic functionality": {
|
|
8015
8148
|
js: "3.0.0",
|
|
@@ -8019,7 +8152,7 @@ var v8 = {
|
|
|
8019
8152
|
}
|
|
8020
8153
|
},
|
|
8021
8154
|
flat: {
|
|
8022
|
-
doc: "A global directional light source which is only applied on 3D
|
|
8155
|
+
doc: "A global directional light source which is only applied on 3D and hillshade layers. Using this type disables other light sources.",
|
|
8023
8156
|
"sdk-support": {
|
|
8024
8157
|
"basic functionality": {
|
|
8025
8158
|
js: "3.0.0",
|
|
@@ -8040,6 +8173,7 @@ var v8 = {
|
|
|
8040
8173
|
source_vector: source_vector,
|
|
8041
8174
|
source_raster: source_raster,
|
|
8042
8175
|
source_raster_dem: source_raster_dem,
|
|
8176
|
+
source_raster_array: source_raster_array,
|
|
8043
8177
|
source_geojson: source_geojson,
|
|
8044
8178
|
source_video: source_video,
|
|
8045
8179
|
source_image: source_image,
|
|
@@ -8480,7 +8614,7 @@ var v8 = {
|
|
|
8480
8614
|
]
|
|
8481
8615
|
},
|
|
8482
8616
|
transition: true,
|
|
8483
|
-
doc: "Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings. This property works only with legacy light. When 3D
|
|
8617
|
+
doc: "Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings. This property works only with legacy light. When 3D lights are enabled `fill-extrusion-ambient-occlusion-wall-radius` and `fill-extrusion-ambient-occlusion-ground-radius` are used instead.",
|
|
8484
8618
|
requires: [
|
|
8485
8619
|
"fill-extrusion-edge-radius",
|
|
8486
8620
|
{
|
|
@@ -8792,6 +8926,32 @@ var v8 = {
|
|
|
8792
8926
|
}
|
|
8793
8927
|
},
|
|
8794
8928
|
"property-type": "data-constant"
|
|
8929
|
+
},
|
|
8930
|
+
"fill-extrusion-emissive-strength": {
|
|
8931
|
+
type: "number",
|
|
8932
|
+
"default": 0,
|
|
8933
|
+
minimum: 0,
|
|
8934
|
+
transition: true,
|
|
8935
|
+
units: "intensity",
|
|
8936
|
+
doc: "Controls the intensity of light emitted on the source features.",
|
|
8937
|
+
requires: [
|
|
8938
|
+
"lights"
|
|
8939
|
+
],
|
|
8940
|
+
"sdk-support": {
|
|
8941
|
+
"basic functionality": {
|
|
8942
|
+
js: "3.0.0",
|
|
8943
|
+
android: "11.0.0",
|
|
8944
|
+
ios: "11.0.0"
|
|
8945
|
+
}
|
|
8946
|
+
},
|
|
8947
|
+
expression: {
|
|
8948
|
+
interpolated: true,
|
|
8949
|
+
parameters: [
|
|
8950
|
+
"zoom",
|
|
8951
|
+
"measure-light"
|
|
8952
|
+
]
|
|
8953
|
+
},
|
|
8954
|
+
"property-type": "data-constant"
|
|
8795
8955
|
}
|
|
8796
8956
|
},
|
|
8797
8957
|
paint_line: paint_line,
|
|
@@ -18618,6 +18778,10 @@ const operations = {
|
|
|
18618
18778
|
* { command: 'setLayoutProperty', args: ['layerId', 'prop', value] }
|
|
18619
18779
|
*/
|
|
18620
18780
|
setLayoutProperty: 'setLayoutProperty',
|
|
18781
|
+
/*
|
|
18782
|
+
* { command: 'setSlot', args: ['layerId', slot] }
|
|
18783
|
+
*/
|
|
18784
|
+
setSlot: 'setSlot',
|
|
18621
18785
|
/*
|
|
18622
18786
|
* { command: 'setFilter', args: ['layerId', filter] }
|
|
18623
18787
|
*/
|
|
@@ -18709,7 +18873,11 @@ const operations = {
|
|
|
18709
18873
|
/*
|
|
18710
18874
|
* { command: 'setImportData', args: [importId, stylesheet] }
|
|
18711
18875
|
*/
|
|
18712
|
-
setImportData: 'setImportData'
|
|
18876
|
+
setImportData: 'setImportData',
|
|
18877
|
+
/*
|
|
18878
|
+
* { command: 'setImportConfig', args: [importId, config] }
|
|
18879
|
+
*/
|
|
18880
|
+
setImportConfig: 'setImportConfig'
|
|
18713
18881
|
};
|
|
18714
18882
|
function addSource(sourceId, after, commands) {
|
|
18715
18883
|
commands.push({
|
|
@@ -18914,6 +19082,15 @@ function diffLayers(before, after, commands) {
|
|
|
18914
19082
|
// layout, paint, filter, minzoom, maxzoom
|
|
18915
19083
|
diffLayerPropertyChanges(beforeLayer.layout, afterLayer.layout, commands, layerId, null, operations.setLayoutProperty);
|
|
18916
19084
|
diffLayerPropertyChanges(beforeLayer.paint, afterLayer.paint, commands, layerId, null, operations.setPaintProperty);
|
|
19085
|
+
if (!deepEqual(beforeLayer.slot, afterLayer.slot)) {
|
|
19086
|
+
commands.push({
|
|
19087
|
+
command: operations.setSlot,
|
|
19088
|
+
args: [
|
|
19089
|
+
layerId,
|
|
19090
|
+
afterLayer.slot
|
|
19091
|
+
]
|
|
19092
|
+
});
|
|
19093
|
+
}
|
|
18917
19094
|
if (!deepEqual(beforeLayer.filter, afterLayer.filter)) {
|
|
18918
19095
|
commands.push({
|
|
18919
19096
|
command: operations.setFilter,
|
|
@@ -18937,7 +19114,7 @@ function diffLayers(before, after, commands) {
|
|
|
18937
19114
|
for (prop in beforeLayer) {
|
|
18938
19115
|
if (!beforeLayer.hasOwnProperty(prop))
|
|
18939
19116
|
continue;
|
|
18940
|
-
if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom')
|
|
19117
|
+
if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom' || prop === 'slot')
|
|
18941
19118
|
continue;
|
|
18942
19119
|
if (prop.indexOf('paint.') === 0) {
|
|
18943
19120
|
diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);
|
|
@@ -18955,7 +19132,7 @@ function diffLayers(before, after, commands) {
|
|
|
18955
19132
|
for (prop in afterLayer) {
|
|
18956
19133
|
if (!afterLayer.hasOwnProperty(prop) || beforeLayer.hasOwnProperty(prop))
|
|
18957
19134
|
continue;
|
|
18958
|
-
if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom')
|
|
19135
|
+
if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom' || prop === 'slot')
|
|
18959
19136
|
continue;
|
|
18960
19137
|
if (prop.indexOf('paint.') === 0) {
|
|
18961
19138
|
diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);
|
|
@@ -19031,6 +19208,15 @@ function diffImports(before = [], after = [], commands) {
|
|
|
19031
19208
|
const beforeImport = beforeIndex[afterImport.id];
|
|
19032
19209
|
if (!beforeImport || deepEqual(beforeImport, afterImport))
|
|
19033
19210
|
continue;
|
|
19211
|
+
if (!deepEqual(beforeImport.config, afterImport.config)) {
|
|
19212
|
+
commands.push({
|
|
19213
|
+
command: operations.setImportConfig,
|
|
19214
|
+
args: [
|
|
19215
|
+
afterImport.id,
|
|
19216
|
+
afterImport.config
|
|
19217
|
+
]
|
|
19218
|
+
});
|
|
19219
|
+
}
|
|
19034
19220
|
if (!deepEqual(beforeImport.url, afterImport.url)) {
|
|
19035
19221
|
commands.push({
|
|
19036
19222
|
command: operations.setImportUrl,
|
|
@@ -19122,6 +19308,10 @@ function diffStyles(before, after) {
|
|
|
19122
19308
|
args: [after.glyphs]
|
|
19123
19309
|
});
|
|
19124
19310
|
}
|
|
19311
|
+
// Handle changes to `imports` before other mergable top-level properties
|
|
19312
|
+
if (!deepEqual(before.imports, after.imports)) {
|
|
19313
|
+
diffImports(before.imports, after.imports, commands);
|
|
19314
|
+
}
|
|
19125
19315
|
if (!deepEqual(before.transition, after.transition)) {
|
|
19126
19316
|
commands.push({
|
|
19127
19317
|
command: operations.setTransition,
|
|
@@ -19205,8 +19395,6 @@ function diffStyles(before, after) {
|
|
|
19205
19395
|
}
|
|
19206
19396
|
// Handle changes to `layers`
|
|
19207
19397
|
diffLayers(beforeLayers, after.layers, commands);
|
|
19208
|
-
// Handle changes to `imports`
|
|
19209
|
-
diffImports(before.imports, after.imports, commands);
|
|
19210
19398
|
} catch (e) {
|
|
19211
19399
|
// fall back to setStyle
|
|
19212
19400
|
console.warn('Unable to compute style diff:', e);
|