@rnmapbox/maps 10.0.0-beta.33 → 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/.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/mapview/RCTMGLMapView.kt +5 -1
- 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 +12 -14
- 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 +30 -26
- 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/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 +1 -1
- 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/package.json +16 -13
- 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 +1 -2
- package/scripts/templates/component.md.ejs +25 -25
- package/tsconfig.json +1 -1
- package/javascript/components/MarkerView.js +0 -91
- package/javascript/utils/BridgeValue.js +0 -81
package/docs/Logger.md
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
###
|
|
1
|
+
# Logger
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
## methods
|
|
4
|
+
### setLogLevel(LogLevel)
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
#### arguments
|
|
8
7
|
| Name | Type | Required | Description |
|
|
9
8
|
| ---- | :--: | :------: | :----------: |
|
|
10
9
|
| `LogLevel` | `String` | `Yes` | required level of logging, can be `"error" | "warning" | "info" | "debug" | "verbose"` |
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
#### Description
|
|
13
12
|
sets the amount of logging
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
### setLogCallback(LogCallback)
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
#### arguments
|
|
18
17
|
| Name | Type | Required | Description |
|
|
19
18
|
| ---- | :--: | :------: | :----------: |
|
|
20
19
|
| `LogCallback` | `function` | `Yes` | callback taking a log object `{ message: String, level: LogLevel, tag: String }` as param. If callback return falsy value then default logging will take place. |
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
#### Description
|
|
23
22
|
overwrite logging - good to mute specific errors/ warnings
|
package/docs/MapView.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<!-- This file was autogenerated from MapView.js do not modify -->
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
# <MapboxGL.MapView />
|
|
3
|
+
MapView backed by Mapbox Native GL
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| contentInset | `union` | `none` | `false` | The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport. |
|
|
9
9
|
| style | `any` | `none` | `false` | Style for wrapping React Native View |
|
|
10
10
|
| styleURL | `string` | `none` | `false` | Style URL for map - notice, if non is set it _will_ default to `MapboxGL.StyleURL.Street` |
|
|
11
11
|
| styleJSON | `string` | `none` | `false` | StyleJSON for map - according to TileJSON specs: https://github.com/mapbox/tilejson-spec |
|
|
12
|
-
| preferredFramesPerSecond | `number` | `none` | `false` | iOS: The preferred frame rate at which the map view is rendered.<br/>The default value for this property is MGLMapViewPreferredFramesPerSecondDefault,<br/>which will adaptively set the preferred frame rate based on the capability of<br/>the user’s device to maintain a smooth experience. This property can be set to arbitrary integer values.<br/><br/>Android: The maximum frame rate at which the map view is rendered, but it can't
|
|
12
|
+
| preferredFramesPerSecond | `number` | `none` | `false` | iOS: The preferred frame rate at which the map view is rendered.<br/>The default value for this property is MGLMapViewPreferredFramesPerSecondDefault,<br/>which will adaptively set the preferred frame rate based on the capability of<br/>the user’s device to maintain a smooth experience. This property can be set to arbitrary integer values.<br/><br/>Android: The maximum frame rate at which the map view is rendered, but it can't exceed the ability of device hardware.<br/>This property can be set to arbitrary integer values. |
|
|
13
13
|
| localizeLabels | `bool` | `false` | `false` | Automatically change the language of the map labels to the system’s preferred language,<br/>this is not something that can be toggled on/off |
|
|
14
14
|
| zoomEnabled | `bool` | `none` | `false` | Enable/Disable zoom on the map |
|
|
15
15
|
| scrollEnabled | `bool` | `true` | `false` | Enable/Disable scroll on the map |
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
| compassViewMargins | `object` | `none` | `false` | Add margins to the compass with x and y values |
|
|
28
28
|
| scaleBarEnabled | `bool` | `true` | `false` | [`mapbox` (v10) implementation only] Enable/Disable the scale bar from appearing on the map |
|
|
29
29
|
| scaleBarPosition | `custom` | `none` | `false` | [`mapbox` (v10) implementation only] Adds scale bar offset, e.g. `{top: 8, left: 8}` will put the scale bar in top-left corner of the map |
|
|
30
|
-
| surfaceView | `bool` | `false` | `false` | [Android only] Enable/Disable use of GLSurfaceView
|
|
30
|
+
| surfaceView | `bool` | `false` | `false` | [Android only] Enable/Disable use of GLSurfaceView instead of TextureView. |
|
|
31
31
|
| onPress | `func` | `none` | `false` | Map press listener, gets called when a user presses the map |
|
|
32
32
|
| onLongPress | `func` | `none` | `false` | Map long press listener, gets called when a user long presses the map |
|
|
33
33
|
| onRegionWillChange | `func` | `none` | `false` | <v10 only<br/><br/>This event is triggered whenever the currently displayed map region is about to change. |
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
| regionWillChangeDebounceTime | `number` | `10` | `false` | The emitted frequency of regionwillchange events |
|
|
50
50
|
| regionDidChangeDebounceTime | `number` | `500` | `false` | The emitted frequency of regiondidchange events |
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
## methods
|
|
53
|
+
### getPointInView(coordinate)
|
|
54
54
|
|
|
55
55
|
Converts a geographic coordinate to a point in the given view’s coordinate system.
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
#### arguments
|
|
58
58
|
| Name | Type | Required | Description |
|
|
59
59
|
| ---- | :--: | :------: | :----------: |
|
|
60
60
|
| `coordinate` | `Array` | `Yes` | A point expressed in the map view's coordinate system. |
|
|
@@ -66,11 +66,11 @@ const pointInView = await this._map.getPointInView([-37.817070, 144.949901]);
|
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
### getCoordinateFromView(point)
|
|
70
70
|
|
|
71
71
|
Converts a point in the given view’s coordinate system to a geographic coordinate.
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
#### arguments
|
|
74
74
|
| Name | Type | Required | Description |
|
|
75
75
|
| ---- | :--: | :------: | :----------: |
|
|
76
76
|
| `point` | `Array` | `Yes` | A point expressed in the given view’s coordinate system. |
|
|
@@ -82,11 +82,11 @@ const coordinate = await this._map.getCoordinateFromView([100, 100]);
|
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
### getVisibleBounds()
|
|
86
86
|
|
|
87
|
-
The coordinate bounds(ne, sw) visible in the
|
|
87
|
+
The coordinate bounds (ne, sw) visible in the user’s viewport.
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
#### arguments
|
|
90
90
|
| Name | Type | Required | Description |
|
|
91
91
|
| ---- | :--: | :------: | :----------: |
|
|
92
92
|
|
|
@@ -98,11 +98,11 @@ const visibleBounds = await this._map.getVisibleBounds();
|
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
### queryRenderedFeaturesAtPoint(coordinate[, filter][, layerIDs])
|
|
102
102
|
|
|
103
103
|
Returns an array of rendered map features that intersect with a given point.
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
#### arguments
|
|
106
106
|
| Name | Type | Required | Description |
|
|
107
107
|
| ---- | :--: | :------: | :----------: |
|
|
108
108
|
| `coordinate` | `Array` | `Yes` | A point expressed in the map view’s coordinate system. |
|
|
@@ -116,11 +116,11 @@ this._map.queryRenderedFeaturesAtPoint([30, 40], ['==', 'type', 'Point'], ['id1'
|
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
### queryRenderedFeaturesInRect(bbox[, filter][, layerIDs])
|
|
120
120
|
|
|
121
121
|
Returns an array of rendered map features that intersect with the given rectangle,<br/>restricted to the given style layers and filtered by the given predicate.
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
#### arguments
|
|
124
124
|
| Name | Type | Required | Description |
|
|
125
125
|
| ---- | :--: | :------: | :----------: |
|
|
126
126
|
| `bbox` | `Array` | `Yes` | A rectangle expressed in the map view’s coordinate system. |
|
|
@@ -134,31 +134,31 @@ this._map.queryRenderedFeaturesInRect([30, 40, 20, 10], ['==', 'type', 'Point'],
|
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
### setCamera()
|
|
138
138
|
|
|
139
139
|
Map camera will perform updates based on provided config. Deprecated use Camera#setCamera.
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
#### arguments
|
|
142
142
|
| Name | Type | Required | Description |
|
|
143
143
|
| ---- | :--: | :------: | :----------: |
|
|
144
144
|
|
|
145
145
|
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
### takeSnap([writeToDisk])
|
|
148
148
|
|
|
149
149
|
Takes snapshot of map with current tiles and returns a URI to the image
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
#### arguments
|
|
152
152
|
| Name | Type | Required | Description |
|
|
153
153
|
| ---- | :--: | :------: | :----------: |
|
|
154
|
-
| `writeToDisk` | `Boolean` | `
|
|
154
|
+
| `writeToDisk` | `Boolean` | `No` | If true will create a temp file, otherwise it is in base64 |
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
### getZoom()
|
|
158
158
|
|
|
159
159
|
Returns the current zoom of the map view.
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
#### arguments
|
|
162
162
|
| Name | Type | Required | Description |
|
|
163
163
|
| ---- | :--: | :------: | :----------: |
|
|
164
164
|
|
|
@@ -170,11 +170,11 @@ const zoom = await this._map.getZoom();
|
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
### getCenter()
|
|
174
174
|
|
|
175
175
|
Returns the map's geographical centerpoint
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
#### arguments
|
|
178
178
|
| Name | Type | Required | Description |
|
|
179
179
|
| ---- | :--: | :------: | :----------: |
|
|
180
180
|
|
|
@@ -186,21 +186,21 @@ const center = await this._map.getCenter();
|
|
|
186
186
|
```
|
|
187
187
|
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
### queryTerrainElevation(coordinate)
|
|
190
190
|
|
|
191
191
|
Queries the currently loaded data for elevation at a geographical location.<br/>The elevation is returned in meters relative to mean sea-level.<br/>Returns null if terrain is disabled or if terrain data for the location hasn't been loaded yet.
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
#### arguments
|
|
194
194
|
| Name | Type | Required | Description |
|
|
195
195
|
| ---- | :--: | :------: | :----------: |
|
|
196
196
|
| `coordinate` | `Array` | `Yes` | the coordinates to query elevation at |
|
|
197
197
|
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
### setSourceVisibility(visible, sourceId[, sourceLayerId])
|
|
200
200
|
|
|
201
201
|
Sets the visibility of all the layers referencing the specified `sourceLayerId` and/or `sourceId`
|
|
202
202
|
|
|
203
|
-
|
|
203
|
+
#### arguments
|
|
204
204
|
| Name | Type | Required | Description |
|
|
205
205
|
| ---- | :--: | :------: | :----------: |
|
|
206
206
|
| `visible` | `boolean` | `Yes` | Visibility of the layers |
|
|
@@ -214,11 +214,11 @@ await this._map.setSourceVisibility(false, 'composite', 'building')
|
|
|
214
214
|
```
|
|
215
215
|
|
|
216
216
|
|
|
217
|
-
|
|
217
|
+
### showAttribution()
|
|
218
218
|
|
|
219
219
|
Show the attribution and telemetry action sheet.<br/>If you implement a custom attribution button, you should add this action to the button.
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
#### arguments
|
|
222
222
|
| Name | Type | Required | Description |
|
|
223
223
|
| ---- | :--: | :------: | :----------: |
|
|
224
224
|
|
package/docs/MapboxGL.md
CHANGED
|
@@ -1,84 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
###
|
|
1
|
+
# MapboxGL
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
## methods
|
|
4
|
+
### setAccessToken(accessToken)
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
#### arguments
|
|
8
7
|
| Name | Type | Required | Description |
|
|
9
8
|
| ---- | :--: | :------: | :----------: |
|
|
10
9
|
| `accessToken` | `String` | `Yes` | required acessToken to pull mapbox tiles, can be `null` if other tiles are used |
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
#### Description
|
|
13
12
|
sets the accessToken, which is required when you want to use mapbox tiles
|
|
14
13
|
not required when using other tiles
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
### setWellKnownTileServer(tileServer)
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
#### arguments
|
|
19
18
|
| Name | Type | Required | Description |
|
|
20
19
|
| ---- | :--: | :------: | :----------: |
|
|
21
20
|
| `tileServer` | `String` | `Yes` | tile server |
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
#### Description
|
|
24
23
|
No-op on non MapLibre implemntations. Use MapboxGL.TileServer.Mapbox to consume mapbox tiles with maplibre. *Note*: Consuming mapbox with MapLibre has different pricing than with the official SDK. Other values: MapboxGL.TileServer.MapLibre, MapboxGL.TileServer.MapTiler
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
### getAccessToken()
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
#### arguments
|
|
29
28
|
| Name | Type | Required | Description |
|
|
30
29
|
| ---- | :--: | :------: | :----------: |
|
|
31
30
|
| `accessToken` | `String` | `Yes` | required acessToken to pull mapbox tiles, can be `null` if other tiles are used |
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
#### Description
|
|
34
33
|
gets the accessToken
|
|
35
34
|
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
### addCustomHeader(headerName, headerValue)
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
#### arguments
|
|
40
39
|
| Name | Type | Required | Description |
|
|
41
40
|
| ---- | :--: | :------: | :----------: |
|
|
42
41
|
| `headerName` | `String` | `Yes` | name for customHeader |
|
|
43
42
|
| `headerValue` | `String` | `Yes` | value for customHeader |
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
#### Description
|
|
46
45
|
also see [CustomHttpHeaders](/docs/CustomHttpHeaders.md)
|
|
47
46
|
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
### removeCustomHeader(headerName)
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
#### arguments
|
|
52
51
|
| Name | Type | Required | Description |
|
|
53
52
|
| ---- | :--: | :------: | :----------: |
|
|
54
53
|
| `headerName` | `String` | `Yes` | name of customHeader to be removed |
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
#### Description
|
|
57
56
|
also see [CustomHttpHeaders](/docs/CustomHttpHeaders.md)
|
|
58
57
|
|
|
59
|
-
|
|
58
|
+
### setTelemetryEnabled(telemetryEnabled)
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
#### arguments
|
|
62
61
|
| Name | Type | Required | Description |
|
|
63
62
|
| ---- | :--: | :------: | :----------: |
|
|
64
63
|
| `telemetryEnabled` | `Boolean` | `Yes` | |
|
|
65
64
|
|
|
66
|
-
|
|
65
|
+
#### Description
|
|
67
66
|
If mapbox' telemetry should be enabled or not
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
## Android only
|
|
69
|
+
### requestAndroidLocationPermissions()
|
|
70
|
+
#### Description
|
|
72
71
|
Opens Android Location Permission prompt.
|
|
73
72
|
Returns a Promise which resolves into a boolean.
|
|
74
73
|
Either permission was granted or denied.
|
|
75
74
|
|
|
76
75
|
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
### setConnected(connected)
|
|
77
|
+
#### arguments
|
|
79
78
|
| Name | Type | Required | Description |
|
|
80
79
|
| ---- | :--: | :------: | :----------: |
|
|
81
80
|
| `connected` | `Boolean` | `Yes` | whether or not mapbox is told to be connected or not |
|
|
82
81
|
|
|
83
|
-
|
|
82
|
+
### Description
|
|
84
83
|
If you want to fully block online map - maybe to force offline maps
|
package/docs/MarkerView.md
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
<!-- This file was autogenerated from MarkerView.
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<!-- This file was autogenerated from MarkerView.tsx do not modify -->
|
|
2
|
+
# <MapboxGL.MarkerView />
|
|
3
|
+
MarkerView allows you to place a interactive react native marker to the map.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
If you have static view consider using PointAnnotation or SymbolLayer they'll offer much better performance
|
|
6
|
+
.
|
|
7
|
+
This is based on [MakerView plugin](https://docs.mapbox.com/android/plugins/overview/markerview/) on Android
|
|
8
|
+
and PointAnnotation on iOS.
|
|
9
|
+
|
|
10
|
+
## props
|
|
6
11
|
| Prop | Type | Default | Required | Description |
|
|
7
12
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
| coordinate | `
|
|
13
|
+
| coordinate | `tuple` | `none` | `true` | The center point (specified as a map coordinate) of the marker.<br/>See also #anchor. |
|
|
9
14
|
| anchor | `shape` | `{ x: 0.5, y: 0.5 }` | `false` | Specifies the anchor being set on a particular point of the annotation.<br/>The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],<br/>where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.<br/>Note this is only for custom annotations not the default pin view.<br/>Defaults to the center of the view. |
|
|
10
15
|
| x | `number` | `none` | `true` | `x` of anchor |
|
|
11
16
|
| y | `number` | `none` | `true` | `y` of anchor |
|
|
12
|
-
| children | `
|
|
17
|
+
| children | `ReactReactElement` | `none` | `true` | Expects one child - can be container with multiple elements |
|
|
13
18
|
|
|
14
19
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- This file was autogenerated from NativeUserLocation.js do not modify -->
|
|
2
|
-
|
|
3
|
-
###
|
|
2
|
+
# <MapboxGL.NativeUserLocation />
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
## props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| androidRenderMode | `enum` | `none` | `false` | Android render mode.<br/><br/> - normal: just a circle<br/> - compass: triangle with heading<br/> - gps: large arrow<br/><br/>@platform android |
|
package/docs/OfflineManager.md
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
<!-- This file was autogenerated from offlineManager.js do not modify -->
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
# <MapboxGL.offlineManager />
|
|
3
|
+
OfflineManager implements a singleton (shared object) that manages offline packs.
|
|
4
|
+
All of this class’s instance methods are asynchronous, reflecting the fact that offline resources are stored in a database.
|
|
5
|
+
The shared object maintains a canonical collection of offline packs.
|
|
4
6
|
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
## methods
|
|
9
|
+
### createPack(options[, progressListener][, errorListener])
|
|
8
10
|
|
|
9
11
|
Creates and registers an offline pack that downloads the resources needed to use the given region offline.
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
#### arguments
|
|
12
14
|
| Name | Type | Required | Description |
|
|
13
15
|
| ---- | :--: | :------: | :----------: |
|
|
14
16
|
| `options` | `OfflineCreatePackOptions` | `Yes` | Create options for a offline pack that specifices zoom levels, style url, and the region to download. |
|
|
@@ -31,11 +33,11 @@ await MapboxGL.offlineManager.createPack({
|
|
|
31
33
|
```
|
|
32
34
|
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
### invalidatePack(name)
|
|
35
37
|
|
|
36
38
|
Invalidates the specified offline pack. This method checks that the tiles in the specified offline pack match those from the server. Local tiles that do not match the latest version on the server are updated.This is more efficient than deleting the offline pack and downloading it again. If the data stored locally matches that on the server, new data will not be downloaded.
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
#### arguments
|
|
39
41
|
| Name | Type | Required | Description |
|
|
40
42
|
| ---- | :--: | :------: | :----------: |
|
|
41
43
|
| `name` | `String` | `Yes` | Name of the offline pack. |
|
|
@@ -47,11 +49,11 @@ await MapboxGL.offlineManager.invalidatePack('packName')
|
|
|
47
49
|
```
|
|
48
50
|
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
### deletePack(name)
|
|
51
53
|
|
|
52
54
|
Unregisters the given offline pack and allows resources that are no longer required by any remaining packs to be potentially freed.
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
#### arguments
|
|
55
57
|
| Name | Type | Required | Description |
|
|
56
58
|
| ---- | :--: | :------: | :----------: |
|
|
57
59
|
| `name` | `String` | `Yes` | Name of the offline pack. |
|
|
@@ -63,11 +65,11 @@ await MapboxGL.offlineManager.deletePack('packName')
|
|
|
63
65
|
```
|
|
64
66
|
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
### invalidateAmbientCache()
|
|
67
69
|
|
|
68
70
|
Forces a revalidation of the tiles in the ambient cache and downloads a fresh version of the tiles from the tile server.<br/>This is the recommend method for clearing the cache.<br/>This is the most efficient method because tiles in the ambient cache are re-downloaded to remove outdated data from a device.<br/>It does not erase resources from the ambient cache or delete the database, which can be computationally expensive operations that may carry unintended side effects.
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
#### arguments
|
|
71
73
|
| Name | Type | Required | Description |
|
|
72
74
|
| ---- | :--: | :------: | :----------: |
|
|
73
75
|
|
|
@@ -79,11 +81,11 @@ await MapboxGL.offlineManager.invalidateAmbientCache();
|
|
|
79
81
|
```
|
|
80
82
|
|
|
81
83
|
|
|
82
|
-
|
|
84
|
+
### clearAmbientCache()
|
|
83
85
|
|
|
84
86
|
Erases resources from the ambient cache.<br/>This method clears the cache and decreases the amount of space that map resources take up on the device.
|
|
85
87
|
|
|
86
|
-
|
|
88
|
+
#### arguments
|
|
87
89
|
| Name | Type | Required | Description |
|
|
88
90
|
| ---- | :--: | :------: | :----------: |
|
|
89
91
|
|
|
@@ -95,11 +97,11 @@ await MapboxGL.offlineManager.clearAmbientCache();
|
|
|
95
97
|
```
|
|
96
98
|
|
|
97
99
|
|
|
98
|
-
|
|
100
|
+
### migrateOfflineCache()
|
|
99
101
|
|
|
100
102
|
Migrates the offline cache from pre-v10 SDKs to the new v10 cache location
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
#### arguments
|
|
103
105
|
| Name | Type | Required | Description |
|
|
104
106
|
| ---- | :--: | :------: | :----------: |
|
|
105
107
|
|
|
@@ -111,11 +113,11 @@ await MapboxGL.offlineManager.migrateOfflineCache()
|
|
|
111
113
|
```
|
|
112
114
|
|
|
113
115
|
|
|
114
|
-
|
|
116
|
+
### setMaximumAmbientCacheSize(size)
|
|
115
117
|
|
|
116
118
|
Sets the maximum size of the ambient cache in bytes. Disables the ambient cache if set to 0.<br/>This method may be computationally expensive because it will erase resources from the ambient cache if its size is decreased.
|
|
117
119
|
|
|
118
|
-
|
|
120
|
+
#### arguments
|
|
119
121
|
| Name | Type | Required | Description |
|
|
120
122
|
| ---- | :--: | :------: | :----------: |
|
|
121
123
|
| `size` | `Number` | `Yes` | Size of ambient cache. |
|
|
@@ -127,11 +129,11 @@ await MapboxGL.offlineManager.setMaximumAmbientCacheSize(5000000);
|
|
|
127
129
|
```
|
|
128
130
|
|
|
129
131
|
|
|
130
|
-
|
|
132
|
+
### resetDatabase()
|
|
131
133
|
|
|
132
134
|
Deletes the existing database, which includes both the ambient cache and offline packs, then reinitializes it.
|
|
133
135
|
|
|
134
|
-
|
|
136
|
+
#### arguments
|
|
135
137
|
| Name | Type | Required | Description |
|
|
136
138
|
| ---- | :--: | :------: | :----------: |
|
|
137
139
|
|
|
@@ -143,11 +145,11 @@ await MapboxGL.offlineManager.resetDatabase();
|
|
|
143
145
|
```
|
|
144
146
|
|
|
145
147
|
|
|
146
|
-
|
|
148
|
+
### getPacks()
|
|
147
149
|
|
|
148
150
|
Retrieves all the current offline packs that are stored in the database.
|
|
149
151
|
|
|
150
|
-
|
|
152
|
+
#### arguments
|
|
151
153
|
| Name | Type | Required | Description |
|
|
152
154
|
| ---- | :--: | :------: | :----------: |
|
|
153
155
|
|
|
@@ -159,11 +161,11 @@ const offlinePacks = await MapboxGL.offlineManager.getPacks();
|
|
|
159
161
|
```
|
|
160
162
|
|
|
161
163
|
|
|
162
|
-
|
|
164
|
+
### getPack(name)
|
|
163
165
|
|
|
164
166
|
Retrieves an offline pack that is stored in the database by name.
|
|
165
167
|
|
|
166
|
-
|
|
168
|
+
#### arguments
|
|
167
169
|
| Name | Type | Required | Description |
|
|
168
170
|
| ---- | :--: | :------: | :----------: |
|
|
169
171
|
| `name` | `String` | `Yes` | Name of the offline pack. |
|
|
@@ -175,11 +177,11 @@ const offlinePack = await MapboxGL.offlineManager.getPack();
|
|
|
175
177
|
```
|
|
176
178
|
|
|
177
179
|
|
|
178
|
-
|
|
180
|
+
### mergeOfflineRegions(path)
|
|
179
181
|
|
|
180
182
|
Sideloads offline db
|
|
181
183
|
|
|
182
|
-
|
|
184
|
+
#### arguments
|
|
183
185
|
| Name | Type | Required | Description |
|
|
184
186
|
| ---- | :--: | :------: | :----------: |
|
|
185
187
|
| `path` | `String` | `Yes` | Path to offline tile db on file system. |
|
|
@@ -191,11 +193,11 @@ await MapboxGL.offlineManager.mergeOfflineRegions(path);
|
|
|
191
193
|
```
|
|
192
194
|
|
|
193
195
|
|
|
194
|
-
|
|
196
|
+
### setTileCountLimit(limit)
|
|
195
197
|
|
|
196
198
|
Sets the maximum number of Mapbox-hosted tiles that may be downloaded and stored on the current device.<br/>The Mapbox Terms of Service prohibit changing or bypassing this limit without permission from Mapbox.
|
|
197
199
|
|
|
198
|
-
|
|
200
|
+
#### arguments
|
|
199
201
|
| Name | Type | Required | Description |
|
|
200
202
|
| ---- | :--: | :------: | :----------: |
|
|
201
203
|
| `limit` | `Number` | `Yes` | Map tile limit count. |
|
|
@@ -207,11 +209,11 @@ MapboxGL.offlineManager.setTileCountLimit(1000);
|
|
|
207
209
|
```
|
|
208
210
|
|
|
209
211
|
|
|
210
|
-
|
|
212
|
+
### setProgressEventThrottle(throttleValue)
|
|
211
213
|
|
|
212
214
|
Sets the period at which download status events will be sent over the React Native bridge.<br/>The default is 500ms.
|
|
213
215
|
|
|
214
|
-
|
|
216
|
+
#### arguments
|
|
215
217
|
| Name | Type | Required | Description |
|
|
216
218
|
| ---- | :--: | :------: | :----------: |
|
|
217
219
|
| `throttleValue` | `Number` | `Yes` | event throttle value in ms. |
|
|
@@ -223,11 +225,11 @@ MapboxGL.offlineManager.setProgressEventThrottle(500);
|
|
|
223
225
|
```
|
|
224
226
|
|
|
225
227
|
|
|
226
|
-
|
|
228
|
+
### subscribe(packName, progressListener, errorListener)
|
|
227
229
|
|
|
228
230
|
Subscribe to download status/error events for the requested offline pack.<br/>Note that createPack calls this internally if listeners are provided.
|
|
229
231
|
|
|
230
|
-
|
|
232
|
+
#### arguments
|
|
231
233
|
| Name | Type | Required | Description |
|
|
232
234
|
| ---- | :--: | :------: | :----------: |
|
|
233
235
|
| `packName` | `String` | `Yes` | Name of the offline pack. |
|
|
@@ -243,11 +245,11 @@ MapboxGL.offlineManager.subscribe('packName', progressListener, errorListener)
|
|
|
243
245
|
```
|
|
244
246
|
|
|
245
247
|
|
|
246
|
-
|
|
248
|
+
### unsubscribe(packName)
|
|
247
249
|
|
|
248
250
|
Unsubscribes any listeners associated with the offline pack.<br/>It's a good idea to call this on componentWillUnmount.
|
|
249
251
|
|
|
250
|
-
|
|
252
|
+
#### arguments
|
|
251
253
|
| Name | Type | Required | Description |
|
|
252
254
|
| ---- | :--: | :------: | :----------: |
|
|
253
255
|
| `packName` | `String` | `Yes` | Name of the offline pack. |
|
package/docs/PointAnnotation.md
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<!-- This file was autogenerated from PointAnnotation.js do not modify -->
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
# <MapboxGL.PointAnnotation />
|
|
3
|
+
PointAnnotation represents a one-dimensional shape located at a single geographical coordinate.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Consider using ShapeSource and SymbolLayer instead, if you have many points and you have static images,
|
|
6
|
+
they'll offer much better performance.
|
|
7
|
+
|
|
8
|
+
If you need interactive views please use MarkerView,
|
|
9
|
+
as with PointAnnotation on Android child views are rendered onto a bitmap for better performance.
|
|
10
|
+
|
|
11
|
+
## props
|
|
6
12
|
| Prop | Type | Default | Required | Description |
|
|
7
13
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
14
|
| id | `string` | `none` | `true` | A string that uniquely identifies the annotation |
|
|
@@ -20,12 +26,12 @@
|
|
|
20
26
|
| onDragEnd | `func` | `none` | `false` | This callback is fired once this annotation has stopped being dragged. |
|
|
21
27
|
| onDrag | `func` | `none` | `false` | This callback is fired while this annotation is being dragged. |
|
|
22
28
|
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
## methods
|
|
30
|
+
### refresh()
|
|
25
31
|
|
|
26
32
|
On v10 and pre v10 android point annotation is rendered offscreen with a canvas into an image.<br/>To rerender the image from the current state of the view call refresh.<br/>Call this for example from Image#onLoad.
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
#### arguments
|
|
29
35
|
| Name | Type | Required | Description |
|
|
30
36
|
| ---- | :--: | :------: | :----------: |
|
|
31
37
|
|
package/docs/RasterDemSource.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- This file was autogenerated from RasterDemSource.js do not modify -->
|
|
2
|
-
|
|
3
|
-
###
|
|
2
|
+
# <MapboxGL.RasterDemSource />
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
## props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| id | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
|