@maplibre/maplibre-react-native 8.6.0-beta.2 → 9.0.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.
Files changed (74) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/CONTRIBUTING.md +1 -1
  3. package/README.md +1 -3
  4. package/android/install.md +3 -3
  5. package/android/rctmgl/build.gradle +1 -1
  6. package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +33 -0
  7. package/app.plugin.js +1 -1
  8. package/docs/Annotation.md +1 -1
  9. package/docs/Annotations.md +3 -8
  10. package/docs/BackgroundLayer.md +2 -2
  11. package/docs/Callout.md +1 -1
  12. package/docs/Camera.md +2 -2
  13. package/docs/CircleLayer.md +31 -14
  14. package/docs/CustomHttpHeaders.md +9 -9
  15. package/docs/FillExtrusionLayer.md +2 -2
  16. package/docs/FillLayer.md +27 -10
  17. package/docs/GettingStarted.md +4 -6
  18. package/docs/HeadingIndicator.md +1 -1
  19. package/docs/HeatmapLayer.md +2 -2
  20. package/docs/ImageSource.md +1 -1
  21. package/docs/Images.md +1 -1
  22. package/docs/Light.md +1 -1
  23. package/docs/LineLayer.md +31 -14
  24. package/docs/{MapboxGL.md → MapLibreGL.md} +5 -5
  25. package/docs/MapView.md +5 -5
  26. package/docs/MarkerView.md +1 -1
  27. package/docs/NativeUserLocation.md +1 -1
  28. package/docs/OfflineManager.md +16 -16
  29. package/docs/PointAnnotation.md +1 -1
  30. package/docs/RasterLayer.md +2 -2
  31. package/docs/RasterSource.md +2 -2
  32. package/docs/ShapeSource.md +2 -2
  33. package/docs/Style.md +3 -3
  34. package/docs/StyleSheet.md +93 -72
  35. package/docs/SymbolLayer.md +17 -13
  36. package/docs/UserLocation.md +2 -2
  37. package/docs/VectorSource.md +2 -2
  38. package/docs/docs.json +102 -46
  39. package/docs/snapshotManager.md +7 -7
  40. package/index.d.ts +8 -7
  41. package/ios/RCTMGL/RCTMGLStyle.h +3 -0
  42. package/ios/RCTMGL/RCTMGLStyle.m +23 -2
  43. package/ios/RCTMGL/index.d.ts +24 -5
  44. package/ios/install.md +3 -3
  45. package/javascript/components/BackgroundLayer.js +2 -2
  46. package/javascript/components/Camera.js +6 -6
  47. package/javascript/components/CircleLayer.js +2 -2
  48. package/javascript/components/FillExtrusionLayer.js +2 -2
  49. package/javascript/components/FillLayer.js +2 -2
  50. package/javascript/components/HeatmapLayer.js +2 -2
  51. package/javascript/components/LineLayer.js +2 -2
  52. package/javascript/components/MapView.js +38 -41
  53. package/javascript/components/RasterLayer.js +2 -2
  54. package/javascript/components/RasterSource.js +2 -2
  55. package/javascript/components/ShapeSource.js +2 -2
  56. package/javascript/components/Style.js +3 -3
  57. package/javascript/components/SymbolLayer.js +2 -2
  58. package/javascript/components/UserLocation.js +2 -0
  59. package/javascript/components/VectorSource.js +2 -2
  60. package/javascript/index.js +38 -42
  61. package/javascript/modules/location/locationManager.js +8 -8
  62. package/javascript/modules/offline/OfflinePack.js +4 -4
  63. package/javascript/modules/offline/offlineManager.js +34 -34
  64. package/javascript/modules/snapshot/SnapshotOptions.js +2 -2
  65. package/javascript/modules/snapshot/snapshotManager.js +8 -8
  66. package/javascript/utils/styleMap.js +37 -6
  67. package/maplibre-react-native.podspec +1 -1
  68. package/package.json +5 -5
  69. package/plugin/build/{withMapbox.d.ts → withMapLibre.d.ts} +1 -1
  70. package/plugin/build/{withMapbox.js → withMapLibre.js} +7 -7
  71. package/scripts/download-style-spec.sh +2 -2
  72. package/scripts/templates/component.md.ejs +1 -1
  73. package/scripts/templates/styleMap.js.ejs +1 -1
  74. package/style-spec/v8.json +266 -43
@@ -57,26 +57,34 @@
57
57
  "intensity": 0.4
58
58
  }
59
59
  },
60
+ "terrain": {
61
+ "type": "terrain",
62
+ "doc": "The terrain configuration.",
63
+ "example": {
64
+ "source": "raster-dem-source",
65
+ "exaggeration": 0.5
66
+ }
67
+ },
60
68
  "sources": {
61
69
  "required": true,
62
70
  "type": "sources",
63
71
  "doc": "Data source specifications.",
64
72
  "example": {
65
- "mapbox-streets": {
73
+ "maplibre-demotiles": {
66
74
  "type": "vector",
67
- "url": "mapbox://mapbox.mapbox-streets-v6"
75
+ "url": "https://demotiles.maplibre.org/tiles/tiles.json"
68
76
  }
69
77
  }
70
78
  },
71
79
  "sprite": {
72
- "type": "string",
73
- "doc": "A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",
74
- "example": "mapbox://sprites/mapbox/bright-v8"
80
+ "type": "sprite",
81
+ "doc": "An array of `{id: 'my-sprite', url: 'https://example.com/sprite'} objects. Each object should represent a unique URL to load a sprite from and and a unique ID to use as a prefix when referencing images from that sprite (i.e. 'my-sprite:image'). All the URLs are internally extended to load both .json and .png files. If the `id` field is equal to 'default', the prefix is omitted (just 'image' instead of 'default:image'). All the IDs and URLs must be unique. For backwards compatibility, instead of an array, one can also provide a single string that represent a URL to load the sprite from. The images in this case won't be prefixed.",
82
+ "example": "https://api.maptiler.com/maps/openstreetmap/sprite"
75
83
  },
76
84
  "glyphs": {
77
85
  "type": "string",
78
86
  "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).",
79
- "example": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf"
87
+ "example": "https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf"
80
88
  },
81
89
  "transition": {
82
90
  "type": "transition",
@@ -131,7 +139,7 @@
131
139
  },
132
140
  "url": {
133
141
  "type": "string",
134
- "doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."
142
+ "doc": "A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."
135
143
  },
136
144
  "tiles": {
137
145
  "type": "array",
@@ -148,7 +156,7 @@
148
156
  180,
149
157
  85.051129
150
158
  ],
151
- "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."
159
+ "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 MapLibre GL."
152
160
  },
153
161
  "scheme": {
154
162
  "type": "enum",
@@ -181,6 +189,17 @@
181
189
  "type": "promoteId",
182
190
  "doc": "A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."
183
191
  },
192
+ "volatile": {
193
+ "type": "boolean",
194
+ "default": false,
195
+ "doc": "A setting to determine whether a source's tiles are cached locally.",
196
+ "sdk-support": {
197
+ "basic functionality": {
198
+ "android": "9.3.0",
199
+ "ios": "5.10.0"
200
+ }
201
+ }
202
+ },
184
203
  "*": {
185
204
  "type": "*",
186
205
  "doc": "Other keys to configure the data source."
@@ -199,7 +218,7 @@
199
218
  },
200
219
  "url": {
201
220
  "type": "string",
202
- "doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."
221
+ "doc": "A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."
203
222
  },
204
223
  "tiles": {
205
224
  "type": "array",
@@ -216,7 +235,7 @@
216
235
  180,
217
236
  85.051129
218
237
  ],
219
- "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."
238
+ "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 MapLibre GL."
220
239
  },
221
240
  "minzoom": {
222
241
  "type": "number",
@@ -251,6 +270,17 @@
251
270
  "type": "string",
252
271
  "doc": "Contains an attribution to be displayed when the map is shown to a user."
253
272
  },
273
+ "volatile": {
274
+ "type": "boolean",
275
+ "default": false,
276
+ "doc": "A setting to determine whether a source's tiles are cached locally.",
277
+ "sdk-support": {
278
+ "basic functionality": {
279
+ "android": "9.3.0",
280
+ "ios": "5.10.0"
281
+ }
282
+ }
283
+ },
254
284
  "*": {
255
285
  "type": "*",
256
286
  "doc": "Other keys to configure the data source."
@@ -269,7 +299,7 @@
269
299
  },
270
300
  "url": {
271
301
  "type": "string",
272
- "doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."
302
+ "doc": "A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."
273
303
  },
274
304
  "tiles": {
275
305
  "type": "array",
@@ -286,7 +316,7 @@
286
316
  180,
287
317
  85.051129
288
318
  ],
289
- "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."
319
+ "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 MapLibre GL."
290
320
  },
291
321
  "minzoom": {
292
322
  "type": "number",
@@ -321,6 +351,17 @@
321
351
  "default": "mapbox",
322
352
  "doc": "The encoding used by this source. Mapbox Terrain RGB is used by default"
323
353
  },
354
+ "volatile": {
355
+ "type": "boolean",
356
+ "default": false,
357
+ "doc": "A setting to determine whether a source's tiles are cached locally.",
358
+ "sdk-support": {
359
+ "basic functionality": {
360
+ "android": "9.3.0",
361
+ "ios": "5.10.0"
362
+ }
363
+ }
364
+ },
324
365
  "*": {
325
366
  "type": "*",
326
367
  "doc": "Other keys to configure the data source."
@@ -338,6 +379,7 @@
338
379
  "doc": "The data type of the GeoJSON source."
339
380
  },
340
381
  "data": {
382
+ "required": true,
341
383
  "type": "*",
342
384
  "doc": "A URL to a GeoJSON file, or inline GeoJSON."
343
385
  },
@@ -357,6 +399,10 @@
357
399
  "minimum": 0,
358
400
  "doc": "Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."
359
401
  },
402
+ "filter": {
403
+ "type": "*",
404
+ "doc": "An expression for filtering features prior to processing them for rendering."
405
+ },
360
406
  "tolerance": {
361
407
  "type": "number",
362
408
  "default": 0.375,
@@ -375,7 +421,11 @@
375
421
  },
376
422
  "clusterMaxZoom": {
377
423
  "type": "number",
378
- "doc": "Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered)."
424
+ "doc": "Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."
425
+ },
426
+ "clusterMinPoints": {
427
+ "type": "number",
428
+ "doc": "Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."
379
429
  },
380
430
  "clusterProperties": {
381
431
  "type": "*",
@@ -645,10 +695,16 @@
645
695
  "doc": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.",
646
696
  "sdk-support": {
647
697
  "basic functionality": {
648
- "js": "1.2.0"
698
+ "js": "1.2.0",
699
+ "android": "9.1.0",
700
+ "ios": "5.8.0",
701
+ "macos": "0.15.0"
649
702
  },
650
703
  "data-driven styling": {
651
- "js": "1.2.0"
704
+ "js": "1.2.0",
705
+ "android": "9.1.0",
706
+ "ios": "5.8.0",
707
+ "macos": "0.15.0"
652
708
  }
653
709
  },
654
710
  "expression": {
@@ -689,10 +745,16 @@
689
745
  "doc": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.",
690
746
  "sdk-support": {
691
747
  "basic functionality": {
692
- "js": "1.2.0"
748
+ "js": "1.2.0",
749
+ "android": "9.2.0",
750
+ "ios": "5.9.0",
751
+ "macos": "0.16.0"
693
752
  },
694
753
  "data-driven styling": {
695
- "js": "1.2.0"
754
+ "js": "1.2.0",
755
+ "android": "9.2.0",
756
+ "ios": "5.9.0",
757
+ "macos": "0.16.0"
696
758
  }
697
759
  },
698
760
  "expression": {
@@ -900,10 +962,16 @@
900
962
  "doc": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.",
901
963
  "sdk-support": {
902
964
  "basic functionality": {
903
- "js": "1.2.0"
965
+ "js": "1.2.0",
966
+ "android": "9.1.0",
967
+ "ios": "5.8.0",
968
+ "macos": "0.15.0"
904
969
  },
905
970
  "data-driven styling": {
906
- "js": "1.2.0"
971
+ "js": "1.2.0",
972
+ "android": "9.1.0",
973
+ "ios": "5.8.0",
974
+ "macos": "0.15.0"
907
975
  }
908
976
  },
909
977
  "expression": {
@@ -1006,7 +1074,7 @@
1006
1074
  "symbol-avoid-edges": {
1007
1075
  "type": "boolean",
1008
1076
  "default": false,
1009
- "doc": "If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.",
1077
+ "doc": "If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like MapLibre GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.",
1010
1078
  "sdk-support": {
1011
1079
  "basic functionality": {
1012
1080
  "js": "0.10.0",
@@ -1025,7 +1093,7 @@
1025
1093
  },
1026
1094
  "symbol-sort-key": {
1027
1095
  "type": "number",
1028
- "doc": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key when they overlap. Features with a lower sort key will have priority over other features when doing placement.",
1096
+ "doc": "Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.",
1029
1097
  "sdk-support": {
1030
1098
  "basic functionality": {
1031
1099
  "js": "0.53.0",
@@ -1053,17 +1121,17 @@
1053
1121
  "type": "enum",
1054
1122
  "values": {
1055
1123
  "auto": {
1056
- "doc": "If `symbol-sort-key` is set, sort based on that. Otherwise sort symbols by their y-position relative to the viewport."
1124
+ "doc": "Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."
1057
1125
  },
1058
1126
  "viewport-y": {
1059
- "doc": "Symbols will be sorted by their y-position relative to the viewport."
1127
+ "doc": "Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."
1060
1128
  },
1061
1129
  "source": {
1062
- "doc": "Symbols will be rendered in the same order as the source data with no sorting applied."
1130
+ "doc": "Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."
1063
1131
  }
1064
1132
  },
1065
1133
  "default": "auto",
1066
- "doc": "Controls the order in which overlapping symbols in the same layer are rendered",
1134
+ "doc": "Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.",
1067
1135
  "sdk-support": {
1068
1136
  "basic functionality": {
1069
1137
  "js": "0.49.0",
@@ -1085,7 +1153,10 @@
1085
1153
  "default": false,
1086
1154
  "doc": "If true, the icon will be visible even if it collides with other previously drawn symbols.",
1087
1155
  "requires": [
1088
- "icon-image"
1156
+ "icon-image",
1157
+ {
1158
+ "!": "icon-overlap"
1159
+ }
1089
1160
  ],
1090
1161
  "sdk-support": {
1091
1162
  "basic functionality": {
@@ -1103,6 +1174,36 @@
1103
1174
  },
1104
1175
  "property-type": "data-constant"
1105
1176
  },
1177
+ "icon-overlap": {
1178
+ "type": "enum",
1179
+ "values": {
1180
+ "never": {
1181
+ "doc": "The icon will be hidden if it collides with any other previously drawn symbol."
1182
+ },
1183
+ "always": {
1184
+ "doc": "The icon will be visible even if it collides with any other previously drawn symbol."
1185
+ },
1186
+ "cooperative": {
1187
+ "doc": "If the icon collides with another previously drawn symbol, the overlap mode for that symbol is checked. If the previous symbol was placed using `never` overlap mode, the new icon is hidden. If the previous symbol was placed using `always` or `cooperative` overlap mode, the new icon is visible."
1188
+ }
1189
+ },
1190
+ "doc": "Allows for control over whether to show an icon when it overlaps other symbols on the map. If `icon-overlap` is not set, `icon-allow-overlap` is used instead.",
1191
+ "requires": [
1192
+ "icon-image"
1193
+ ],
1194
+ "sdk-support": {
1195
+ "basic functionality": {
1196
+ "js": "2.1.0"
1197
+ }
1198
+ },
1199
+ "expression": {
1200
+ "interpolated": false,
1201
+ "parameters": [
1202
+ "zoom"
1203
+ ]
1204
+ },
1205
+ "property-type": "data-constant"
1206
+ },
1106
1207
  "icon-ignore-placement": {
1107
1208
  "type": "boolean",
1108
1209
  "default": false,
@@ -1250,6 +1351,12 @@
1250
1351
  "android": "4.2.0",
1251
1352
  "ios": "3.4.0",
1252
1353
  "macos": "0.2.1"
1354
+ },
1355
+ "stretchable icons": {
1356
+ "js": "1.6.0",
1357
+ "android": "9.2.0",
1358
+ "ios": "5.8.0",
1359
+ "macos": "0.15.0"
1253
1360
  }
1254
1361
  },
1255
1362
  "expression": {
@@ -1360,10 +1467,9 @@
1360
1467
  },
1361
1468
  "icon-padding": {
1362
1469
  "type": "number",
1363
- "default": 2,
1364
- "minimum": 0,
1470
+ "default":2,
1365
1471
  "units": "pixels",
1366
- "doc": "Size of the additional area around the icon bounding box used for detecting symbol collisions.",
1472
+ "doc": "Size of additional area round the icon bounding box used for detecting symbol collisions. Values are declared using CSS margin shorthand syntax: a single value applies to all four sides; two values apply to [top/bottom, left/right]; three values apply to [top, left/right, bottom]; four values apply to [top, right, bottom, left]. For backwards compatibility, a single bare number is accepted, and treated the same as a one-element array - padding applied to all sides.",
1367
1473
  "requires": [
1368
1474
  "icon-image"
1369
1475
  ],
@@ -1373,15 +1479,19 @@
1373
1479
  "android": "2.0.1",
1374
1480
  "ios": "2.0.0",
1375
1481
  "macos": "0.1.0"
1482
+ },
1483
+ "data-driven styling": {
1484
+ "js": "2.2.0"
1376
1485
  }
1377
1486
  },
1378
1487
  "expression": {
1379
1488
  "interpolated": true,
1380
1489
  "parameters": [
1381
- "zoom"
1490
+ "zoom",
1491
+ "feature"
1382
1492
  ]
1383
1493
  },
1384
- "property-type": "data-constant"
1494
+ "property-type": "data-driven"
1385
1495
  },
1386
1496
  "icon-keep-upright": {
1387
1497
  "type": "boolean",
@@ -1592,6 +1702,9 @@
1592
1702
  "viewport": {
1593
1703
  "doc": "Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."
1594
1704
  },
1705
+ "viewport-glyph": {
1706
+ "doc": "When `symbol-placement` is set to `point`, aligns text to the x-axis of the viewport. When `symbol-placement` is set to `line` or `line-center`, aligns glyphs to the x-axis of the viewport and places them along the line."
1707
+ },
1595
1708
  "auto": {
1596
1709
  "doc": "When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."
1597
1710
  }
@@ -1613,6 +1726,9 @@
1613
1726
  "android": "4.2.0",
1614
1727
  "ios": "3.4.0",
1615
1728
  "macos": "0.3.0"
1729
+ },
1730
+ "`viewport-glyph` value": {
1731
+ "js": "2.1.8"
1616
1732
  }
1617
1733
  },
1618
1734
  "expression": {
@@ -2059,7 +2175,7 @@
2059
2175
  "js": "1.3.0",
2060
2176
  "android": "8.3.0",
2061
2177
  "ios": "5.3.0",
2062
- "macos": "0.14.0"
2178
+ "macos": "0.15.0"
2063
2179
  }
2064
2180
  },
2065
2181
  "expression": {
@@ -2244,7 +2360,10 @@
2244
2360
  "default": false,
2245
2361
  "doc": "If true, the text will be visible even if it collides with other previously drawn symbols.",
2246
2362
  "requires": [
2247
- "text-field"
2363
+ "text-field",
2364
+ {
2365
+ "!": "text-overlap"
2366
+ }
2248
2367
  ],
2249
2368
  "sdk-support": {
2250
2369
  "basic functionality": {
@@ -2262,6 +2381,36 @@
2262
2381
  },
2263
2382
  "property-type": "data-constant"
2264
2383
  },
2384
+ "text-overlap": {
2385
+ "type": "enum",
2386
+ "values": {
2387
+ "never": {
2388
+ "doc": "The text will be hidden if it collides with any other previously drawn symbol."
2389
+ },
2390
+ "always": {
2391
+ "doc": "The text will be visible even if it collides with any other previously drawn symbol."
2392
+ },
2393
+ "cooperative": {
2394
+ "doc": "If the text collides with another previously drawn symbol, the overlap mode for that symbol is checked. If the previous symbol was placed using `never` overlap mode, the new text is hidden. If the previous symbol was placed using `always` or `cooperative` overlap mode, the new text is visible."
2395
+ }
2396
+ },
2397
+ "doc": "Allows for control over whether to show symbol text when it overlaps other symbols on the map. If `text-overlap` is not set, `text-allow-overlap` is used instead",
2398
+ "requires": [
2399
+ "text-field"
2400
+ ],
2401
+ "sdk-support": {
2402
+ "basic functionality": {
2403
+ "js": "2.1.0"
2404
+ }
2405
+ },
2406
+ "expression": {
2407
+ "interpolated": false,
2408
+ "parameters": [
2409
+ "zoom"
2410
+ ]
2411
+ },
2412
+ "property-type": "data-constant"
2413
+ },
2265
2414
  "text-ignore-placement": {
2266
2415
  "type": "boolean",
2267
2416
  "default": false,
@@ -2426,6 +2575,9 @@
2426
2575
  },
2427
2576
  "!has": {
2428
2577
  "doc": "`[\"!has\", key]` `feature[key]` does not exist"
2578
+ },
2579
+ "within": {
2580
+ "doc": "`[\"within\", object]` feature geometry is within object geometry"
2429
2581
  }
2430
2582
  },
2431
2583
  "doc": "The filter operator."
@@ -2593,7 +2745,28 @@
2593
2745
  "group": "Lookup",
2594
2746
  "sdk-support": {
2595
2747
  "basic functionality": {
2596
- "js": "1.6.0"
2748
+ "js": "1.6.0",
2749
+ "android": "9.1.0",
2750
+ "ios": "5.8.0",
2751
+ "macos": "0.15.0"
2752
+ }
2753
+ }
2754
+ },
2755
+ "index-of": {
2756
+ "doc": "Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",
2757
+ "group": "Lookup",
2758
+ "sdk-support": {
2759
+ "basic functionality": {
2760
+ "js": "1.10.0"
2761
+ }
2762
+ }
2763
+ },
2764
+ "slice": {
2765
+ "doc": "Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",
2766
+ "group": "Lookup",
2767
+ "sdk-support": {
2768
+ "basic functionality": {
2769
+ "js": "1.10.0"
2597
2770
  }
2598
2771
  }
2599
2772
  },
@@ -2610,7 +2783,7 @@
2610
2783
  }
2611
2784
  },
2612
2785
  "match": {
2613
- "doc": "Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `[\"get\", \"building_type\"]`). Each label must be either:\n * a single literal value; or\n * an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `[\"c\", \"b\"]`). The input matches if any of the values in the array matches, similar to the `\"in\"` operator.\n\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.",
2786
+ "doc": "Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `[\"get\", \"building_type\"]`). Each label must be either:\n - a single literal value; or\n - an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `[\"c\", \"b\"]`). The input matches if any of the values in the array matches, similar to the `\"in\"` operator.\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.",
2614
2787
  "group": "Decision",
2615
2788
  "sdk-support": {
2616
2789
  "basic functionality": {
@@ -2646,7 +2819,7 @@
2646
2819
  }
2647
2820
  },
2648
2821
  "interpolate": {
2649
- "doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `[\"linear\"]`: interpolates linearly between the pair of stops just less than and just greater than the input.\n- `[\"exponential\", base]`: interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `[\"cubic-bezier\", x1, y1, x2, y2]`: interpolates using the cubic bezier curve defined by the given control points.",
2822
+ "doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `[\"linear\"]`, or an expression returning one of those types: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `[\"exponential\", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `[\"cubic-bezier\", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.",
2650
2823
  "group": "Ramps, scales, curves",
2651
2824
  "sdk-support": {
2652
2825
  "basic functionality": {
@@ -2784,7 +2957,7 @@
2784
2957
  }
2785
2958
  },
2786
2959
  "format": {
2787
- "doc": "Returns `formatted` text containing annotations for use in mixed-format `text-field` entries. For a `text-field` entries of a string type, following option object's properties are supported: If set, the `text-font` value overrides the font specified by the root layout properties. If set, the `font-scale` value specifies a scaling factor relative to the `text-size` specified in the root layout properties. If set, the `text-color` value overrides the color specified by the root paint properties for this layer.",
2960
+ "doc": "Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`'image'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `\"text-font\"`: Overrides the font stack specified by the root layout property.\n- `\"text-color\"`: Overrides the color specified by the root paint property.\n- `\"font-scale\"`: Applies a scaling factor on `text-size` as specified by the root layout property.",
2788
2961
  "group": "Types",
2789
2962
  "sdk-support": {
2790
2963
  "basic functionality": {
@@ -2812,7 +2985,10 @@
2812
2985
  "macos": "0.14.0"
2813
2986
  },
2814
2987
  "image": {
2815
- "js": "1.6.0"
2988
+ "js": "1.6.0",
2989
+ "android": "8.6.0",
2990
+ "ios": "5.7.0",
2991
+ "macos": "0.15.0"
2816
2992
  }
2817
2993
  }
2818
2994
  },
@@ -2823,7 +2999,8 @@
2823
2999
  "basic functionality": {
2824
3000
  "js": "1.4.0",
2825
3001
  "android": "8.6.0",
2826
- "ios": "5.6.0"
3002
+ "ios": "5.7.0",
3003
+ "macos": "0.15.0"
2827
3004
  }
2828
3005
  }
2829
3006
  },
@@ -2969,7 +3146,7 @@
2969
3146
  }
2970
3147
  },
2971
3148
  "feature-state": {
2972
- "doc": "Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",
3149
+ "doc": "Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. When `source.promoteId` is not provided, features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. When `source.promoteId` is provided, features are identified by their `promoteId` property, which may be a number, string, or any primitive data type. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",
2973
3150
  "group": "Feature data",
2974
3151
  "sdk-support": {
2975
3152
  "basic functionality": {
@@ -2978,7 +3155,7 @@
2978
3155
  }
2979
3156
  },
2980
3157
  "geometry-type": {
2981
- "doc": "Gets the feature's geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.",
3158
+ "doc": "Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",
2982
3159
  "group": "Feature data",
2983
3160
  "sdk-support": {
2984
3161
  "basic functionality": {
@@ -3310,6 +3487,17 @@
3310
3487
  }
3311
3488
  }
3312
3489
  },
3490
+ "distance": {
3491
+ "doc": "Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",
3492
+ "group": "Math",
3493
+ "sdk-support": {
3494
+ "basic functionality": {
3495
+ "android": "9.2.0",
3496
+ "ios": "5.9.0",
3497
+ "macos": "0.16.0"
3498
+ }
3499
+ }
3500
+ },
3313
3501
  "==": {
3314
3502
  "doc": "Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",
3315
3503
  "group": "Decision",
@@ -3454,8 +3642,20 @@
3454
3642
  }
3455
3643
  }
3456
3644
  },
3645
+ "within": {
3646
+ "doc": "Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",
3647
+ "group": "Decision",
3648
+ "sdk-support": {
3649
+ "basic functionality": {
3650
+ "js": "1.9.0",
3651
+ "android": "9.1.0",
3652
+ "ios": "5.8.0",
3653
+ "macos": "0.15.0"
3654
+ }
3655
+ }
3656
+ },
3457
3657
  "is-supported-script": {
3458
- "doc": "Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",
3658
+ "doc": "Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in MapLibre GL JS).",
3459
3659
  "group": "String",
3460
3660
  "sdk-support": {
3461
3661
  "basic functionality": {
@@ -3622,6 +3822,29 @@
3622
3822
  }
3623
3823
  }
3624
3824
  },
3825
+ "terrain": {
3826
+ "source": {
3827
+ "type": "string",
3828
+ "doc": "The source for the terrain data.",
3829
+ "required": true,
3830
+ "sdk-support": {
3831
+ "basic functionality": {
3832
+ "js": "2.2.0"
3833
+ }
3834
+ }
3835
+ },
3836
+ "exaggeration": {
3837
+ "type": "number",
3838
+ "minimum": 0,
3839
+ "doc": "The exaggeration of the terrain - how high it will look.",
3840
+ "default": 1.0,
3841
+ "sdk-support": {
3842
+ "basic functionality": {
3843
+ "js": "2.2.0"
3844
+ }
3845
+ }
3846
+ }
3847
+ },
3625
3848
  "paint": [
3626
3849
  "paint_fill",
3627
3850
  "paint_line",
@@ -5795,4 +6018,4 @@
5795
6018
  "doc": "A name of a feature property to use as ID for feature state."
5796
6019
  }
5797
6020
  }
5798
- }
6021
+ }