@rnmapbox/maps 10.0.0-beta.42 → 10.0.0-beta.44
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/android/install.md +69 -2
- package/android/rctmgl/src/main/java-mapboxgl/common/com/mapbox/rctmgl/components/camera/CameraStop.java +4 -4
- package/android/rctmgl/src/main/java-mapboxgl/common/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.java +3 -3
- package/android/rctmgl/src/main/java-mapboxgl/common/com/mapbox/rctmgl/modules/RCTMGLSnapshotModule.java +1 -1
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/CameraStop.kt +6 -6
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.kt +1 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/modules/RCTMGLSnapshotModule.java +1 -1
- package/docs/HeadingIndicator.md +1 -1
- package/docs/ShapeSource.md +13 -9
- package/docs/SymbolLayer.md +4 -3
- package/docs/docs.json +41 -67
- package/index.d.ts +16 -128
- package/ios/RCTMGL-v10/RCTMGLCamera.swift +5 -21
- package/ios/install.md +3 -2
- package/javascript/components/AbstractLayer.tsx +72 -0
- package/javascript/components/AbstractSource.tsx +23 -0
- package/javascript/components/BackgroundLayer.js +1 -1
- package/javascript/components/CircleLayer.js +1 -1
- package/javascript/components/FillExtrusionLayer.js +1 -1
- package/javascript/components/FillLayer.js +1 -1
- package/javascript/components/{HeadingIndicator.js → HeadingIndicator.tsx} +6 -7
- package/javascript/components/HeatmapLayer.js +1 -1
- package/javascript/components/Images.js +1 -1
- package/javascript/components/LineLayer.js +1 -1
- package/javascript/components/MapView.js +5 -2
- package/javascript/components/MarkerView.tsx +1 -0
- package/javascript/components/NativeBridgeComponent.tsx +20 -14
- package/javascript/components/PointAnnotation.tsx +2 -1
- package/javascript/components/RasterLayer.js +1 -1
- package/javascript/components/RasterSource.js +1 -1
- package/javascript/components/ShapeSource.tsx +412 -0
- package/javascript/components/SkyLayer.js +1 -1
- package/javascript/components/Style.js +2 -2
- package/javascript/components/SymbolLayer.tsx +111 -0
- package/javascript/components/Terrain.tsx +0 -60
- package/javascript/components/UserLocation.js +1 -1
- package/javascript/components/VectorSource.js +6 -3
- package/javascript/components/annotations/Annotation.js +1 -1
- package/javascript/global.d.ts +4 -0
- package/javascript/index.js +2 -2
- package/javascript/utils/MapboxStyles.ts +157 -50
- package/javascript/utils/StyleValue.ts +8 -6
- package/javascript/utils/animated/Animated.js +2 -2
- package/javascript/utils/deprecation.ts +7 -4
- package/javascript/utils/{filterUtils.js → filterUtils.tsx} +1 -1
- package/javascript/utils/index.d.ts +16 -3
- package/package.json +1 -1
- package/scripts/autogenHelpers/DocJSONBuilder.js +2 -3
- package/scripts/autogenHelpers/globals.js +18 -7
- package/scripts/templates/MapboxStyles.ts.ejs +7 -2
- package/javascript/components/AbstractLayer.js +0 -46
- package/javascript/components/AbstractSource.js +0 -15
- package/javascript/components/ShapeSource.js +0 -373
- package/javascript/components/SymbolLayer.js +0 -120
package/android/install.md
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
Add `RNMapboxMapsImpl = "mapbox"` to your gradle file - see bellow for details.
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Setting RNMapboxMapsImpl to v10
|
|
14
14
|
|
|
15
|
-
*Warning*: If you set a
|
|
15
|
+
*Warning*: If you set a custom version, make sure you revisit, any time you update @rnmapbox/maps. Setting it to earlier version than what we exepect will likely result in a build error.
|
|
16
16
|
|
|
17
17
|
Overwrite mapbox dependencies within your `android/build.gradle > buildscript > ext` section
|
|
18
18
|
|
|
@@ -22,6 +22,53 @@ buildscript {
|
|
|
22
22
|
ext {
|
|
23
23
|
// ...
|
|
24
24
|
RNMapboxMapsImpl = "mapbox" // required for v10
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Adding mapbox maven repo
|
|
30
|
+
|
|
31
|
+
You will need to authorize your download of the Maps SDK via a secret access token with the `DOWNLOADS:READ` scope.
|
|
32
|
+
This [guide](https://docs.mapbox.com/android/maps/guides/install/#configure-credentials) explains how to `Configure credentials` and `Configure your secret token`.
|
|
33
|
+
|
|
34
|
+
Then under section `allprojects/repositories` add your data:
|
|
35
|
+
|
|
36
|
+
```groovy
|
|
37
|
+
// android/build.gradle
|
|
38
|
+
|
|
39
|
+
allprojects {
|
|
40
|
+
repositories {
|
|
41
|
+
// ...other repos
|
|
42
|
+
maven {
|
|
43
|
+
url 'https://api.mapbox.com/downloads/v2/releases/maven'
|
|
44
|
+
authentication {
|
|
45
|
+
basic(BasicAuthentication)
|
|
46
|
+
}
|
|
47
|
+
credentials {
|
|
48
|
+
// Do not change the username below.
|
|
49
|
+
// This should always be `mapbox` (not your username).
|
|
50
|
+
username = 'mapbox'
|
|
51
|
+
// Use the secret token you stored in gradle.properties as the password
|
|
52
|
+
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// ...even more repos?
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Using non default mapbox version
|
|
61
|
+
|
|
62
|
+
*Warning*: If you set a custom version, make sure you revisit, any time you update @rnmapbox/maps. Setting it to earlier version than what we exepect will likely result in a build error.
|
|
63
|
+
|
|
64
|
+
Set `RNMapboxMapsLibs` in `android/build.gradle > buildscript > ext` section
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
```groovy
|
|
68
|
+
buildscript {
|
|
69
|
+
ext {
|
|
70
|
+
// ...
|
|
71
|
+
RNMapboxMapsImpl = "mapbox"
|
|
25
72
|
|
|
26
73
|
RNMapboxMapsLibs = { // optional - only required if you want to customize it
|
|
27
74
|
implementation 'com.mapbox.maps:android:10.6.0'
|
|
@@ -33,6 +80,8 @@ buildscript {
|
|
|
33
80
|
|
|
34
81
|
|
|
35
82
|
|
|
83
|
+
If you see `2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs` issue see [possible workaround](#workaround-for-2-files-found-with-path-libarm64-v8alibc_sharedso-from-inputs).
|
|
84
|
+
|
|
36
85
|
## Using MapLibre
|
|
37
86
|
|
|
38
87
|
[MapLibre](https://github.com/maplibre/maplibre-gl-native) is an OSS fork of MapboxGL.
|
|
@@ -138,4 +187,22 @@ Feel free to check out the `/example` projects [`android/build.gradle`](https://
|
|
|
138
187
|
<br>
|
|
139
188
|
|
|
140
189
|
|
|
190
|
+
### Workaround for 2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs
|
|
191
|
+
|
|
192
|
+
```sh
|
|
193
|
+
code android/app/build.gradle
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
add the following
|
|
197
|
+
```gradle
|
|
198
|
+
android {
|
|
199
|
+
packagingOptions {
|
|
200
|
+
pickFirst 'lib/x86/libc++_shared.so'
|
|
201
|
+
pickFirst 'lib/x86_64/libc++_shared.so'
|
|
202
|
+
pickFirst 'lib/arm64-v8a/libc++_shared.so'
|
|
203
|
+
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
141
208
|
|
|
@@ -162,10 +162,10 @@ public class CameraStop {
|
|
|
162
162
|
|
|
163
163
|
// scale padding by pixel ratio
|
|
164
164
|
DisplayMetrics metrics = context.getResources().getDisplayMetrics();
|
|
165
|
-
paddingTop = Float.valueOf(paddingTop * metrics.
|
|
166
|
-
paddingRight = Float.valueOf(paddingRight * metrics.
|
|
167
|
-
paddingBottom = Float.valueOf(paddingBottom * metrics.
|
|
168
|
-
paddingLeft = Float.valueOf(paddingLeft * metrics.
|
|
165
|
+
paddingTop = Float.valueOf(paddingTop * metrics.density).intValue();
|
|
166
|
+
paddingRight = Float.valueOf(paddingRight * metrics.density).intValue();
|
|
167
|
+
paddingBottom = Float.valueOf(paddingBottom * metrics.density).intValue();
|
|
168
|
+
paddingLeft = Float.valueOf(paddingLeft * metrics.density).intValue();
|
|
169
169
|
|
|
170
170
|
stop.setPadding(
|
|
171
171
|
paddingLeft,
|
|
@@ -326,9 +326,9 @@ public class RCTMGLMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
326
326
|
int[] contentPadding = mMap.getPadding();
|
|
327
327
|
|
|
328
328
|
int mapWidth = (int) ((mMap.getWidth() * 0.75 - (contentPadding[0] + contentPadding[2]))
|
|
329
|
-
/ metrics.
|
|
329
|
+
/ metrics.density);
|
|
330
330
|
int mapHeight = (int) ((mMap.getHeight() * 0.75 - (contentPadding[1] + contentPadding[3]))
|
|
331
|
-
/ metrics.
|
|
331
|
+
/ metrics.density);
|
|
332
332
|
VisibleRegion region = GeoViewport.getRegion(center, (int) zoomLevel, mapWidth, mapHeight);
|
|
333
333
|
return region;
|
|
334
334
|
}
|
|
@@ -1246,7 +1246,7 @@ public class RCTMGLMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
1246
1246
|
|
|
1247
1247
|
final DisplayMetrics metrics = mContext.getResources().getDisplayMetrics();
|
|
1248
1248
|
|
|
1249
|
-
double[] result = {left * metrics.
|
|
1249
|
+
double[] result = {left * metrics.density, top * metrics.density, right * metrics.density, bottom * metrics.density};
|
|
1250
1250
|
return result;
|
|
1251
1251
|
}
|
|
1252
1252
|
|
|
@@ -107,7 +107,7 @@ public class RCTMGLSnapshotModule extends ReactContextBaseJavaModule {
|
|
|
107
107
|
|
|
108
108
|
options.withLogo(jsOptions.getBoolean("withLogo"));
|
|
109
109
|
options.withStyle(jsOptions.getString("styleURL"));
|
|
110
|
-
options.withPixelRatio(Float.valueOf(mContext.getResources().getDisplayMetrics().
|
|
110
|
+
options.withPixelRatio(Float.valueOf(mContext.getResources().getDisplayMetrics().density).intValue());
|
|
111
111
|
|
|
112
112
|
if (jsOptions.hasKey("bounds")) {
|
|
113
113
|
FeatureCollection bounds = FeatureCollection.fromJson(jsOptions.getString("bounds"));
|
|
@@ -162,10 +162,10 @@ import com.mapbox.mapboxsdk.maps.MapboxMap;
|
|
|
162
162
|
}
|
|
163
163
|
if (readableMap.hasKey("bounds")) {
|
|
164
164
|
val metrics = context.resources.displayMetrics
|
|
165
|
-
var paddingTop = getBoundsPaddingByKey(readableMap, metrics.
|
|
166
|
-
var paddingRight = getBoundsPaddingByKey(readableMap, metrics.
|
|
167
|
-
var paddingBottom = getBoundsPaddingByKey(readableMap, metrics.
|
|
168
|
-
var paddingLeft = getBoundsPaddingByKey(readableMap, metrics.
|
|
165
|
+
var paddingTop = getBoundsPaddingByKey(readableMap, metrics.density, "paddingTop")
|
|
166
|
+
var paddingRight = getBoundsPaddingByKey(readableMap, metrics.density, "paddingRight")
|
|
167
|
+
var paddingBottom = getBoundsPaddingByKey(readableMap, metrics.density, "paddingBottom")
|
|
168
|
+
var paddingLeft = getBoundsPaddingByKey(readableMap, metrics.density, "paddingLeft")
|
|
169
169
|
|
|
170
170
|
val collection = FeatureCollection.fromJson(readableMap.getString("bounds")!!)
|
|
171
171
|
stop.setBounds(
|
|
@@ -213,9 +213,9 @@ import com.mapbox.mapboxsdk.maps.MapboxMap;
|
|
|
213
213
|
return intArrayOf(resultLeft, resultTop, resultRight, resultBottom)
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
private fun getBoundsPaddingByKey(map: ReadableMap,
|
|
216
|
+
private fun getBoundsPaddingByKey(map: ReadableMap, density: Float, key: String): Int? {
|
|
217
217
|
if (map.hasKey(key)) {
|
|
218
|
-
return (map.getInt(key) *
|
|
218
|
+
return (map.getInt(key) * density).toInt()
|
|
219
219
|
} else {
|
|
220
220
|
return null;
|
|
221
221
|
}
|
package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/modules/RCTMGLSnapshotModule.java
CHANGED
|
@@ -132,7 +132,7 @@ public class RCTMGLSnapshotModule extends ReactContextBaseJavaModule {
|
|
|
132
132
|
(int) jsOptions.getDouble("height")
|
|
133
133
|
)
|
|
134
134
|
);
|
|
135
|
-
builder.pixelRatio(Float.valueOf(mContext.getResources().getDisplayMetrics().
|
|
135
|
+
builder.pixelRatio(Float.valueOf(mContext.getResources().getDisplayMetrics().density).intValue());
|
|
136
136
|
|
|
137
137
|
builder.resourceOptions(new ResourceOptions.Builder().accessToken(RCTMGLModule.getAccessToken(mContext)).build());
|
|
138
138
|
return builder.build();
|
package/docs/HeadingIndicator.md
CHANGED
package/docs/ShapeSource.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- This file was autogenerated from ShapeSource.
|
|
1
|
+
<!-- This file was autogenerated from ShapeSource.tsx do not modify -->
|
|
2
2
|
# <MapboxGL.ShapeSource />
|
|
3
3
|
ShapeSource is a map content source that supplies vector shapes to be shown on the map.
|
|
4
4
|
The shape may be an url or a GeoJSON object
|
|
@@ -8,19 +8,23 @@ The shape may be an url or a GeoJSON object
|
|
|
8
8
|
| ---- | :-- | :----- | :------ | :---------- |
|
|
9
9
|
| id | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
|
|
10
10
|
| url | `string` | `none` | `false` | An HTTP(S) URL, absolute file URL, or local file URL relative to the current application’s resource bundle. |
|
|
11
|
-
| shape |
|
|
12
|
-
|
|
11
|
+
| shape | `\| GeoJSON.GeometryCollection
|
|
12
|
+
\| GeoJSON.Feature
|
|
13
|
+
\| GeoJSON.FeatureCollection
|
|
14
|
+
\| GeoJSON.Geometry` | `none` | `false` | The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature collection. |
|
|
15
|
+
| cluster | `boolean` | `none` | `false` | Enables clustering on the source for point shapes. |
|
|
13
16
|
| clusterRadius | `number` | `none` | `false` | Specifies the radius of each cluster if clustering is enabled.<br/>A value of 512 produces a radius equal to the width of a tile.<br/>The default value is 50. |
|
|
14
17
|
| clusterMaxZoomLevel | `number` | `none` | `false` | Specifies the maximum zoom level at which to cluster points if clustering is enabled.<br/>Defaults to one zoom level less than the value of maxZoomLevel so that, at the maximum zoom level,<br/>the shapes are not clustered. |
|
|
15
18
|
| clusterProperties | `object` | `none` | `false` | [`mapbox-gl` (v8) implementation only]<br/>Specifies custom properties on the generated clusters if clustering<br/>is enabled, aggregating values from clustered points.<br/><br/>Has the form `{ "property_name": [operator, map_expression]}`, where<br/> `operator` is a custom reduce expression that references a special `["accumulated"]` value -<br/> it accumulates the property value from clusters/points the cluster contains<br/> `map_expression` produces the value of a single point<br/><br/>Example: `{ "resultingSum": [["+", ["accumulated"], ["get", "resultingSum"]], ["get", "scalerank"]] }` |
|
|
16
19
|
| maxZoomLevel | `number` | `none` | `false` | Specifies the maximum zoom level at which to create vector tiles.<br/>A greater value produces greater detail at high zoom levels.<br/>The default value is 18. |
|
|
17
20
|
| buffer | `number` | `none` | `false` | Specifies the size of the tile buffer on each side.<br/>A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself.<br/>Larger values produce fewer rendering artifacts near tile edges and slower performance.<br/>The default value is 128. |
|
|
18
21
|
| tolerance | `number` | `none` | `false` | Specifies the Douglas-Peucker simplification tolerance.<br/>A greater value produces simpler geometries and improves performance.<br/>The default value is 0.375. |
|
|
19
|
-
| lineMetrics | `
|
|
20
|
-
| onPress | `func` | `none` | `false` | Source press listener, gets called when a user presses one of the children layers only<br/>if that layer has a higher z-index than another source layers |
|
|
22
|
+
| lineMetrics | `boolean` | `none` | `false` | Whether to calculate line distance metrics.<br/>This is required for line layers that specify lineGradient values.<br/>The default value is false. |
|
|
23
|
+
| onPress | `func` | `none` | `false` | Source press listener, gets called when a user presses one of the children layers only<br/>if that layer has a higher z-index than another source layers<br/><br/>@param {Object} event<br/>@param {Object[]} event.features - the geojson features that have hit by the press (might be multiple)<br/>@param {Object} event.coordinates - the coordinates of the click<br/>@param {Object} event.point - the point of the click<br/>@return void<br/>*signature:*`(event:{features: Array, coordinates: {latitude: number, longitude: number}, point: {x: number, y: number}}) => void` |
|
|
21
24
|
| hitbox | `shape` | `none` | `false` | Overrides the default touch hitbox(44x44 pixels) for the source layers |
|
|
22
25
|
| width | `number` | `none` | `true` | `width` of hitbox |
|
|
23
26
|
| height | `number` | `none` | `true` | `height` of hitbox |
|
|
27
|
+
| children | `React.ReactElement \| React.ReactElement[]` | `none` | `true` | FIX ME NO DESCRIPTION |
|
|
24
28
|
|
|
25
29
|
## methods
|
|
26
30
|
### features([filter])
|
|
@@ -46,7 +50,7 @@ Returns the zoom needed to expand the cluster.
|
|
|
46
50
|
#### arguments
|
|
47
51
|
| Name | Type | Required | Description |
|
|
48
52
|
| ---- | :--: | :------: | :----------: |
|
|
49
|
-
| `feature` | `Feature` | `Yes` | The feature cluster to expand. |
|
|
53
|
+
| `feature` | `string \| GeoJSON.Feature` | `Yes` | The feature cluster to expand. |
|
|
50
54
|
|
|
51
55
|
|
|
52
56
|
|
|
@@ -62,7 +66,7 @@ Returns the FeatureCollection from the cluster.
|
|
|
62
66
|
#### arguments
|
|
63
67
|
| Name | Type | Required | Description |
|
|
64
68
|
| ---- | :--: | :------: | :----------: |
|
|
65
|
-
| `feature` | `Feature` | `Yes` | The feature cluster to expand. |
|
|
69
|
+
| `feature` | `number \| GeoJSON.Feature` | `Yes` | The feature cluster to expand. |
|
|
66
70
|
| `limit` | `number` | `Yes` | The number of points to return. |
|
|
67
71
|
| `offset` | `number` | `Yes` | The amount of points to skip (for pagination). |
|
|
68
72
|
|
|
@@ -80,7 +84,7 @@ Returns the FeatureCollection from the cluster (on the next zoom level).
|
|
|
80
84
|
#### arguments
|
|
81
85
|
| Name | Type | Required | Description |
|
|
82
86
|
| ---- | :--: | :------: | :----------: |
|
|
83
|
-
| `feature` | `Feature` | `Yes` | The feature cluster to expand. |
|
|
87
|
+
| `feature` | `number \| GeoJSON.Feature` | `Yes` | The feature cluster to expand. |
|
|
84
88
|
|
|
85
89
|
|
|
86
90
|
|
|
@@ -96,7 +100,7 @@ const collection = await shapeSource.getClusterChildren(clusterId);
|
|
|
96
100
|
#### arguments
|
|
97
101
|
| Name | Type | Required | Description |
|
|
98
102
|
| ---- | :--: | :------: | :----------: |
|
|
99
|
-
| `event` | `
|
|
103
|
+
| `event` | `NativeSyntheticEvent` | `Yes` | undefined |
|
|
100
104
|
|
|
101
105
|
|
|
102
106
|
|
package/docs/SymbolLayer.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- This file was autogenerated from SymbolLayer.
|
|
1
|
+
<!-- This file was autogenerated from SymbolLayer.tsx do not modify -->
|
|
2
2
|
# <MapboxGL.SymbolLayer />
|
|
3
3
|
SymbolLayer is a style layer that renders icon and text labels at points or along lines on the map.
|
|
4
4
|
|
|
@@ -11,10 +11,11 @@ SymbolLayer is a style layer that renders icon and text labels at points or alon
|
|
|
11
11
|
| aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
|
|
12
12
|
| belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
|
|
13
13
|
| layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
|
|
14
|
-
| filter | `
|
|
14
|
+
| filter | `Array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
|
|
15
15
|
| minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
|
|
16
16
|
| maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
|
|
17
|
-
| style | `
|
|
17
|
+
| style | `SymbolLayerStyleProps` | `none` | `true` | FIX ME NO DESCRIPTION |
|
|
18
|
+
| children | `JSX.Element \| JSX.Element[]` | `none` | `false` | FIX ME NO DESCRIPTION |
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
## styles
|
package/docs/docs.json
CHANGED
|
@@ -1646,7 +1646,7 @@
|
|
|
1646
1646
|
"description": "FIX ME NO DESCRIPTION"
|
|
1647
1647
|
}
|
|
1648
1648
|
],
|
|
1649
|
-
"fileNameWithExt": "HeadingIndicator.
|
|
1649
|
+
"fileNameWithExt": "HeadingIndicator.tsx",
|
|
1650
1650
|
"name": "HeadingIndicator"
|
|
1651
1651
|
},
|
|
1652
1652
|
"HeatmapLayer": {
|
|
@@ -3820,7 +3820,7 @@
|
|
|
3820
3820
|
"name": "feature",
|
|
3821
3821
|
"description": "The feature cluster to expand.",
|
|
3822
3822
|
"type": {
|
|
3823
|
-
"name": "Feature"
|
|
3823
|
+
"name": "string \\| GeoJSON.Feature"
|
|
3824
3824
|
},
|
|
3825
3825
|
"optional": false
|
|
3826
3826
|
}
|
|
@@ -3828,7 +3828,13 @@
|
|
|
3828
3828
|
"returns": {
|
|
3829
3829
|
"description": null,
|
|
3830
3830
|
"type": {
|
|
3831
|
-
"name": "
|
|
3831
|
+
"name": "Promise",
|
|
3832
|
+
"elements": [
|
|
3833
|
+
{
|
|
3834
|
+
"name": "string"
|
|
3835
|
+
}
|
|
3836
|
+
],
|
|
3837
|
+
"raw": "Promise<string>"
|
|
3832
3838
|
}
|
|
3833
3839
|
},
|
|
3834
3840
|
"description": "Returns the zoom needed to expand the cluster.",
|
|
@@ -3838,7 +3844,7 @@
|
|
|
3838
3844
|
},
|
|
3839
3845
|
{
|
|
3840
3846
|
"name": "getClusterLeaves",
|
|
3841
|
-
"docblock": "Returns the FeatureCollection from the cluster.\n\n@example\nconst collection = await shapeSource.getClusterLeaves(clusterId, limit, offset);\n\n@param {Feature} feature - The feature cluster to expand.\n@param {number} limit - The number of points to return.\n@param {number} offset - The amount of points to skip (for pagination).\n@return {FeatureCollection}",
|
|
3847
|
+
"docblock": "Returns the FeatureCollection from the cluster.\n\n@example\nconst collection = await shapeSource.getClusterLeaves(clusterId, limit, offset);\n\n@param {GeoJSON.Feature} feature - The feature cluster to expand.\n@param {number} limit - The number of points to return.\n@param {number} offset - The amount of points to skip (for pagination).\n@return {FeatureCollection}",
|
|
3842
3848
|
"modifiers": [
|
|
3843
3849
|
"async"
|
|
3844
3850
|
],
|
|
@@ -3847,7 +3853,7 @@
|
|
|
3847
3853
|
"name": "feature",
|
|
3848
3854
|
"description": "The feature cluster to expand.",
|
|
3849
3855
|
"type": {
|
|
3850
|
-
"name": "Feature"
|
|
3856
|
+
"name": "number \\| GeoJSON.Feature"
|
|
3851
3857
|
},
|
|
3852
3858
|
"optional": false
|
|
3853
3859
|
},
|
|
@@ -3881,7 +3887,7 @@
|
|
|
3881
3887
|
},
|
|
3882
3888
|
{
|
|
3883
3889
|
"name": "getClusterChildren",
|
|
3884
|
-
"docblock": "Returns the FeatureCollection from the cluster (on the next zoom level).\n\n@example\nconst collection = await shapeSource.getClusterChildren(clusterId);\n\n@param {Feature} feature - The feature cluster to expand.\n@return {FeatureCollection}",
|
|
3890
|
+
"docblock": "Returns the FeatureCollection from the cluster (on the next zoom level).\n\n@example\nconst collection = await shapeSource.getClusterChildren(clusterId);\n\n@param {GeoJSON.Feature} feature - The feature cluster to expand.\n@return {FeatureCollection}",
|
|
3885
3891
|
"modifiers": [
|
|
3886
3892
|
"async"
|
|
3887
3893
|
],
|
|
@@ -3890,7 +3896,7 @@
|
|
|
3890
3896
|
"name": "feature",
|
|
3891
3897
|
"description": "The feature cluster to expand.",
|
|
3892
3898
|
"type": {
|
|
3893
|
-
"name": "Feature"
|
|
3899
|
+
"name": "number \\| GeoJSON.Feature"
|
|
3894
3900
|
},
|
|
3895
3901
|
"optional": false
|
|
3896
3902
|
}
|
|
@@ -3915,7 +3921,7 @@
|
|
|
3915
3921
|
"name": "event",
|
|
3916
3922
|
"optional": false,
|
|
3917
3923
|
"type": {
|
|
3918
|
-
"name":
|
|
3924
|
+
"name": "NativeSyntheticEvent"
|
|
3919
3925
|
}
|
|
3920
3926
|
}
|
|
3921
3927
|
],
|
|
@@ -3940,14 +3946,14 @@
|
|
|
3940
3946
|
{
|
|
3941
3947
|
"name": "shape",
|
|
3942
3948
|
"required": false,
|
|
3943
|
-
"type": "
|
|
3949
|
+
"type": "\\| GeoJSON.GeometryCollection\n\\| GeoJSON.Feature\n\\| GeoJSON.FeatureCollection\n\\| GeoJSON.Geometry",
|
|
3944
3950
|
"default": "none",
|
|
3945
3951
|
"description": "The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature collection."
|
|
3946
3952
|
},
|
|
3947
3953
|
{
|
|
3948
3954
|
"name": "cluster",
|
|
3949
3955
|
"required": false,
|
|
3950
|
-
"type": "
|
|
3956
|
+
"type": "boolean",
|
|
3951
3957
|
"default": "none",
|
|
3952
3958
|
"description": "Enables clustering on the source for point shapes."
|
|
3953
3959
|
},
|
|
@@ -3996,59 +4002,19 @@
|
|
|
3996
4002
|
{
|
|
3997
4003
|
"name": "lineMetrics",
|
|
3998
4004
|
"required": false,
|
|
3999
|
-
"type": "
|
|
4005
|
+
"type": "boolean",
|
|
4000
4006
|
"default": "none",
|
|
4001
4007
|
"description": "Whether to calculate line distance metrics.\nThis is required for line layers that specify lineGradient values.\nThe default value is false."
|
|
4002
4008
|
},
|
|
4003
4009
|
{
|
|
4004
4010
|
"name": "onPress",
|
|
4005
4011
|
"required": false,
|
|
4006
|
-
"type":
|
|
4012
|
+
"type": {
|
|
4013
|
+
"name": "func",
|
|
4014
|
+
"funcSignature": "(event:{features: Array, coordinates: {latitude: number, longitude: number}, point: {x: number, y: number}}) => void"
|
|
4015
|
+
},
|
|
4007
4016
|
"default": "none",
|
|
4008
|
-
"description": "Source press listener, gets called when a user presses one of the children layers only\nif that layer has a higher z-index than another source layers"
|
|
4009
|
-
"params": [
|
|
4010
|
-
{
|
|
4011
|
-
"name": "event",
|
|
4012
|
-
"description": null,
|
|
4013
|
-
"type": {
|
|
4014
|
-
"name": "Object"
|
|
4015
|
-
},
|
|
4016
|
-
"optional": false
|
|
4017
|
-
},
|
|
4018
|
-
{
|
|
4019
|
-
"name": "event.features",
|
|
4020
|
-
"description": "the geojson features that have hit by the press (might be multiple)",
|
|
4021
|
-
"type": {
|
|
4022
|
-
"name": "Array",
|
|
4023
|
-
"elements": [
|
|
4024
|
-
{
|
|
4025
|
-
"name": "Object"
|
|
4026
|
-
}
|
|
4027
|
-
]
|
|
4028
|
-
},
|
|
4029
|
-
"optional": false
|
|
4030
|
-
},
|
|
4031
|
-
{
|
|
4032
|
-
"name": "event.coordinates",
|
|
4033
|
-
"description": "the coordinates of the click",
|
|
4034
|
-
"type": {
|
|
4035
|
-
"name": "Object"
|
|
4036
|
-
},
|
|
4037
|
-
"optional": false
|
|
4038
|
-
},
|
|
4039
|
-
{
|
|
4040
|
-
"name": "event.point",
|
|
4041
|
-
"description": "the point of the click",
|
|
4042
|
-
"type": {
|
|
4043
|
-
"name": "Object"
|
|
4044
|
-
},
|
|
4045
|
-
"optional": false
|
|
4046
|
-
}
|
|
4047
|
-
],
|
|
4048
|
-
"returns": {
|
|
4049
|
-
"description": "void",
|
|
4050
|
-
"type": null
|
|
4051
|
-
}
|
|
4017
|
+
"description": "Source press listener, gets called when a user presses one of the children layers only\nif that layer has a higher z-index than another source layers\n\n@param {Object} event\n@param {Object[]} event.features - the geojson features that have hit by the press (might be multiple)\n@param {Object} event.coordinates - the coordinates of the click\n@param {Object} event.point - the point of the click\n@return void\n*signature:*`(event:{features: Array, coordinates: {latitude: number, longitude: number}, point: {x: number, y: number}}) => void`"
|
|
4052
4018
|
},
|
|
4053
4019
|
{
|
|
4054
4020
|
"name": "hitbox",
|
|
@@ -4074,12 +4040,16 @@
|
|
|
4074
4040
|
},
|
|
4075
4041
|
"default": "none",
|
|
4076
4042
|
"description": "Overrides the default touch hitbox(44x44 pixels) for the source layers"
|
|
4043
|
+
},
|
|
4044
|
+
{
|
|
4045
|
+
"name": "children",
|
|
4046
|
+
"required": true,
|
|
4047
|
+
"type": "React.ReactElement \\| React.ReactElement[]",
|
|
4048
|
+
"default": "none",
|
|
4049
|
+
"description": "FIX ME NO DESCRIPTION"
|
|
4077
4050
|
}
|
|
4078
4051
|
],
|
|
4079
|
-
"
|
|
4080
|
-
"../utils"
|
|
4081
|
-
],
|
|
4082
|
-
"fileNameWithExt": "ShapeSource.js",
|
|
4052
|
+
"fileNameWithExt": "ShapeSource.tsx",
|
|
4083
4053
|
"name": "ShapeSource"
|
|
4084
4054
|
},
|
|
4085
4055
|
"SkyLayer": {
|
|
@@ -4411,7 +4381,7 @@
|
|
|
4411
4381
|
{
|
|
4412
4382
|
"name": "filter",
|
|
4413
4383
|
"required": false,
|
|
4414
|
-
"type": "
|
|
4384
|
+
"type": "Array",
|
|
4415
4385
|
"default": "none",
|
|
4416
4386
|
"description": "Filter only the features in the source layer that satisfy a condition that you define"
|
|
4417
4387
|
},
|
|
@@ -4431,16 +4401,20 @@
|
|
|
4431
4401
|
},
|
|
4432
4402
|
{
|
|
4433
4403
|
"name": "style",
|
|
4404
|
+
"required": true,
|
|
4405
|
+
"type": "SymbolLayerStyleProps",
|
|
4406
|
+
"default": "none",
|
|
4407
|
+
"description": "FIX ME NO DESCRIPTION"
|
|
4408
|
+
},
|
|
4409
|
+
{
|
|
4410
|
+
"name": "children",
|
|
4434
4411
|
"required": false,
|
|
4435
|
-
"type": "
|
|
4412
|
+
"type": "JSX.Element \\| JSX.Element[]",
|
|
4436
4413
|
"default": "none",
|
|
4437
|
-
"description": "
|
|
4414
|
+
"description": "FIX ME NO DESCRIPTION"
|
|
4438
4415
|
}
|
|
4439
4416
|
],
|
|
4440
|
-
"
|
|
4441
|
-
"../utils"
|
|
4442
|
-
],
|
|
4443
|
-
"fileNameWithExt": "SymbolLayer.js",
|
|
4417
|
+
"fileNameWithExt": "SymbolLayer.tsx",
|
|
4444
4418
|
"name": "SymbolLayer",
|
|
4445
4419
|
"styles": [
|
|
4446
4420
|
{
|