@maplibre/maplibre-react-native 8.6.0-beta.2 → 9.0.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/CHANGELOG.md +11 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +1 -3
- package/android/install.md +3 -3
- package/android/rctmgl/build.gradle +1 -1
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +33 -0
- package/app.plugin.js +1 -1
- package/docs/Annotation.md +1 -1
- package/docs/Annotations.md +3 -8
- package/docs/BackgroundLayer.md +2 -2
- package/docs/Callout.md +1 -1
- package/docs/Camera.md +2 -2
- package/docs/CircleLayer.md +31 -14
- package/docs/CustomHttpHeaders.md +9 -9
- package/docs/FillExtrusionLayer.md +2 -2
- package/docs/FillLayer.md +27 -10
- package/docs/GettingStarted.md +4 -6
- package/docs/HeadingIndicator.md +1 -1
- package/docs/HeatmapLayer.md +2 -2
- package/docs/ImageSource.md +1 -1
- package/docs/Images.md +1 -1
- package/docs/Light.md +1 -1
- package/docs/LineLayer.md +31 -14
- package/docs/{MapboxGL.md → MapLibreGL.md} +5 -5
- package/docs/MapView.md +5 -5
- package/docs/MarkerView.md +1 -1
- package/docs/NativeUserLocation.md +1 -1
- package/docs/OfflineManager.md +16 -16
- package/docs/PointAnnotation.md +1 -1
- package/docs/RasterLayer.md +2 -2
- package/docs/RasterSource.md +2 -2
- package/docs/ShapeSource.md +2 -2
- package/docs/Style.md +3 -3
- package/docs/StyleSheet.md +93 -72
- package/docs/SymbolLayer.md +17 -13
- package/docs/UserLocation.md +2 -2
- package/docs/VectorSource.md +2 -2
- package/docs/docs.json +102 -46
- package/docs/snapshotManager.md +7 -7
- package/index.d.ts +8 -7
- package/ios/RCTMGL/RCTMGLStyle.h +3 -0
- package/ios/RCTMGL/RCTMGLStyle.m +23 -2
- package/ios/RCTMGL/index.d.ts +24 -5
- package/ios/install.md +3 -3
- package/javascript/components/BackgroundLayer.js +2 -2
- package/javascript/components/Camera.js +6 -6
- package/javascript/components/CircleLayer.js +2 -2
- package/javascript/components/FillExtrusionLayer.js +2 -2
- package/javascript/components/FillLayer.js +2 -2
- package/javascript/components/HeatmapLayer.js +2 -2
- package/javascript/components/LineLayer.js +2 -2
- package/javascript/components/MapView.js +38 -41
- package/javascript/components/RasterLayer.js +2 -2
- package/javascript/components/RasterSource.js +2 -2
- package/javascript/components/ShapeSource.js +2 -2
- package/javascript/components/Style.js +3 -3
- package/javascript/components/SymbolLayer.js +2 -2
- package/javascript/components/UserLocation.js +2 -0
- package/javascript/components/VectorSource.js +2 -2
- package/javascript/index.js +38 -42
- package/javascript/modules/location/locationManager.js +8 -8
- package/javascript/modules/offline/OfflinePack.js +4 -4
- package/javascript/modules/offline/offlineManager.js +34 -34
- package/javascript/modules/snapshot/SnapshotOptions.js +2 -2
- package/javascript/modules/snapshot/snapshotManager.js +8 -8
- package/javascript/utils/styleMap.js +37 -6
- package/maplibre-react-native.podspec +1 -1
- package/package.json +5 -5
- package/plugin/build/{withMapbox.d.ts → withMapLibre.d.ts} +1 -1
- package/plugin/build/{withMapbox.js → withMapLibre.js} +9 -9
- package/scripts/download-style-spec.sh +2 -2
- package/scripts/templates/component.md.ejs +1 -1
- package/scripts/templates/styleMap.js.ejs +1 -1
- package/style-spec/v8.json +266 -43
package/docs/SymbolLayer.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<!-- This file was autogenerated from SymbolLayer.js do not modify -->
|
|
2
|
-
## <
|
|
2
|
+
## <MapLibreGL.SymbolLayer />
|
|
3
3
|
### SymbolLayer is a style layer that renders icon and text labels at points or along lines on the map.
|
|
4
4
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
|
|
9
|
-
| sourceID | `string` | `
|
|
9
|
+
| sourceID | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
|
|
10
10
|
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |
|
|
11
11
|
| aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
|
|
12
12
|
| belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
|
|
@@ -129,7 +129,7 @@ ___
|
|
|
129
129
|
`symbolAvoidEdges`
|
|
130
130
|
|
|
131
131
|
#### Description
|
|
132
|
-
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
|
|
132
|
+
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.
|
|
133
133
|
|
|
134
134
|
#### Type
|
|
135
135
|
`boolean`
|
|
@@ -147,7 +147,7 @@ ___
|
|
|
147
147
|
`symbolSortKey`
|
|
148
148
|
|
|
149
149
|
#### Description
|
|
150
|
-
Sorts features in ascending order based on this value. Features with
|
|
150
|
+
Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `iconAllowOverlap` or `textAllowOverlap` is `false`, features with a lower sort key will have priority during placement. When `iconAllowOverlap` or `textAllowOverlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.
|
|
151
151
|
|
|
152
152
|
#### Type
|
|
153
153
|
`number`
|
|
@@ -163,7 +163,7 @@ ___
|
|
|
163
163
|
`symbolZOrder`
|
|
164
164
|
|
|
165
165
|
#### Description
|
|
166
|
-
|
|
166
|
+
Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their yPosition relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbolSortKey`.
|
|
167
167
|
|
|
168
168
|
#### Type
|
|
169
169
|
`enum`
|
|
@@ -171,9 +171,9 @@ Controls the order in which overlapping symbols in the same layer are rendered
|
|
|
171
171
|
`auto`
|
|
172
172
|
|
|
173
173
|
#### Supported Values
|
|
174
|
-
**auto** -
|
|
175
|
-
**viewport-y** -
|
|
176
|
-
**source** -
|
|
174
|
+
**auto** - 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`.<br />
|
|
175
|
+
**viewport-y** - 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`.<br />
|
|
176
|
+
**source** - Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data.<br />
|
|
177
177
|
|
|
178
178
|
|
|
179
179
|
#### Expression
|
|
@@ -197,6 +197,9 @@ If true, the icon will be visible even if it collides with other previously draw
|
|
|
197
197
|
#### Requires
|
|
198
198
|
`iconImage`
|
|
199
199
|
|
|
200
|
+
#### Disabled By
|
|
201
|
+
`iconOverlap`
|
|
202
|
+
|
|
200
203
|
#### Expression
|
|
201
204
|
|
|
202
205
|
Parameters: `zoom`
|
|
@@ -393,7 +396,7 @@ ___
|
|
|
393
396
|
`iconPadding`
|
|
394
397
|
|
|
395
398
|
#### Description
|
|
396
|
-
Size of
|
|
399
|
+
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 oneElement array padding applied to all sides.
|
|
397
400
|
|
|
398
401
|
#### Type
|
|
399
402
|
`number`
|
|
@@ -403,16 +406,13 @@ Size of the additional area around the icon bounding box used for detecting symb
|
|
|
403
406
|
#### Units
|
|
404
407
|
`pixels`
|
|
405
408
|
|
|
406
|
-
#### Minimum
|
|
407
|
-
`0`
|
|
408
|
-
|
|
409
409
|
|
|
410
410
|
#### Requires
|
|
411
411
|
`iconImage`
|
|
412
412
|
|
|
413
413
|
#### Expression
|
|
414
414
|
|
|
415
|
-
Parameters: `zoom`
|
|
415
|
+
Parameters: `zoom, feature`
|
|
416
416
|
|
|
417
417
|
___
|
|
418
418
|
|
|
@@ -556,6 +556,7 @@ In combination with `symbolPlacement`, determines the rotation behavior of the i
|
|
|
556
556
|
#### Supported Values
|
|
557
557
|
**map** - When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line.<br />
|
|
558
558
|
**viewport** - Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.<br />
|
|
559
|
+
**viewport-glyph** - 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.<br />
|
|
559
560
|
**auto** - 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`.<br />
|
|
560
561
|
|
|
561
562
|
|
|
@@ -1007,6 +1008,9 @@ If true, the text will be visible even if it collides with other previously draw
|
|
|
1007
1008
|
#### Requires
|
|
1008
1009
|
`textField`
|
|
1009
1010
|
|
|
1011
|
+
#### Disabled By
|
|
1012
|
+
`textOverlap`
|
|
1013
|
+
|
|
1010
1014
|
#### Expression
|
|
1011
1015
|
|
|
1012
1016
|
Parameters: `zoom`
|
package/docs/UserLocation.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- This file was autogenerated from UserLocation.js do not modify -->
|
|
2
|
-
## <
|
|
2
|
+
## <MapLibreGL.UserLocation />
|
|
3
3
|
###
|
|
4
4
|
|
|
5
5
|
### props
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
| onUpdate | `func` | `none` | `false` | Callback that is triggered on location update |
|
|
14
14
|
| showsUserHeadingIndicator | `bool` | `false` | `false` | Show or hide small arrow which indicates direction the device is pointing relative to north. |
|
|
15
15
|
| minDisplacement | `number` | `0` | `false` | Minimum amount of movement before GPS location is updated in meters |
|
|
16
|
-
| children | `any` | `none` | `false` | Custom location icon of type mapbox-gl-native components |
|
|
16
|
+
| children | `any` | `none` | `false` | Custom location icon of type mapbox-gl-native components<br/><br/>NOTE: Forking maintainer does not understand the above comment. |
|
|
17
17
|
|
|
18
18
|
### methods
|
|
19
19
|
#### setLocationManager({running})
|
package/docs/VectorSource.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<!-- This file was autogenerated from VectorSource.js do not modify -->
|
|
2
|
-
## <
|
|
2
|
+
## <MapLibreGL.VectorSource />
|
|
3
3
|
### VectorSource is a map content source that supplies tiled vector data in Mapbox Vector Tile format to be shown on the map.<br/>The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification.
|
|
4
4
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
| id | `string` | `
|
|
8
|
+
| id | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
|
|
9
9
|
| url | `string` | `none` | `false` | A URL to a TileJSON configuration file describing the source’s contents and other metadata. |
|
|
10
10
|
| tileUrlTemplates | `array` | `none` | `false` | An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.<br/>Example: https://example.com/vector-tiles/{z}/{x}/{y}.pbf |
|
|
11
11
|
| minZoomLevel | `number` | `none` | `false` | An unsigned integer that specifies the minimum zoom level at which to display tiles from the source.<br/>The value should be between 0 and 22, inclusive, and less than<br/>maxZoomLevel, if specified. The default value for this option is 0. |
|
package/docs/docs.json
CHANGED
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"name": "sourceID",
|
|
110
110
|
"required": false,
|
|
111
111
|
"type": "string",
|
|
112
|
-
"default": "
|
|
112
|
+
"default": "MapLibreGL.StyleSource.DefaultSourceID",
|
|
113
113
|
"description": "The source from which to obtain the data to style.\nIf the source has not yet been added to the current style, the behavior is undefined.\nInferred from parent source only if the layer is a direct child to it."
|
|
114
114
|
},
|
|
115
115
|
{
|
|
@@ -855,7 +855,7 @@
|
|
|
855
855
|
"required": false,
|
|
856
856
|
"type": "enum",
|
|
857
857
|
"default": "none",
|
|
858
|
-
"description": "The mode used to track the user location on the map. One of; \"normal\", \"compass\", \"course\". Each mode string is also available as a member on the `
|
|
858
|
+
"description": "The mode used to track the user location on the map. One of; \"normal\", \"compass\", \"course\". Each mode string is also available as a member on the `MapLibreGL.UserTrackingModes` object. `Follow` (normal), `FollowWithHeading` (compass), `FollowWithCourse` (course). NOTE: `followUserLocation` must be set to `true` for any of the modes to take effect. [Example](../example/src/examples/Camera/SetUserTrackingModes.js)"
|
|
859
859
|
},
|
|
860
860
|
{
|
|
861
861
|
"name": "followZoomLevel",
|
|
@@ -908,7 +908,7 @@
|
|
|
908
908
|
"name": "sourceID",
|
|
909
909
|
"required": false,
|
|
910
910
|
"type": "string",
|
|
911
|
-
"default": "
|
|
911
|
+
"default": "MapLibreGL.StyleSource.DefaultSourceID",
|
|
912
912
|
"description": "The source from which to obtain the data to style.\nIf the source has not yet been added to the current style, the behavior is undefined.\nInferred from parent source only if the layer is a direct child to it."
|
|
913
913
|
},
|
|
914
914
|
{
|
|
@@ -974,6 +974,22 @@
|
|
|
974
974
|
"fileNameWithExt": "CircleLayer.js",
|
|
975
975
|
"name": "CircleLayer",
|
|
976
976
|
"styles": [
|
|
977
|
+
{
|
|
978
|
+
"name": "circleSortKey",
|
|
979
|
+
"type": "number",
|
|
980
|
+
"values": [],
|
|
981
|
+
"description": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.",
|
|
982
|
+
"requires": [],
|
|
983
|
+
"disabledBy": [],
|
|
984
|
+
"allowedFunctionTypes": [],
|
|
985
|
+
"expression": {
|
|
986
|
+
"interpolated": false,
|
|
987
|
+
"parameters": [
|
|
988
|
+
"zoom",
|
|
989
|
+
"feature"
|
|
990
|
+
]
|
|
991
|
+
}
|
|
992
|
+
},
|
|
977
993
|
{
|
|
978
994
|
"name": "visibility",
|
|
979
995
|
"type": "enum",
|
|
@@ -1250,7 +1266,7 @@
|
|
|
1250
1266
|
"name": "sourceID",
|
|
1251
1267
|
"required": false,
|
|
1252
1268
|
"type": "string",
|
|
1253
|
-
"default": "
|
|
1269
|
+
"default": "MapLibreGL.StyleSource.DefaultSourceID",
|
|
1254
1270
|
"description": "The source from which to obtain the data to style.\nIf the source has not yet been added to the current style, the behavior is undefined.\nInferred from parent source only if the layer is a direct child to it."
|
|
1255
1271
|
},
|
|
1256
1272
|
{
|
|
@@ -1502,7 +1518,7 @@
|
|
|
1502
1518
|
"name": "sourceID",
|
|
1503
1519
|
"required": false,
|
|
1504
1520
|
"type": "string",
|
|
1505
|
-
"default": "
|
|
1521
|
+
"default": "MapLibreGL.StyleSource.DefaultSourceID",
|
|
1506
1522
|
"description": "The source from which to obtain the data to style.\nIf the source has not yet been added to the current style, the behavior is undefined.\nInferred from parent source only if the layer is a direct child to it."
|
|
1507
1523
|
},
|
|
1508
1524
|
{
|
|
@@ -1568,6 +1584,22 @@
|
|
|
1568
1584
|
"fileNameWithExt": "FillLayer.js",
|
|
1569
1585
|
"name": "FillLayer",
|
|
1570
1586
|
"styles": [
|
|
1587
|
+
{
|
|
1588
|
+
"name": "fillSortKey",
|
|
1589
|
+
"type": "number",
|
|
1590
|
+
"values": [],
|
|
1591
|
+
"description": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.",
|
|
1592
|
+
"requires": [],
|
|
1593
|
+
"disabledBy": [],
|
|
1594
|
+
"allowedFunctionTypes": [],
|
|
1595
|
+
"expression": {
|
|
1596
|
+
"interpolated": false,
|
|
1597
|
+
"parameters": [
|
|
1598
|
+
"zoom",
|
|
1599
|
+
"feature"
|
|
1600
|
+
]
|
|
1601
|
+
}
|
|
1602
|
+
},
|
|
1571
1603
|
{
|
|
1572
1604
|
"name": "visibility",
|
|
1573
1605
|
"type": "enum",
|
|
@@ -1764,7 +1796,7 @@
|
|
|
1764
1796
|
"name": "sourceID",
|
|
1765
1797
|
"required": false,
|
|
1766
1798
|
"type": "string",
|
|
1767
|
-
"default": "
|
|
1799
|
+
"default": "MapLibreGL.StyleSource.DefaultSourceID",
|
|
1768
1800
|
"description": "The source from which to obtain the data to style.\nIf the source has not yet been added to the current style, the behavior is undefined.\nInferred from parent source only if the layer is a direct child to it."
|
|
1769
1801
|
},
|
|
1770
1802
|
{
|
|
@@ -2167,7 +2199,7 @@
|
|
|
2167
2199
|
"name": "sourceID",
|
|
2168
2200
|
"required": false,
|
|
2169
2201
|
"type": "string",
|
|
2170
|
-
"default": "
|
|
2202
|
+
"default": "MapLibreGL.StyleSource.DefaultSourceID",
|
|
2171
2203
|
"description": "The source from which to obtain the data to style.\nIf the source has not yet been added to the current style, the behavior is undefined.\nInferred from parent source only if the layer is a direct child to it."
|
|
2172
2204
|
},
|
|
2173
2205
|
{
|
|
@@ -2326,6 +2358,22 @@
|
|
|
2326
2358
|
]
|
|
2327
2359
|
}
|
|
2328
2360
|
},
|
|
2361
|
+
{
|
|
2362
|
+
"name": "lineSortKey",
|
|
2363
|
+
"type": "number",
|
|
2364
|
+
"values": [],
|
|
2365
|
+
"description": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.",
|
|
2366
|
+
"requires": [],
|
|
2367
|
+
"disabledBy": [],
|
|
2368
|
+
"allowedFunctionTypes": [],
|
|
2369
|
+
"expression": {
|
|
2370
|
+
"interpolated": false,
|
|
2371
|
+
"parameters": [
|
|
2372
|
+
"zoom",
|
|
2373
|
+
"feature"
|
|
2374
|
+
]
|
|
2375
|
+
}
|
|
2376
|
+
},
|
|
2329
2377
|
{
|
|
2330
2378
|
"name": "visibility",
|
|
2331
2379
|
"type": "enum",
|
|
@@ -2579,7 +2627,7 @@
|
|
|
2579
2627
|
]
|
|
2580
2628
|
},
|
|
2581
2629
|
"MapView": {
|
|
2582
|
-
"description": "MapView backed by
|
|
2630
|
+
"description": "MapView backed by MapLibre GL Native",
|
|
2583
2631
|
"displayName": "MapView",
|
|
2584
2632
|
"methods": [
|
|
2585
2633
|
{
|
|
@@ -2881,7 +2929,7 @@
|
|
|
2881
2929
|
"required": false,
|
|
2882
2930
|
"type": "string",
|
|
2883
2931
|
"default": "none",
|
|
2884
|
-
"description": "Style URL for map - notice, if non is set it _will_ default to `
|
|
2932
|
+
"description": "Style URL for map - notice, if non is set it _will_ default to `MapLibreGL.StyleURL.Street`"
|
|
2885
2933
|
},
|
|
2886
2934
|
{
|
|
2887
2935
|
"name": "styleJSON",
|
|
@@ -2937,7 +2985,7 @@
|
|
|
2937
2985
|
"required": false,
|
|
2938
2986
|
"type": "bool",
|
|
2939
2987
|
"default": "true",
|
|
2940
|
-
"description": "
|
|
2988
|
+
"description": "Enable/Disable attribution on map.\n\nThis must be enabled for Mapbox-hosted tiles and styles. Please refer to the Mapbox Terms of Service.\nOther providers do not require this."
|
|
2941
2989
|
},
|
|
2942
2990
|
{
|
|
2943
2991
|
"name": "attributionPosition",
|
|
@@ -2957,7 +3005,7 @@
|
|
|
2957
3005
|
"name": "logoEnabled",
|
|
2958
3006
|
"required": false,
|
|
2959
3007
|
"type": "bool",
|
|
2960
|
-
"default": "
|
|
3008
|
+
"default": "false",
|
|
2961
3009
|
"description": "Enable/Disable the logo on the map."
|
|
2962
3010
|
},
|
|
2963
3011
|
{
|
|
@@ -3382,7 +3430,7 @@
|
|
|
3382
3430
|
"name": "sourceID",
|
|
3383
3431
|
"required": false,
|
|
3384
3432
|
"type": "string",
|
|
3385
|
-
"default": "
|
|
3433
|
+
"default": "MapLibreGL.StyleSource.DefaultSourceID",
|
|
3386
3434
|
"description": "The source from which to obtain the data to style.\nIf the source has not yet been added to the current style, the behavior is undefined.\nInferred from parent source only if the layer is a direct child to it."
|
|
3387
3435
|
},
|
|
3388
3436
|
{
|
|
@@ -3635,7 +3683,7 @@
|
|
|
3635
3683
|
"name": "id",
|
|
3636
3684
|
"required": false,
|
|
3637
3685
|
"type": "string",
|
|
3638
|
-
"default": "
|
|
3686
|
+
"default": "MapLibreGL.StyleSource.DefaultSourceID",
|
|
3639
3687
|
"description": "A string that uniquely identifies the source."
|
|
3640
3688
|
},
|
|
3641
3689
|
{
|
|
@@ -3848,7 +3896,7 @@
|
|
|
3848
3896
|
"name": "id",
|
|
3849
3897
|
"required": false,
|
|
3850
3898
|
"type": "string",
|
|
3851
|
-
"default": "
|
|
3899
|
+
"default": "MapLibreGL.StyleSource.DefaultSourceID",
|
|
3852
3900
|
"description": "A string that uniquely identifies the source."
|
|
3853
3901
|
},
|
|
3854
3902
|
{
|
|
@@ -3997,7 +4045,7 @@
|
|
|
3997
4045
|
"name": "ShapeSource"
|
|
3998
4046
|
},
|
|
3999
4047
|
"Style": {
|
|
4000
|
-
"description": "Style is a component that automatically adds sources / layers to the map using
|
|
4048
|
+
"description": "Style is a component that automatically adds sources / layers to the map using MapLibre Style Spec.\nOnly [`sources`](https://maplibre.org/maplibre-gl-js-docs/style-spec/sources/) & [`layers`](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/) are supported.\nOther fields such as `sprites`, `glyphs` etc. will be ignored. Not all layer / source attributes from the style spec are supported, in general the supported attributes will be mentioned under https://github.com/maplibre/maplibre-react-native/tree/main/docs.\n\nTODO: Maintainer forking this project does not understand the above comment regarding what is supported.",
|
|
4001
4049
|
"displayName": "Style",
|
|
4002
4050
|
"methods": [],
|
|
4003
4051
|
"props": [
|
|
@@ -4006,7 +4054,7 @@
|
|
|
4006
4054
|
"required": false,
|
|
4007
4055
|
"type": "any",
|
|
4008
4056
|
"default": "none",
|
|
4009
|
-
"description": "A JSON object conforming to the schema described in the
|
|
4057
|
+
"description": "A JSON object conforming to the schema described in the MapLibre Style Specification, or a URL to such JSON."
|
|
4010
4058
|
}
|
|
4011
4059
|
],
|
|
4012
4060
|
"fileNameWithExt": "Style.js",
|
|
@@ -4028,7 +4076,7 @@
|
|
|
4028
4076
|
"name": "sourceID",
|
|
4029
4077
|
"required": false,
|
|
4030
4078
|
"type": "string",
|
|
4031
|
-
"default": "
|
|
4079
|
+
"default": "MapLibreGL.StyleSource.DefaultSourceID",
|
|
4032
4080
|
"description": "The source from which to obtain the data to style.\nIf the source has not yet been added to the current style, the behavior is undefined.\nInferred from parent source only if the layer is a direct child to it."
|
|
4033
4081
|
},
|
|
4034
4082
|
{
|
|
@@ -4146,7 +4194,7 @@
|
|
|
4146
4194
|
"type": "boolean",
|
|
4147
4195
|
"values": [],
|
|
4148
4196
|
"default": false,
|
|
4149
|
-
"description": "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
|
|
4197
|
+
"description": "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.",
|
|
4150
4198
|
"requires": [],
|
|
4151
4199
|
"disabledBy": [],
|
|
4152
4200
|
"allowedFunctionTypes": [],
|
|
@@ -4161,7 +4209,7 @@
|
|
|
4161
4209
|
"name": "symbolSortKey",
|
|
4162
4210
|
"type": "number",
|
|
4163
4211
|
"values": [],
|
|
4164
|
-
"description": "Sorts features in ascending order based on this value. Features with
|
|
4212
|
+
"description": "Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `iconAllowOverlap` or `textAllowOverlap` is `false`, features with a lower sort key will have priority during placement. When `iconAllowOverlap` or `textAllowOverlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.",
|
|
4165
4213
|
"requires": [],
|
|
4166
4214
|
"disabledBy": [],
|
|
4167
4215
|
"allowedFunctionTypes": [],
|
|
@@ -4179,19 +4227,19 @@
|
|
|
4179
4227
|
"values": [
|
|
4180
4228
|
{
|
|
4181
4229
|
"value": "auto",
|
|
4182
|
-
"doc": "
|
|
4230
|
+
"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`."
|
|
4183
4231
|
},
|
|
4184
4232
|
{
|
|
4185
4233
|
"value": "viewport-y",
|
|
4186
|
-
"doc": "
|
|
4234
|
+
"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`."
|
|
4187
4235
|
},
|
|
4188
4236
|
{
|
|
4189
4237
|
"value": "source",
|
|
4190
|
-
"doc": "
|
|
4238
|
+
"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."
|
|
4191
4239
|
}
|
|
4192
4240
|
],
|
|
4193
4241
|
"default": "auto",
|
|
4194
|
-
"description": "
|
|
4242
|
+
"description": "Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their yPosition relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbolSortKey`.",
|
|
4195
4243
|
"requires": [],
|
|
4196
4244
|
"disabledBy": [],
|
|
4197
4245
|
"allowedFunctionTypes": [],
|
|
@@ -4211,7 +4259,9 @@
|
|
|
4211
4259
|
"requires": [
|
|
4212
4260
|
"iconImage"
|
|
4213
4261
|
],
|
|
4214
|
-
"disabledBy": [
|
|
4262
|
+
"disabledBy": [
|
|
4263
|
+
"iconOverlap"
|
|
4264
|
+
],
|
|
4215
4265
|
"allowedFunctionTypes": [],
|
|
4216
4266
|
"expression": {
|
|
4217
4267
|
"interpolated": false,
|
|
@@ -4410,10 +4460,9 @@
|
|
|
4410
4460
|
"name": "iconPadding",
|
|
4411
4461
|
"type": "number",
|
|
4412
4462
|
"values": [],
|
|
4413
|
-
"minimum": 0,
|
|
4414
4463
|
"units": "pixels",
|
|
4415
4464
|
"default": 2,
|
|
4416
|
-
"description": "Size of
|
|
4465
|
+
"description": "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 oneElement array padding applied to all sides.",
|
|
4417
4466
|
"requires": [
|
|
4418
4467
|
"iconImage"
|
|
4419
4468
|
],
|
|
@@ -4422,7 +4471,8 @@
|
|
|
4422
4471
|
"expression": {
|
|
4423
4472
|
"interpolated": true,
|
|
4424
4473
|
"parameters": [
|
|
4425
|
-
"zoom"
|
|
4474
|
+
"zoom",
|
|
4475
|
+
"feature"
|
|
4426
4476
|
]
|
|
4427
4477
|
}
|
|
4428
4478
|
},
|
|
@@ -4596,6 +4646,10 @@
|
|
|
4596
4646
|
"value": "viewport",
|
|
4597
4647
|
"doc": "Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."
|
|
4598
4648
|
},
|
|
4649
|
+
{
|
|
4650
|
+
"value": "viewport-glyph",
|
|
4651
|
+
"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."
|
|
4652
|
+
},
|
|
4599
4653
|
{
|
|
4600
4654
|
"value": "auto",
|
|
4601
4655
|
"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`."
|
|
@@ -5036,7 +5090,9 @@
|
|
|
5036
5090
|
"requires": [
|
|
5037
5091
|
"textField"
|
|
5038
5092
|
],
|
|
5039
|
-
"disabledBy": [
|
|
5093
|
+
"disabledBy": [
|
|
5094
|
+
"textOverlap"
|
|
5095
|
+
],
|
|
5040
5096
|
"allowedFunctionTypes": [],
|
|
5041
5097
|
"expression": {
|
|
5042
5098
|
"interpolated": false,
|
|
@@ -5537,7 +5593,7 @@
|
|
|
5537
5593
|
"required": false,
|
|
5538
5594
|
"type": "any",
|
|
5539
5595
|
"default": "none",
|
|
5540
|
-
"description": "Custom location icon of type mapbox-gl-native components"
|
|
5596
|
+
"description": "Custom location icon of type mapbox-gl-native components\n\nNOTE: Forking maintainer does not understand the above comment."
|
|
5541
5597
|
}
|
|
5542
5598
|
],
|
|
5543
5599
|
"fileNameWithExt": "UserLocation.js",
|
|
@@ -5603,7 +5659,7 @@
|
|
|
5603
5659
|
"name": "id",
|
|
5604
5660
|
"required": false,
|
|
5605
5661
|
"type": "string",
|
|
5606
|
-
"default": "
|
|
5662
|
+
"default": "MapLibreGL.StyleSource.DefaultSourceID",
|
|
5607
5663
|
"description": "A string that uniquely identifies the source."
|
|
5608
5664
|
},
|
|
5609
5665
|
{
|
|
@@ -5768,7 +5824,7 @@
|
|
|
5768
5824
|
}
|
|
5769
5825
|
],
|
|
5770
5826
|
"examples": [
|
|
5771
|
-
"const progressListener = (offlineRegion, status) => console.log(offlineRegion, status);\nconst errorListener = (offlineRegion, err) => console.log(offlineRegion, err);\n\nawait
|
|
5827
|
+
"const progressListener = (offlineRegion, status) => console.log(offlineRegion, status);\nconst errorListener = (offlineRegion, err) => console.log(offlineRegion, err);\n\nawait MapLibreGL.offlineManager.createPack({\n name: 'offlinePack',\n styleURL: 'mapbox://...',\n minZoom: 14,\n maxZoom: 20,\n bounds: [[neLng, neLat], [swLng, swLat]]\n}, progressListener, errorListener)"
|
|
5772
5828
|
],
|
|
5773
5829
|
"returns": {
|
|
5774
5830
|
"description": "",
|
|
@@ -5791,7 +5847,7 @@
|
|
|
5791
5847
|
}
|
|
5792
5848
|
],
|
|
5793
5849
|
"examples": [
|
|
5794
|
-
"await
|
|
5850
|
+
"await MapLibreGL.offlineManager.invalidatePack('packName')"
|
|
5795
5851
|
],
|
|
5796
5852
|
"returns": {
|
|
5797
5853
|
"description": "",
|
|
@@ -5814,7 +5870,7 @@
|
|
|
5814
5870
|
}
|
|
5815
5871
|
],
|
|
5816
5872
|
"examples": [
|
|
5817
|
-
"await
|
|
5873
|
+
"await MapLibreGL.offlineManager.deletePack('packName')"
|
|
5818
5874
|
],
|
|
5819
5875
|
"returns": {
|
|
5820
5876
|
"description": "",
|
|
@@ -5828,7 +5884,7 @@
|
|
|
5828
5884
|
"description": "Forces a revalidation of the tiles in the ambient cache and downloads a fresh version of the tiles from the tile server.\nThis is the recommend method for clearing the cache.\nThis is the most efficient method because tiles in the ambient cache are re-downloaded to remove outdated data from a device.\nIt does not erase resources from the ambient cache or delete the database, which can be computationally expensive operations that may carry unintended side effects.",
|
|
5829
5885
|
"params": [],
|
|
5830
5886
|
"examples": [
|
|
5831
|
-
"await
|
|
5887
|
+
"await MapLibreGL.offlineManager.invalidateAmbientCache();"
|
|
5832
5888
|
],
|
|
5833
5889
|
"returns": {
|
|
5834
5890
|
"description": "",
|
|
@@ -5842,7 +5898,7 @@
|
|
|
5842
5898
|
"description": "Erases resources from the ambient cache.\nThis method clears the cache and decreases the amount of space that map resources take up on the device.",
|
|
5843
5899
|
"params": [],
|
|
5844
5900
|
"examples": [
|
|
5845
|
-
"await
|
|
5901
|
+
"await MapLibreGL.offlineManager.clearAmbientCache();"
|
|
5846
5902
|
],
|
|
5847
5903
|
"returns": {
|
|
5848
5904
|
"description": "",
|
|
@@ -5865,7 +5921,7 @@
|
|
|
5865
5921
|
}
|
|
5866
5922
|
],
|
|
5867
5923
|
"examples": [
|
|
5868
|
-
"await
|
|
5924
|
+
"await MapLibreGL.offlineManager.setMaximumAmbientCacheSize(5000000);"
|
|
5869
5925
|
],
|
|
5870
5926
|
"returns": {
|
|
5871
5927
|
"description": "",
|
|
@@ -5879,7 +5935,7 @@
|
|
|
5879
5935
|
"description": "Deletes the existing database, which includes both the ambient cache and offline packs, then reinitializes it.",
|
|
5880
5936
|
"params": [],
|
|
5881
5937
|
"examples": [
|
|
5882
|
-
"await
|
|
5938
|
+
"await MapLibreGL.offlineManager.resetDatabase();"
|
|
5883
5939
|
],
|
|
5884
5940
|
"returns": {
|
|
5885
5941
|
"description": "",
|
|
@@ -5893,7 +5949,7 @@
|
|
|
5893
5949
|
"description": "Retrieves all the current offline packs that are stored in the database.",
|
|
5894
5950
|
"params": [],
|
|
5895
5951
|
"examples": [
|
|
5896
|
-
"const offlinePacks = await
|
|
5952
|
+
"const offlinePacks = await MapLibreGL.offlineManager.getPacks();"
|
|
5897
5953
|
],
|
|
5898
5954
|
"returns": {
|
|
5899
5955
|
"description": "",
|
|
@@ -5916,7 +5972,7 @@
|
|
|
5916
5972
|
}
|
|
5917
5973
|
],
|
|
5918
5974
|
"examples": [
|
|
5919
|
-
"const offlinePack = await
|
|
5975
|
+
"const offlinePack = await MapLibreGL.offlineManager.getPack();"
|
|
5920
5976
|
],
|
|
5921
5977
|
"returns": {
|
|
5922
5978
|
"description": "",
|
|
@@ -5939,7 +5995,7 @@
|
|
|
5939
5995
|
}
|
|
5940
5996
|
],
|
|
5941
5997
|
"examples": [
|
|
5942
|
-
"await
|
|
5998
|
+
"await MapLibreGL.offlineManager.mergeOfflineRegions(path);"
|
|
5943
5999
|
],
|
|
5944
6000
|
"returns": {
|
|
5945
6001
|
"description": "",
|
|
@@ -5950,7 +6006,7 @@
|
|
|
5950
6006
|
},
|
|
5951
6007
|
{
|
|
5952
6008
|
"name": "setTileCountLimit",
|
|
5953
|
-
"description": "Sets the maximum number of
|
|
6009
|
+
"description": "Sets the maximum number of tiles that may be downloaded and stored on the current device.\nConsult the Terms of Service for your map tile host before changing this value.",
|
|
5954
6010
|
"params": [
|
|
5955
6011
|
{
|
|
5956
6012
|
"name": "limit",
|
|
@@ -5962,7 +6018,7 @@
|
|
|
5962
6018
|
}
|
|
5963
6019
|
],
|
|
5964
6020
|
"examples": [
|
|
5965
|
-
"
|
|
6021
|
+
"MapLibreGL.offlineManager.setTileCountLimit(1000);"
|
|
5966
6022
|
],
|
|
5967
6023
|
"returns": {
|
|
5968
6024
|
"description": "",
|
|
@@ -5985,7 +6041,7 @@
|
|
|
5985
6041
|
}
|
|
5986
6042
|
],
|
|
5987
6043
|
"examples": [
|
|
5988
|
-
"
|
|
6044
|
+
"MapLibreGL.offlineManager.setProgressEventThrottle(500);"
|
|
5989
6045
|
],
|
|
5990
6046
|
"returns": {
|
|
5991
6047
|
"description": "",
|
|
@@ -6024,7 +6080,7 @@
|
|
|
6024
6080
|
}
|
|
6025
6081
|
],
|
|
6026
6082
|
"examples": [
|
|
6027
|
-
"const progressListener = (offlinePack, status) => console.log(offlinePack, status)\nconst errorListener = (offlinePack, err) => console.log(offlinePack, err)\
|
|
6083
|
+
"const progressListener = (offlinePack, status) => console.log(offlinePack, status)\nconst errorListener = (offlinePack, err) => console.log(offlinePack, err)\nMapLibreGL.offlineManager.subscribe('packName', progressListener, errorListener)"
|
|
6028
6084
|
],
|
|
6029
6085
|
"returns": {
|
|
6030
6086
|
"description": "",
|
|
@@ -6047,7 +6103,7 @@
|
|
|
6047
6103
|
}
|
|
6048
6104
|
],
|
|
6049
6105
|
"examples": [
|
|
6050
|
-
"
|
|
6106
|
+
"MapLibreGL.offlineManager.unsubscribe('packName')"
|
|
6051
6107
|
],
|
|
6052
6108
|
"returns": {
|
|
6053
6109
|
"description": "",
|
|
@@ -6079,7 +6135,7 @@
|
|
|
6079
6135
|
}
|
|
6080
6136
|
],
|
|
6081
6137
|
"examples": [
|
|
6082
|
-
"// creates a temp file png of base map\nconst uri = await
|
|
6138
|
+
"// creates a temp file png of base map\nconst uri = await MapLibreGL.snapshotManager.takeSnap({\n centerCoordinate: [-74.126410, 40.797968],\n width: width,\n height: height,\n zoomLevel: 12,\n pitch: 30,\n heading: 20,\n styleURL: MapLibreGL.StyleURL.Dark,\n writeToDisk: true, // Create a temporary file\n});\n\n// creates base64 png of base map without logo\nconst uri = await MapLibreGL.snapshotManager.takeSnap({\n centerCoordinate: [-74.126410, 40.797968],\n width: width,\n height: height,\n zoomLevel: 12,\n pitch: 30,\n heading: 20,\n styleURL: MapLibreGL.StyleURL.Dark,\n withLogo: false, // Disable Mapbox logo (Android only)\n});\n\n// creates snapshot with bounds\nconst uri = await MapLibreGL.snapshotManager.takeSnap({\n bounds: [[-74.126410, 40.797968], [-74.143727, 40.772177]],\n width: width,\n height: height,\n styleURL: MapLibreGL.StyleURL.Dark,\n});"
|
|
6083
6139
|
],
|
|
6084
6140
|
"returns": {
|
|
6085
6141
|
"description": "",
|