@rnmapbox/maps 10.0.0-beta.31 → 10.0.0-beta.34
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/.eslintrc.js +2 -2
- package/.github/ISSUE_TEMPLATE/bug_report.yml +112 -0
- package/.husky/pre-commit +5 -0
- package/.nvmrc +1 -1
- package/README-v10.md +1 -1
- package/README.md +28 -23
- package/android/install.md +1 -1
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/CameraStop.kt +27 -31
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.kt +53 -48
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTLayer.kt +5 -5
- package/docs/Annotation.md +8 -8
- package/docs/Annotations.md +14 -12
- package/docs/Atmosphere.md +76 -76
- package/docs/BackgroundLayer.md +44 -44
- package/docs/Callout.md +4 -4
- package/docs/Camera.md +124 -6
- package/docs/CircleLayer.md +129 -129
- package/docs/CustomHttpHeaders.md +15 -13
- package/docs/FillExtrusionLayer.md +120 -120
- package/docs/FillLayer.md +83 -83
- package/docs/HeadingIndicator.md +3 -3
- package/docs/HeatmapLayer.md +58 -58
- package/docs/ImageSource.md +4 -3
- package/docs/Images.md +3 -3
- package/docs/Light.md +45 -45
- package/docs/LineLayer.md +166 -166
- package/docs/Logger.md +8 -9
- package/docs/MapView.md +32 -32
- package/docs/MapboxGL.md +26 -27
- package/docs/MarkerView.md +11 -6
- package/docs/NativeUserLocation.md +3 -3
- package/docs/OfflineManager.md +35 -33
- package/docs/PointAnnotation.md +12 -6
- package/docs/RasterDemSource.md +3 -3
- package/docs/RasterLayer.md +99 -99
- package/docs/RasterSource.md +5 -3
- package/docs/ShapeSource.md +17 -16
- package/docs/SkyLayer.md +69 -69
- package/docs/Style.md +5 -3
- package/docs/StyleSheet.md +74 -278
- package/docs/SymbolLayer.md +454 -454
- package/docs/Terrain.md +6 -6
- package/docs/UserLocation.md +8 -8
- package/docs/VectorSource.md +9 -8
- package/docs/docs.json +196 -28
- package/docs/snapshotManager.md +7 -5
- package/index.d.ts +41 -26
- package/ios/RCTMGL-v10/CustomHttpHeaders.swift +39 -0
- package/ios/RCTMGL-v10/MGLModule.m +3 -0
- package/ios/RCTMGL-v10/MGLModule.swift +8 -0
- package/ios/RCTMGL-v10/RCTMGLCamera.swift +14 -5
- package/ios/RCTMGL-v10/RCTMGLMarkerView.swift +28 -14
- package/ios/RCTMGL-v10/RCTMGLMarkerViewWrapper.swift +24 -0
- package/ios/RCTMGL-v10/RCTMGLMarkerViewWrapperManager.m +8 -0
- package/ios/RCTMGL-v10/RCTMGLMarkerViewWrapperManager.swift +14 -0
- package/ios/RCTMGL-v10/RCTMGLOfflineModule.swift +10 -12
- package/javascript/{utils/animated → classes}/AnimatedCoordinatesArray.js +1 -1
- package/javascript/{utils/animated → classes}/AnimatedExtractCoordinateFromArray.js +3 -1
- package/javascript/{utils/animated → classes}/AnimatedPoint.js +0 -0
- package/javascript/{utils/animated → classes}/AnimatedRouteCoordinatesArray.js +3 -1
- package/javascript/{utils/animated → classes}/AnimatedShape.js +9 -3
- package/javascript/classes/index.d.ts +5 -0
- package/javascript/classes/index.js +5 -0
- package/javascript/components/Callout.js +1 -1
- package/javascript/components/Camera.tsx +5 -1
- package/javascript/components/Images.js +1 -1
- package/javascript/components/MapView.js +3 -4
- package/javascript/components/MarkerView.tsx +125 -0
- package/javascript/components/PointAnnotation.d.ts +13 -0
- package/javascript/components/RasterDemSource.js +1 -1
- package/javascript/components/RasterSource.js +1 -1
- package/javascript/components/ShapeSource.js +4 -4
- package/javascript/components/Style.js +1 -1
- package/javascript/components/annotations/Annotation.js +3 -3
- package/javascript/index.js +27 -14
- package/javascript/types/index.ts +14 -0
- package/javascript/utils/BridgeValue.ts +89 -0
- package/javascript/utils/StyleValue.ts +22 -10
- package/javascript/utils/animated/Animated.js +0 -11
- package/javascript/utils/deprecation.js +0 -1
- package/javascript/utils/geoUtils.d.ts +10 -0
- package/javascript/utils/index.d.ts +6 -0
- package/javascript/utils/{styleMap.js → styleMap.ts} +110 -354
- package/javascript/web/MapContext.ts +6 -0
- package/javascript/web/components/Camera.tsx +39 -0
- package/javascript/web/components/MapView.tsx +51 -0
- package/package.json +21 -20
- package/plugin/build/withMapbox.js +0 -2
- package/plugin/install.md +13 -6
- package/scripts/autogenHelpers/DocJSONBuilder.js +43 -4
- package/scripts/autogenHelpers/globals.js +0 -2
- package/scripts/autogenerate.js +3 -4
- package/scripts/templates/component.md.ejs +25 -25
- package/scripts/templates/{styleMap.js.ejs → styleMap.ts.ejs} +7 -4
- package/tsconfig.json +1 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -75
- package/javascript/components/MarkerView.js +0 -91
- package/javascript/utils/BridgeValue.js +0 -81
- package/javascript/utils/resolveAssetSource.d.ts +0 -5
- package/javascript/web/MapContext.js +0 -5
package/docs/Terrain.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<!-- This file was autogenerated from Terrain.js do not modify -->
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
# <MapboxGL.Terrain />
|
|
3
|
+
A global modifier that elevates layers and markers based on a DEM data source.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | Name of a source of raster_dem type to be used for terrain elevation. |
|
|
9
9
|
| exaggeration | `union` | `none` | `false` | Optional number between 0 and 1000 inclusive. Defaults to 1. Supports interpolateexpressions. Transitionable.<br/>Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value. |
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
## methods
|
|
12
|
+
### baseProps()
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
#### arguments
|
|
17
17
|
| Name | Type | Required | Description |
|
|
18
18
|
| ---- | :--: | :------: | :----------: |
|
|
19
19
|
|
package/docs/UserLocation.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- This file was autogenerated from UserLocation.js do not modify -->
|
|
2
|
-
|
|
3
|
-
###
|
|
2
|
+
# <MapboxGL.UserLocation />
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
## props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| animated | `bool` | `true` | `false` | Whether location icon is animated between updates |
|
|
@@ -15,22 +15,22 @@
|
|
|
15
15
|
| minDisplacement | `number` | `0` | `false` | Minimum amount of movement before GPS location is updated in meters |
|
|
16
16
|
| children | `any` | `none` | `false` | Custom location icon of type mapbox-gl-native components |
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
## methods
|
|
19
|
+
### setLocationManager({ running })
|
|
20
20
|
|
|
21
21
|
Whether to start or stop listening to the locationManager<br/><br/>Notice, that listening will start automatically when<br/>either `onUpdate` or `visible` are set
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
#### arguments
|
|
24
24
|
| Name | Type | Required | Description |
|
|
25
25
|
| ---- | :--: | :------: | :----------: |
|
|
26
26
|
| `{ running }` | `n/a` | `Yes` | undefined |
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
### needsLocationManagerRunning()
|
|
30
30
|
|
|
31
31
|
If locationManager should be running
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
#### arguments
|
|
34
34
|
| Name | Type | Required | Description |
|
|
35
35
|
| ---- | :--: | :------: | :----------: |
|
|
36
36
|
|
package/docs/VectorSource.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<!-- This file was autogenerated from VectorSource.js do not modify -->
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
# <MapboxGL.VectorSource />
|
|
3
|
+
VectorSource is a map content source that supplies tiled vector data in Mapbox Vector Tile format to be shown on the map.
|
|
4
|
+
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
5
|
|
|
5
|
-
|
|
6
|
+
## props
|
|
6
7
|
| Prop | Type | Default | Required | Description |
|
|
7
8
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
9
|
| id | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
|
|
@@ -17,12 +18,12 @@
|
|
|
17
18
|
| width | `number` | `none` | `true` | `width` of hitbox |
|
|
18
19
|
| height | `number` | `none` | `true` | `height` of hitbox |
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
## methods
|
|
22
|
+
### features([layerIDs][, filter])
|
|
22
23
|
|
|
23
24
|
Returns all features that match the query parameters regardless of whether or not the feature is<br/>currently rendered on the map. The domain of the query includes all currently-loaded vector tiles<br/>and GeoJSON source tiles. This function does not check tiles outside of the visible viewport.
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
#### arguments
|
|
26
27
|
| Name | Type | Required | Description |
|
|
27
28
|
| ---- | :--: | :------: | :----------: |
|
|
28
29
|
| `layerIDs` | `Array` | `No` | A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. |
|
|
@@ -35,11 +36,11 @@ vectorSource.features(['id1', 'id2'])
|
|
|
35
36
|
```
|
|
36
37
|
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
### onPress(event)
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
#### arguments
|
|
43
44
|
| Name | Type | Required | Description |
|
|
44
45
|
| ---- | :--: | :------: | :----------: |
|
|
45
46
|
| `event` | `n/a` | `Yes` | undefined |
|
package/docs/docs.json
CHANGED
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
"required": false,
|
|
332
332
|
"type": "string",
|
|
333
333
|
"default": "none",
|
|
334
|
-
"description": "String that
|
|
334
|
+
"description": "String that gets displayed in the default callout."
|
|
335
335
|
},
|
|
336
336
|
{
|
|
337
337
|
"name": "style",
|
|
@@ -376,9 +376,65 @@
|
|
|
376
376
|
"name": "Callout"
|
|
377
377
|
},
|
|
378
378
|
"Camera": {
|
|
379
|
-
"description": "Controls the perspective from which the user sees the map.\n\nTo use imperative methods, pass in a ref object:\n\n
|
|
379
|
+
"description": "Controls the perspective from which the user sees the map.\n\nTo use imperative methods, pass in a ref object:\n\n```tsx\nconst camera = useRef<Camera>(null);\n\nuseEffect(() => {\n camera.current?.setCamera({\n centerCoordinate: [lon, lat],\n });\n}, []);\n\nreturn (\n <Camera ref={camera} />\n);\n```",
|
|
380
380
|
"displayName": "Camera",
|
|
381
|
-
"methods": [
|
|
381
|
+
"methods": [
|
|
382
|
+
{
|
|
383
|
+
"name": "setCamera",
|
|
384
|
+
"docblock": "Sets any camera properties, with default fallbacks if unspecified.\n\n@example\ncamera.current?.setCamera({\n centerCoordinate: [lon, lat],\n});\n\n@param {CameraStop | CameraStops} config",
|
|
385
|
+
"modifiers": [],
|
|
386
|
+
"params": [],
|
|
387
|
+
"returns": null,
|
|
388
|
+
"description": "Sets any camera properties, with default fallbacks if unspecified.",
|
|
389
|
+
"examples": [
|
|
390
|
+
"\ncamera.current?.setCamera({\n centerCoordinate: [lon, lat],\n});\n\n"
|
|
391
|
+
]
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"name": "fitBounds",
|
|
395
|
+
"docblock": "Set the camera position to enclose the provided bounds, with optional\npadding and duration.\n\n@example\ncamera.fitBounds([lon, lat], [lon, lat]);\ncamera.fitBounds([lon, lat], [lon, lat], [20, 0], 1000);\n\n@param {Position} ne Northeast coordinate of bounding box\n@param {Position} sw Southwest coordinate of bounding box\n@param {number | number[]} paddingConfig The viewport padding, specified as a number (all sides equal), a 2-item array ([vertical, horizontal]), or a 4-item array ([top, right, bottom, left])\n@param {number} animationDuration The transition duration",
|
|
396
|
+
"modifiers": [],
|
|
397
|
+
"params": [],
|
|
398
|
+
"returns": null,
|
|
399
|
+
"description": "Set the camera position to enclose the provided bounds, with optional\npadding and duration.",
|
|
400
|
+
"examples": [
|
|
401
|
+
"\ncamera.fitBounds([lon, lat], [lon, lat]);\ncamera.fitBounds([lon, lat], [lon, lat], [20, 0], 1000);\n\n"
|
|
402
|
+
]
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"name": "flyTo",
|
|
406
|
+
"docblock": "Sets the camera to center around the provided coordinate using a realistic 'travel'\nanimation, with optional duration.\n\n@example\ncamera.flyTo([lon, lat]);\ncamera.flyTo([lon, lat], 12000);\n\n @param {Position} centerCoordinate The coordinate to center in the view\n @param {number} animationDuration The transition duration",
|
|
407
|
+
"modifiers": [],
|
|
408
|
+
"params": [],
|
|
409
|
+
"returns": null,
|
|
410
|
+
"description": "Sets the camera to center around the provided coordinate using a realistic 'travel'\nanimation, with optional duration.",
|
|
411
|
+
"examples": [
|
|
412
|
+
"\ncamera.flyTo([lon, lat]);\ncamera.flyTo([lon, lat], 12000);\n\n "
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"name": "moveTo",
|
|
417
|
+
"docblock": "Sets the camera to center around the provided coordinate, with optional duration.\n\n@example\ncamera.moveTo([lon, lat], 200);\ncamera.moveTo([lon, lat]);\n\n @param {Position} centerCoordinate The coordinate to center in the view\n @param {number} animationDuration The transition duration",
|
|
418
|
+
"modifiers": [],
|
|
419
|
+
"params": [],
|
|
420
|
+
"returns": null,
|
|
421
|
+
"description": "Sets the camera to center around the provided coordinate, with optional duration.",
|
|
422
|
+
"examples": [
|
|
423
|
+
"\ncamera.moveTo([lon, lat], 200);\ncamera.moveTo([lon, lat]);\n\n "
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "zoomTo",
|
|
428
|
+
"docblock": "Zooms the camera to the provided level, with optional duration.\n\n@example\ncamera.zoomTo(16);\ncamera.zoomTo(16, 100);\n\n@param {number} zoomLevel The target zoom\n@param {number} animationDuration The transition duration",
|
|
429
|
+
"modifiers": [],
|
|
430
|
+
"params": [],
|
|
431
|
+
"returns": null,
|
|
432
|
+
"description": "Zooms the camera to the provided level, with optional duration.",
|
|
433
|
+
"examples": [
|
|
434
|
+
"\ncamera.zoomTo(16);\ncamera.zoomTo(16, 100);\n\n"
|
|
435
|
+
]
|
|
436
|
+
}
|
|
437
|
+
],
|
|
382
438
|
"props": [
|
|
383
439
|
{
|
|
384
440
|
"name": "type",
|
|
@@ -425,7 +481,39 @@
|
|
|
425
481
|
{
|
|
426
482
|
"name": "padding",
|
|
427
483
|
"required": false,
|
|
428
|
-
"type":
|
|
484
|
+
"type": {
|
|
485
|
+
"name": "shape",
|
|
486
|
+
"value": [
|
|
487
|
+
{
|
|
488
|
+
"name": "paddingLeft",
|
|
489
|
+
"required": true,
|
|
490
|
+
"type": "number",
|
|
491
|
+
"default": "none",
|
|
492
|
+
"description": "Left padding in points"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"name": "paddingRight",
|
|
496
|
+
"required": true,
|
|
497
|
+
"type": "number",
|
|
498
|
+
"default": "none",
|
|
499
|
+
"description": "Right padding in points"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "paddingTop",
|
|
503
|
+
"required": true,
|
|
504
|
+
"type": "number",
|
|
505
|
+
"default": "none",
|
|
506
|
+
"description": "Top padding in points"
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"name": "paddingBottom",
|
|
510
|
+
"required": true,
|
|
511
|
+
"type": "number",
|
|
512
|
+
"default": "none",
|
|
513
|
+
"description": "Bottom padding in points"
|
|
514
|
+
}
|
|
515
|
+
]
|
|
516
|
+
},
|
|
429
517
|
"default": "none",
|
|
430
518
|
"description": "The viewport padding in points."
|
|
431
519
|
},
|
|
@@ -495,14 +583,99 @@
|
|
|
495
583
|
{
|
|
496
584
|
"name": "maxBounds",
|
|
497
585
|
"required": false,
|
|
498
|
-
"type":
|
|
586
|
+
"type": {
|
|
587
|
+
"name": "shape",
|
|
588
|
+
"value": [
|
|
589
|
+
{
|
|
590
|
+
"name": "ne",
|
|
591
|
+
"required": true,
|
|
592
|
+
"type": "Position",
|
|
593
|
+
"default": "none",
|
|
594
|
+
"description": "FIX ME NO DESCRIPTION"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"name": "sw",
|
|
598
|
+
"required": true,
|
|
599
|
+
"type": "Position",
|
|
600
|
+
"default": "none",
|
|
601
|
+
"description": "FIX ME NO DESCRIPTION"
|
|
602
|
+
}
|
|
603
|
+
]
|
|
604
|
+
},
|
|
499
605
|
"default": "none",
|
|
500
606
|
"description": "The corners of a box defining the limits of where the camera can pan or zoom."
|
|
501
607
|
},
|
|
502
608
|
{
|
|
503
609
|
"name": "defaultSettings",
|
|
504
610
|
"required": false,
|
|
505
|
-
"type":
|
|
611
|
+
"type": {
|
|
612
|
+
"name": "shape",
|
|
613
|
+
"value": [
|
|
614
|
+
{
|
|
615
|
+
"name": "type",
|
|
616
|
+
"required": false,
|
|
617
|
+
"type": "literal",
|
|
618
|
+
"default": "none",
|
|
619
|
+
"description": "Allows static check of the data type. For internal use only."
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"name": "centerCoordinate",
|
|
623
|
+
"required": false,
|
|
624
|
+
"type": "Position",
|
|
625
|
+
"default": "none",
|
|
626
|
+
"description": "The location on which the map should center."
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"name": "bounds",
|
|
630
|
+
"required": false,
|
|
631
|
+
"type": "intersection",
|
|
632
|
+
"default": "none",
|
|
633
|
+
"description": "The corners of a box around which the map should bound. Contains padding props for backwards\ncompatibility; the root `padding` prop should be used instead."
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"name": "heading",
|
|
637
|
+
"required": false,
|
|
638
|
+
"type": "number",
|
|
639
|
+
"default": "none",
|
|
640
|
+
"description": "The heading (orientation) of the map."
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"name": "pitch",
|
|
644
|
+
"required": false,
|
|
645
|
+
"type": "number",
|
|
646
|
+
"default": "none",
|
|
647
|
+
"description": "The pitch of the map."
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"name": "zoomLevel",
|
|
651
|
+
"required": false,
|
|
652
|
+
"type": "number",
|
|
653
|
+
"default": "none",
|
|
654
|
+
"description": "The zoom level of the map."
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"name": "padding",
|
|
658
|
+
"required": false,
|
|
659
|
+
"type": "signature",
|
|
660
|
+
"default": "none",
|
|
661
|
+
"description": "The viewport padding in points."
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"name": "animationDuration",
|
|
665
|
+
"required": false,
|
|
666
|
+
"type": "number",
|
|
667
|
+
"default": "none",
|
|
668
|
+
"description": "The duration the map takes to animate to a new configuration."
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"name": "animationMode",
|
|
672
|
+
"required": false,
|
|
673
|
+
"type": "union",
|
|
674
|
+
"default": "none",
|
|
675
|
+
"description": "The easing or path the camera uses to animate to a new configuration."
|
|
676
|
+
}
|
|
677
|
+
]
|
|
678
|
+
},
|
|
506
679
|
"default": "none",
|
|
507
680
|
"description": "The configuration that the camera falls back on, if no other values are specified."
|
|
508
681
|
},
|
|
@@ -1735,7 +1908,7 @@
|
|
|
1735
1908
|
"name": "ImageSource"
|
|
1736
1909
|
},
|
|
1737
1910
|
"Images": {
|
|
1738
|
-
"description": "Images defines the images used in Symbol etc layers",
|
|
1911
|
+
"description": "Images defines the images used in Symbol etc. layers.",
|
|
1739
1912
|
"displayName": "Images",
|
|
1740
1913
|
"methods": [],
|
|
1741
1914
|
"props": [
|
|
@@ -2402,7 +2575,7 @@
|
|
|
2402
2575
|
},
|
|
2403
2576
|
{
|
|
2404
2577
|
"name": "getVisibleBounds",
|
|
2405
|
-
"docblock": "The coordinate bounds(ne, sw) visible in the
|
|
2578
|
+
"docblock": "The coordinate bounds (ne, sw) visible in the user’s viewport.\n\n@example\nconst visibleBounds = await this._map.getVisibleBounds();\n\n@return {Array}",
|
|
2406
2579
|
"modifiers": [
|
|
2407
2580
|
"async"
|
|
2408
2581
|
],
|
|
@@ -2413,7 +2586,7 @@
|
|
|
2413
2586
|
"name": "Array"
|
|
2414
2587
|
}
|
|
2415
2588
|
},
|
|
2416
|
-
"description": "The coordinate bounds(ne, sw) visible in the
|
|
2589
|
+
"description": "The coordinate bounds (ne, sw) visible in the user’s viewport.",
|
|
2417
2590
|
"examples": [
|
|
2418
2591
|
"\nconst visibleBounds = await this._map.getVisibleBounds();\n\n"
|
|
2419
2592
|
]
|
|
@@ -2526,7 +2699,7 @@
|
|
|
2526
2699
|
"type": {
|
|
2527
2700
|
"name": "Boolean"
|
|
2528
2701
|
},
|
|
2529
|
-
"optional":
|
|
2702
|
+
"optional": true
|
|
2530
2703
|
}
|
|
2531
2704
|
],
|
|
2532
2705
|
"returns": {
|
|
@@ -2684,7 +2857,7 @@
|
|
|
2684
2857
|
"required": false,
|
|
2685
2858
|
"type": "number",
|
|
2686
2859
|
"default": "none",
|
|
2687
|
-
"description": "iOS: The preferred frame rate at which the map view is rendered.\nThe default value for this property is MGLMapViewPreferredFramesPerSecondDefault,\nwhich will adaptively set the preferred frame rate based on the capability of\nthe user’s device to maintain a smooth experience. This property can be set to arbitrary integer values.\n\nAndroid: The maximum frame rate at which the map view is rendered, but it can't
|
|
2860
|
+
"description": "iOS: The preferred frame rate at which the map view is rendered.\nThe default value for this property is MGLMapViewPreferredFramesPerSecondDefault,\nwhich will adaptively set the preferred frame rate based on the capability of\nthe user’s device to maintain a smooth experience. This property can be set to arbitrary integer values.\n\nAndroid: The maximum frame rate at which the map view is rendered, but it can't exceed the ability of device hardware.\nThis property can be set to arbitrary integer values."
|
|
2688
2861
|
},
|
|
2689
2862
|
{
|
|
2690
2863
|
"name": "localizeLabels",
|
|
@@ -2810,7 +2983,7 @@
|
|
|
2810
2983
|
"required": false,
|
|
2811
2984
|
"type": "bool",
|
|
2812
2985
|
"default": "false",
|
|
2813
|
-
"description": "[Android only] Enable/Disable use of GLSurfaceView
|
|
2986
|
+
"description": "[Android only] Enable/Disable use of GLSurfaceView instead of TextureView."
|
|
2814
2987
|
},
|
|
2815
2988
|
{
|
|
2816
2989
|
"name": "onPress",
|
|
@@ -3017,12 +3190,7 @@
|
|
|
3017
3190
|
{
|
|
3018
3191
|
"name": "coordinate",
|
|
3019
3192
|
"required": true,
|
|
3020
|
-
"type":
|
|
3021
|
-
"name": "array",
|
|
3022
|
-
"value": {
|
|
3023
|
-
"type": "number"
|
|
3024
|
-
}
|
|
3025
|
-
},
|
|
3193
|
+
"type": "tuple",
|
|
3026
3194
|
"default": "none",
|
|
3027
3195
|
"description": "The center point (specified as a map coordinate) of the marker.\nSee also #anchor."
|
|
3028
3196
|
},
|
|
@@ -3054,15 +3222,12 @@
|
|
|
3054
3222
|
{
|
|
3055
3223
|
"name": "children",
|
|
3056
3224
|
"required": true,
|
|
3057
|
-
"type": "
|
|
3225
|
+
"type": "ReactReactElement",
|
|
3058
3226
|
"default": "none",
|
|
3059
3227
|
"description": "Expects one child - can be container with multiple elements"
|
|
3060
3228
|
}
|
|
3061
3229
|
],
|
|
3062
|
-
"
|
|
3063
|
-
"../utils"
|
|
3064
|
-
],
|
|
3065
|
-
"fileNameWithExt": "MarkerView.js",
|
|
3230
|
+
"fileNameWithExt": "MarkerView.tsx",
|
|
3066
3231
|
"name": "MarkerView"
|
|
3067
3232
|
},
|
|
3068
3233
|
"NativeUserLocation": {
|
|
@@ -3610,12 +3775,12 @@
|
|
|
3610
3775
|
"name": "RasterSource"
|
|
3611
3776
|
},
|
|
3612
3777
|
"ShapeSource": {
|
|
3613
|
-
"description": "ShapeSource is a map content source that supplies vector shapes to be shown on the map.\nThe shape may be
|
|
3778
|
+
"description": "ShapeSource is a map content source that supplies vector shapes to be shown on the map.\nThe shape may be an url or a GeoJSON object",
|
|
3614
3779
|
"displayName": "ShapeSource",
|
|
3615
3780
|
"methods": [
|
|
3616
3781
|
{
|
|
3617
3782
|
"name": "features",
|
|
3618
|
-
"docblock": "Returns all features from the source that match the query parameters
|
|
3783
|
+
"docblock": "Returns all features from the source that match the query parameters whether the feature is currently\nrendered on the map.\n\n@example\nshapeSource.features()\n\n@param {Array=} filter - an optional filter statement to filter the returned Features.\n@return {FeatureCollection}",
|
|
3619
3784
|
"modifiers": [
|
|
3620
3785
|
"async"
|
|
3621
3786
|
],
|
|
@@ -3635,7 +3800,7 @@
|
|
|
3635
3800
|
"name": "FeatureCollection"
|
|
3636
3801
|
}
|
|
3637
3802
|
},
|
|
3638
|
-
"description": "Returns all features from the source that match the query parameters
|
|
3803
|
+
"description": "Returns all features from the source that match the query parameters whether the feature is currently\nrendered on the map.",
|
|
3639
3804
|
"examples": [
|
|
3640
3805
|
"\nshapeSource.features()\n\n"
|
|
3641
3806
|
]
|
|
@@ -3744,6 +3909,7 @@
|
|
|
3744
3909
|
"params": [
|
|
3745
3910
|
{
|
|
3746
3911
|
"name": "event",
|
|
3912
|
+
"optional": false,
|
|
3747
3913
|
"type": {
|
|
3748
3914
|
"name": null
|
|
3749
3915
|
}
|
|
@@ -3772,7 +3938,7 @@
|
|
|
3772
3938
|
"required": false,
|
|
3773
3939
|
"type": "object",
|
|
3774
3940
|
"default": "none",
|
|
3775
|
-
"description": "The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature
|
|
3941
|
+
"description": "The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature collection."
|
|
3776
3942
|
},
|
|
3777
3943
|
{
|
|
3778
3944
|
"name": "cluster",
|
|
@@ -4176,7 +4342,7 @@
|
|
|
4176
4342
|
]
|
|
4177
4343
|
},
|
|
4178
4344
|
"Style": {
|
|
4179
|
-
"description": "Style is a component that automatically adds sources / layers to the map using Mapbox GL Style Spec.\nOnly [`sources`](https://docs.mapbox.com/mapbox-gl-js/style-spec/sources) & [`layers`](https://docs.mapbox.com/mapbox-gl-js/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 mentioned under https://github.com/rnmapbox/maps/tree/main/docs.",
|
|
4345
|
+
"description": "Style is a component that automatically adds sources / layers to the map using Mapbox GL Style Spec.\nOnly [`sources`](https://docs.mapbox.com/mapbox-gl-js/style-spec/sources) & [`layers`](https://docs.mapbox.com/mapbox-gl-js/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/rnmapbox/maps/tree/main/docs.",
|
|
4180
4346
|
"displayName": "Style",
|
|
4181
4347
|
"methods": [],
|
|
4182
4348
|
"props": [
|
|
@@ -5656,6 +5822,7 @@
|
|
|
5656
5822
|
"params": [
|
|
5657
5823
|
{
|
|
5658
5824
|
"name": "{ running }",
|
|
5825
|
+
"optional": false,
|
|
5659
5826
|
"type": {
|
|
5660
5827
|
"name": null
|
|
5661
5828
|
}
|
|
@@ -5804,6 +5971,7 @@
|
|
|
5804
5971
|
"params": [
|
|
5805
5972
|
{
|
|
5806
5973
|
"name": "event",
|
|
5974
|
+
"optional": false,
|
|
5807
5975
|
"type": {
|
|
5808
5976
|
"name": null
|
|
5809
5977
|
}
|
package/docs/snapshotManager.md
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
<!-- This file was autogenerated from snapshotManager.js do not modify -->
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
# <MapboxGL.snapshotManager />
|
|
3
|
+
The snapshotManager generates static raster images of the map.
|
|
4
|
+
Each snapshot image depicts a portion of a map defined by an SnapshotOptions object you provide.
|
|
5
|
+
The snapshotter generates the snapshot asynchronous.
|
|
4
6
|
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
## methods
|
|
9
|
+
### takeSnap(options)
|
|
8
10
|
|
|
9
11
|
Takes a snapshot of the base map using the provided Snapshot options. NOTE pitch, heading, zoomLevel only works when centerCoordinate is set!
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
#### arguments
|
|
12
14
|
| Name | Type | Required | Description |
|
|
13
15
|
| ---- | :--: | :------: | :----------: |
|
|
14
16
|
| `options` | `SnapshotOptions` | `Yes` | Snapshot options for create a static image of the base map |
|
package/index.d.ts
CHANGED
|
@@ -33,11 +33,14 @@ import {
|
|
|
33
33
|
CameraStops as _CameraStops,
|
|
34
34
|
CameraAnimationMode as _CameraAnimationMode,
|
|
35
35
|
} from './javascript/components/Camera';
|
|
36
|
+
import { MarkerView as _MarkerView } from './javascript/components/MarkerView';
|
|
36
37
|
import { Atmosphere as _Atmosphere } from './javascript/components/Atmosphere';
|
|
37
38
|
import type {
|
|
38
39
|
MapboxGLEvent as _MapboxGLEvent,
|
|
39
40
|
UserTrackingMode as _UserTrackingMode,
|
|
40
41
|
UserTrackingModeChangeCallback as _UserTrackingModeChangeCallback,
|
|
42
|
+
AnimatedPoint as _AnimatedPoint,
|
|
43
|
+
AnimatedShape as _AnimatedShape,
|
|
41
44
|
} from './javascript/types/index';
|
|
42
45
|
import type { requestAndroidLocationPermissions as _requestAndroidLocationPermissions } from './javascript/requestAndroidLocationPermissions';
|
|
43
46
|
|
|
@@ -136,6 +139,7 @@ declare namespace MapboxGL {
|
|
|
136
139
|
type CameraAnimationMode = _CameraAnimationMode;
|
|
137
140
|
|
|
138
141
|
const Atmosphere = _Atmosphere;
|
|
142
|
+
const MarkerView = _MarkerView;
|
|
139
143
|
|
|
140
144
|
type MapboxGLEvent = _MapboxGLEvent;
|
|
141
145
|
type UserTrackingMode = _UserTrackingMode;
|
|
@@ -145,6 +149,30 @@ declare namespace MapboxGL {
|
|
|
145
149
|
const snapshotManager: SnapshotManager;
|
|
146
150
|
const locationManager: LocationManager;
|
|
147
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Classes
|
|
154
|
+
*/
|
|
155
|
+
class AnimatedPoint {
|
|
156
|
+
constructor(point?: _AnimatedPoint);
|
|
157
|
+
longitude: ReactNative.Animated.Value;
|
|
158
|
+
latitude: ReactNative.Animated.Value;
|
|
159
|
+
setValue: (point: GeoJSON.Point) => void;
|
|
160
|
+
setOffset: (point: GeoJSON.Point) => void;
|
|
161
|
+
flattenOffset: () => void;
|
|
162
|
+
stopAnimation: (cb?: () => GeoJSON.Point) => void;
|
|
163
|
+
addListener: (cb?: () => GeoJSON.Point) => void;
|
|
164
|
+
removeListener: (id: string) => void;
|
|
165
|
+
spring: (
|
|
166
|
+
config: Record<string, any>,
|
|
167
|
+
) => ReactNative.Animated.CompositeAnimation;
|
|
168
|
+
timing: (
|
|
169
|
+
config: Record<string, any>,
|
|
170
|
+
) => ReactNative.Animated.CompositeAnimation;
|
|
171
|
+
}
|
|
172
|
+
class AnimatedShape {
|
|
173
|
+
constructor(shape: _AnimatedShape);
|
|
174
|
+
}
|
|
175
|
+
|
|
148
176
|
/**
|
|
149
177
|
* GeoUtils
|
|
150
178
|
*/
|
|
@@ -221,28 +249,6 @@ declare namespace MapboxGL {
|
|
|
221
249
|
class BackgroundLayer extends Component<BackgroundLayerProps> {}
|
|
222
250
|
}
|
|
223
251
|
|
|
224
|
-
/**
|
|
225
|
-
* Classes
|
|
226
|
-
*/
|
|
227
|
-
|
|
228
|
-
class AnimatedPoint {
|
|
229
|
-
constructor(point?: GeoJSON.Point);
|
|
230
|
-
longitude: ReactNative.Animated.Value;
|
|
231
|
-
latitude: ReactNative.Animated.Value;
|
|
232
|
-
setValue: (point: GeoJSON.Point) => void;
|
|
233
|
-
setOffset: (point: GeoJSON.Point) => void;
|
|
234
|
-
flattenOffset: () => void;
|
|
235
|
-
stopAnimation: (cb?: () => GeoJSON.Point) => void;
|
|
236
|
-
addListener: (cb?: () => GeoJSON.Point) => void;
|
|
237
|
-
removeListener: (id: string) => void;
|
|
238
|
-
spring: (
|
|
239
|
-
config: Record<string, any>,
|
|
240
|
-
) => ReactNative.Animated.CompositeAnimation;
|
|
241
|
-
timing: (
|
|
242
|
-
config: Record<string, any>,
|
|
243
|
-
) => ReactNative.Animated.CompositeAnimation;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
252
|
/**
|
|
247
253
|
* Components
|
|
248
254
|
*/
|
|
@@ -346,7 +352,6 @@ declare namespace MapboxGL {
|
|
|
346
352
|
class PointAnnotation extends Component<PointAnnotationProps> {
|
|
347
353
|
refresh(): void;
|
|
348
354
|
}
|
|
349
|
-
class MarkerView extends Component<MarkerViewProps> {}
|
|
350
355
|
class Callout extends Component<CalloutProps> {}
|
|
351
356
|
type Style = React.FC<StyleProps>;
|
|
352
357
|
|
|
@@ -860,8 +865,6 @@ export interface PointAnnotationProps {
|
|
|
860
865
|
onDragEnd?: () => void;
|
|
861
866
|
}
|
|
862
867
|
|
|
863
|
-
export type MarkerViewProps = PointAnnotationProps;
|
|
864
|
-
|
|
865
868
|
export interface StyleProps {
|
|
866
869
|
json: any;
|
|
867
870
|
}
|
|
@@ -1037,13 +1040,25 @@ export import CameraAnimationMode = MapboxGL.CameraAnimationMode;
|
|
|
1037
1040
|
export import Atmosphere = MapboxGL.Atmosphere;
|
|
1038
1041
|
export import Terrain = MapboxGL.Terrain;
|
|
1039
1042
|
export import RasterDemSource = MapboxGL.RasterDemSource;
|
|
1040
|
-
export import SkyLayer = MapboxGL.SkyLayer;
|
|
1041
1043
|
export import ShapeSource = MapboxGL.ShapeSource;
|
|
1044
|
+
export import FillLayer = MapboxGL.FillLayer;
|
|
1045
|
+
export import FillExtrusionLayer = MapboxGL.FillExtrusionLayer;
|
|
1046
|
+
export import HeatmapLayer = MapboxGL.HeatmapLayer;
|
|
1047
|
+
export import LineLayer = MapboxGL.LineLayer;
|
|
1042
1048
|
export import CircleLayer = MapboxGL.CircleLayer;
|
|
1049
|
+
export import SkyLayer = MapboxGL.SkyLayer;
|
|
1050
|
+
export import SymbolLayer = MapboxGL.SymbolLayer;
|
|
1051
|
+
export import RasterLayer = MapboxGL.RasterLayer;
|
|
1052
|
+
export import BackgroundLayer = MapboxGL.BackgroundLayer;
|
|
1053
|
+
export import MarkerView = MapboxGL.MarkerView;
|
|
1043
1054
|
|
|
1044
1055
|
export import MapboxGLEvent = MapboxGL.MapboxGLEvent;
|
|
1045
1056
|
export import UserTrackingMode = MapboxGL.UserTrackingMode;
|
|
1046
1057
|
export import UserTrackingModeChangeCallback = MapboxGL.UserTrackingModeChangeCallback;
|
|
1058
|
+
export import AnimatedPoint = MapboxGL.AnimatedPoint;
|
|
1059
|
+
/** @deprecated This will be removed in a future release. Use `AnimatedPoint` instead. */
|
|
1060
|
+
export import AnimatedMapPoint = MapboxGL.AnimatedPoint;
|
|
1061
|
+
export import AnimatedShape = MapboxGL.AnimatedShape;
|
|
1047
1062
|
|
|
1048
1063
|
export const { offlineManager } = MapboxGL;
|
|
1049
1064
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import MapboxMaps
|
|
2
|
+
|
|
3
|
+
class CustomHttpHeaders : HttpServiceInterceptorInterface {
|
|
4
|
+
static var shared : CustomHttpHeaders = {
|
|
5
|
+
let headers = CustomHttpHeaders()
|
|
6
|
+
headers.install()
|
|
7
|
+
return headers
|
|
8
|
+
}()
|
|
9
|
+
|
|
10
|
+
var customHeaders : [String:String] = [:]
|
|
11
|
+
|
|
12
|
+
func install() {
|
|
13
|
+
HttpServiceFactory.getInstance().setInterceptorForInterceptor(self)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
func reset() {
|
|
17
|
+
HttpServiceFactory.getInstance().setInterceptorForInterceptor(nil)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// MARK: - HttpServiceInterceptorInterface
|
|
21
|
+
|
|
22
|
+
func onRequest(for request: HttpRequest) -> HttpRequest {
|
|
23
|
+
customHeaders.forEach {(key, value) in
|
|
24
|
+
request.headers[key] = value
|
|
25
|
+
}
|
|
26
|
+
return request
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
func onDownload(forDownload download: DownloadOptions) -> DownloadOptions {
|
|
30
|
+
customHeaders.forEach {(key,value) in
|
|
31
|
+
download.request.headers[key] = value
|
|
32
|
+
}
|
|
33
|
+
return download
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
func onResponse(for response: HttpResponse) -> HttpResponse {
|
|
37
|
+
return response
|
|
38
|
+
}
|
|
39
|
+
}
|