@maplibre/maplibre-react-native 9.1.0 → 10.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +10 -2
- package/.husky/pre-commit +5 -0
- package/.yarn/plugins/@yarnpkg/plugin-typescript.cjs +9 -0
- package/.yarn/sdks/eslint/bin/eslint.js +20 -0
- package/.yarn/sdks/eslint/lib/api.js +20 -0
- package/.yarn/sdks/eslint/package.json +6 -0
- package/.yarn/sdks/integrations.yml +5 -0
- package/.yarn/sdks/prettier/index.js +20 -0
- package/.yarn/sdks/prettier/package.json +6 -0
- package/.yarn/sdks/typescript/bin/tsc +20 -0
- package/.yarn/sdks/typescript/bin/tsserver +20 -0
- package/.yarn/sdks/typescript/lib/tsc.js +20 -0
- package/.yarn/sdks/typescript/lib/tsserver.js +225 -0
- package/.yarn/sdks/typescript/lib/tsserverlibrary.js +225 -0
- package/.yarn/sdks/typescript/lib/typescript.js +20 -0
- package/.yarn/sdks/typescript/package.json +6 -0
- package/CHANGELOG.md +11 -0
- package/docs/Annotation.md +8 -9
- package/docs/BackgroundLayer.md +2 -10
- package/docs/Callout.md +5 -5
- package/docs/Camera.md +18 -47
- package/docs/CircleLayer.md +2 -10
- package/docs/FillExtrusionLayer.md +2 -10
- package/docs/FillLayer.md +2 -10
- package/docs/HeatmapLayer.md +2 -10
- package/docs/ImageSource.md +3 -2
- package/docs/Images.md +5 -3
- package/docs/Light.md +1 -1
- package/docs/LineLayer.md +2 -10
- package/docs/MapView.md +53 -37
- package/docs/MarkerView.md +4 -2
- package/docs/NativeUserLocation.md +2 -2
- package/docs/PointAnnotation.md +5 -8
- package/docs/RasterLayer.md +2 -10
- package/docs/RasterSource.md +3 -2
- package/docs/ShapeSource.md +12 -7
- package/docs/Style.md +1 -1
- package/docs/SymbolLayer.md +3 -10
- package/docs/UserLocation.md +8 -10
- package/docs/VectorSource.md +6 -5
- package/docs/coordinates.md +6 -0
- package/docs/docs.json +518 -1272
- package/docs/location.md +6 -0
- package/docs/snapshotManager.md +3 -3
- package/javascript/@types/assets.d.ts +4 -0
- package/javascript/MGLModule.ts +37 -0
- package/javascript/Maplibre.ts +65 -0
- package/javascript/components/AbstractLayer.tsx +107 -0
- package/javascript/components/AbstractSource.tsx +27 -0
- package/javascript/components/BackgroundLayer.tsx +43 -0
- package/javascript/components/{Callout.js → Callout.tsx} +67 -65
- package/javascript/components/{Camera.js → Camera.tsx} +266 -251
- package/javascript/components/CircleLayer.tsx +46 -0
- package/javascript/components/FillExtrusionLayer.tsx +47 -0
- package/javascript/components/FillLayer.tsx +41 -0
- package/javascript/components/{HeadingIndicator.js → HeadingIndicator.tsx} +8 -8
- package/javascript/components/HeatmapLayer.tsx +44 -0
- package/javascript/components/ImageSource.tsx +78 -0
- package/javascript/components/Images.tsx +134 -0
- package/javascript/components/Light.tsx +67 -0
- package/javascript/components/LineLayer.tsx +42 -0
- package/javascript/components/{MapView.js → MapView.tsx} +365 -354
- package/javascript/components/MarkerView.tsx +104 -0
- package/javascript/components/{NativeBridgeComponent.js → NativeBridgeComponent.tsx} +44 -13
- package/javascript/components/NativeUserLocation.tsx +33 -0
- package/javascript/components/PointAnnotation.tsx +221 -0
- package/javascript/components/RasterLayer.tsx +41 -0
- package/javascript/components/RasterSource.tsx +117 -0
- package/javascript/components/ShapeSource.tsx +383 -0
- package/javascript/components/{Style.js → Style.tsx} +129 -38
- package/javascript/components/SymbolLayer.tsx +72 -0
- package/javascript/components/{UserLocation.js → UserLocation.tsx} +111 -110
- package/javascript/components/VectorSource.tsx +207 -0
- package/javascript/components/annotations/Annotation.tsx +134 -0
- package/javascript/index.ts +4 -0
- package/javascript/modules/location/{locationManager.js → locationManager.ts} +71 -10
- package/javascript/modules/offline/{OfflineCreatePackOptions.js → OfflineCreatePackOptions.ts} +20 -4
- package/javascript/modules/offline/{OfflinePack.js → OfflinePack.ts} +23 -7
- package/javascript/modules/offline/{offlineManager.js → offlineManager.ts} +81 -24
- package/javascript/modules/snapshot/{SnapshotOptions.js → SnapshotOptions.ts} +43 -6
- package/javascript/modules/snapshot/{snapshotManager.js → snapshotManager.ts} +5 -5
- package/javascript/requestAndroidLocationPermissions.ts +29 -0
- package/javascript/types/BaseProps.ts +5 -0
- package/javascript/types/OnPressEvent.ts +13 -0
- package/javascript/types/index.ts +7 -0
- package/javascript/utils/BridgeValue.ts +90 -0
- package/javascript/utils/{Logger.js → Logger.ts} +37 -18
- package/javascript/utils/MaplibreStyles.d.ts +1486 -0
- package/javascript/utils/StyleValue.ts +49 -0
- package/javascript/utils/animated/AbstractAnimatedCoordinates.ts +134 -0
- package/javascript/utils/animated/AnimatedCoordinatesArray.ts +112 -0
- package/javascript/utils/animated/{AnimatedExtractCoordinateFromArray.js → AnimatedExtractCoordinateFromArray.ts} +5 -5
- package/javascript/utils/animated/{AnimatedPoint.js → AnimatedPoint.ts} +20 -12
- package/javascript/utils/animated/{AnimatedRouteCoordinatesArray.js → AnimatedRouteCoordinatesArray.ts} +39 -14
- package/javascript/utils/animated/{AnimatedShape.js → AnimatedShape.ts} +31 -10
- package/javascript/utils/{deprecation.js → deprecation.ts} +9 -6
- package/javascript/utils/filterUtils.ts +9 -0
- package/javascript/utils/geoUtils.ts +79 -0
- package/javascript/utils/{index.js → index.ts} +44 -24
- package/javascript/utils/styleMap.ts +264 -0
- package/package.json +35 -27
- package/plugin/build/withMapLibre.js +3 -2
- package/scripts/autogenHelpers/globals.js +1 -1
- package/scripts/autogenerate.js +14 -6
- package/scripts/templates/MaplibreStyles.ts.ejs +99 -0
- package/scripts/templates/index.d.ts.ejs +71 -42
- package/scripts/templates/{styleMap.js.ejs → styleMap.ts.ejs} +3 -33
- package/setup-jest.js +1 -10
- package/tsconfig.json +20 -61
- package/index.d.ts +0 -955
- package/javascript/components/AbstractLayer.js +0 -75
- package/javascript/components/AbstractSource.js +0 -15
- package/javascript/components/BackgroundLayer.js +0 -97
- package/javascript/components/CircleLayer.js +0 -101
- package/javascript/components/FillExtrusionLayer.js +0 -98
- package/javascript/components/FillLayer.js +0 -94
- package/javascript/components/HeatmapLayer.js +0 -99
- package/javascript/components/ImageSource.js +0 -82
- package/javascript/components/Images.js +0 -119
- package/javascript/components/Light.js +0 -47
- package/javascript/components/LineLayer.js +0 -94
- package/javascript/components/MarkerView.js +0 -87
- package/javascript/components/NativeUserLocation.js +0 -41
- package/javascript/components/PointAnnotation.js +0 -216
- package/javascript/components/RasterLayer.js +0 -95
- package/javascript/components/RasterSource.js +0 -124
- package/javascript/components/ShapeSource.js +0 -372
- package/javascript/components/SymbolLayer.js +0 -120
- package/javascript/components/VectorSource.js +0 -200
- package/javascript/components/annotations/Annotation.js +0 -122
- package/javascript/index.js +0 -149
- package/javascript/utils/BridgeValue.js +0 -81
- package/javascript/utils/animated/AnimatedCoordinatesArray.js +0 -191
- package/javascript/utils/filterUtils.js +0 -7
- package/javascript/utils/geoUtils.js +0 -73
- package/javascript/utils/styleMap.js +0 -1932
- /package/javascript/utils/animated/{Animated.js → Animated.ts} +0 -0
package/docs/MapView.md
CHANGED
|
@@ -5,43 +5,59 @@
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
| contentInset | `
|
|
9
|
-
| style | `
|
|
10
|
-
| styleURL | `string` | `none` | `false` | Style URL for map - notice, if non is set it _will_ default to `MapLibreGL.StyleURL.
|
|
8
|
+
| contentInset | `number[] \| number` | `none` | `false` | The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport. |
|
|
9
|
+
| style | `ViewProps['style']` | `none` | `false` | Style for wrapping React Native View |
|
|
10
|
+
| styleURL | `string` | `none` | `false` | Style URL for map - notice, if non is set it _will_ default to `MapLibreGL.StyleURL.Default` |
|
|
11
11
|
| styleJSON | `string` | `none` | `false` | StyleJSON for map - according to TileJSON specs: https://github.com/mapbox/tilejson-spec |
|
|
12
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 excess the ability of device hardware.<br/>This property can be set to arbitrary integer values. |
|
|
13
|
-
| localizeLabels | `
|
|
14
|
-
| zoomEnabled | `
|
|
15
|
-
| scrollEnabled | `
|
|
16
|
-
| pitchEnabled | `
|
|
17
|
-
| rotateEnabled | `
|
|
18
|
-
| attributionEnabled | `
|
|
19
|
-
| attributionPosition |
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
| localizeLabels | `boolean` | `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
|
+
| zoomEnabled | `boolean` | `none` | `false` | Enable/Disable zoom on the map |
|
|
15
|
+
| scrollEnabled | `boolean` | `true` | `false` | Enable/Disable scroll on the map |
|
|
16
|
+
| pitchEnabled | `boolean` | `true` | `false` | Enable/Disable pitch on map |
|
|
17
|
+
| rotateEnabled | `boolean` | `true` | `false` | Enable/Disable rotation on map |
|
|
18
|
+
| attributionEnabled | `boolean` | `true` | `false` | Enable/Disable attribution on map.<br/><br/>This must be enabled for Mapbox-hosted tiles and styles. Please refer to the Mapbox Terms of Service.<br/>Other providers do not require this. |
|
|
19
|
+
| attributionPosition | `\| {
|
|
20
|
+
top?: number;
|
|
21
|
+
left?: number;
|
|
22
|
+
}
|
|
23
|
+
\| {
|
|
24
|
+
top?: number;
|
|
25
|
+
right?: number;
|
|
26
|
+
}
|
|
27
|
+
\| {
|
|
28
|
+
bottom?: number;
|
|
29
|
+
left?: number;
|
|
30
|
+
}
|
|
31
|
+
\| {
|
|
32
|
+
bottom?: number;
|
|
33
|
+
right?: number;
|
|
34
|
+
}` | `none` | `false` | Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map |
|
|
35
|
+
| tintColor | `string \| unknown[]` | `none` | `false` | MapView's tintColor |
|
|
36
|
+
| logoEnabled | `boolean` | `false` | `false` | Enable/Disable the logo on the map. |
|
|
37
|
+
| logoPosition | `\| {
|
|
38
|
+
top?: number;
|
|
39
|
+
left?: number;
|
|
40
|
+
}
|
|
41
|
+
\| {
|
|
42
|
+
top?: number;
|
|
43
|
+
right?: number;
|
|
44
|
+
}
|
|
45
|
+
\| {
|
|
46
|
+
bottom?: number;
|
|
47
|
+
left?: number;
|
|
48
|
+
}
|
|
49
|
+
\| {
|
|
50
|
+
bottom?: number;
|
|
51
|
+
right?: number;
|
|
52
|
+
}` | `none` | `false` | Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map |
|
|
53
|
+
| compassEnabled | `boolean` | `none` | `false` | Enable/Disable the compass from appearing on the map |
|
|
24
54
|
| compassViewPosition | `number` | `none` | `false` | Change corner of map the compass starts at. 0: TopLeft, 1: TopRight, 2: BottomLeft, 3: BottomRight |
|
|
25
55
|
| compassViewMargins | `object` | `none` | `false` | Add margins to the compass with x and y values |
|
|
26
|
-
| surfaceView | `
|
|
27
|
-
|
|
|
28
|
-
| onLongPress | `func` | `none` | `false` | Map long press listener, gets called when a user long presses the map |
|
|
29
|
-
| onRegionWillChange | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region is about to change. |
|
|
30
|
-
| onRegionIsChanging | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region is changing. |
|
|
31
|
-
| onRegionDidChange | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region finished changing |
|
|
32
|
-
| onWillStartLoadingMap | `func` | `none` | `false` | This event is triggered when the map is about to start loading a new map style. |
|
|
33
|
-
| onDidFinishLoadingMap | `func` | `none` | `false` | This is triggered when the map has successfully loaded a new map style. |
|
|
34
|
-
| onDidFailLoadingMap | `func` | `none` | `false` | This event is triggered when the map has failed to load a new map style. |
|
|
35
|
-
| onWillStartRenderingFrame | `func` | `none` | `false` | This event is triggered when the map will start rendering a frame. |
|
|
36
|
-
| onDidFinishRenderingFrame | `func` | `none` | `false` | This event is triggered when the map finished rendering a frame. |
|
|
37
|
-
| onDidFinishRenderingFrameFully | `func` | `none` | `false` | This event is triggered when the map fully finished rendering a frame. |
|
|
38
|
-
| onWillStartRenderingMap | `func` | `none` | `false` | This event is triggered when the map will start rendering the map. |
|
|
39
|
-
| onDidFinishRenderingMap | `func` | `none` | `false` | This event is triggered when the map finished rendering the map. |
|
|
40
|
-
| onDidFinishRenderingMapFully | `func` | `none` | `false` | This event is triggered when the map fully finished rendering the map. |
|
|
41
|
-
| onUserLocationUpdate | `func` | `none` | `false` | This event is triggered when the user location is updated. |
|
|
42
|
-
| onDidFinishLoadingStyle | `func` | `none` | `false` | This event is triggered when a style has finished loading. |
|
|
56
|
+
| surfaceView | `boolean` | `false` | `false` | [Android only] Enable/Disable use of GLSurfaceView insted of TextureView. |
|
|
57
|
+
| onUserLocationUpdate | `func` | `none` | `false` | This event is triggered when the user location is updated.<br/>*signature:*`(location:Location) => void` |
|
|
43
58
|
| regionWillChangeDebounceTime | `number` | `10` | `false` | The emitted frequency of regionwillchange events |
|
|
44
59
|
| regionDidChangeDebounceTime | `number` | `500` | `false` | The emitted frequency of regiondidchange events |
|
|
60
|
+
| children | `ReactNode` | `none` | `true` | FIX ME NO DESCRIPTION |
|
|
45
61
|
|
|
46
62
|
### methods
|
|
47
63
|
#### getPointInView(coordinate)
|
|
@@ -51,7 +67,7 @@ Converts a geographic coordinate to a point in the given view’s coordinate sys
|
|
|
51
67
|
##### arguments
|
|
52
68
|
| Name | Type | Required | Description |
|
|
53
69
|
| ---- | :--: | :------: | :----------: |
|
|
54
|
-
| `coordinate` | `
|
|
70
|
+
| `coordinate` | `GeoJSON.Position` | `Yes` | A point expressed in the map view's coordinate system. |
|
|
55
71
|
|
|
56
72
|
|
|
57
73
|
|
|
@@ -99,8 +115,8 @@ Returns an array of rendered map features that intersect with a given point.
|
|
|
99
115
|
##### arguments
|
|
100
116
|
| Name | Type | Required | Description |
|
|
101
117
|
| ---- | :--: | :------: | :----------: |
|
|
102
|
-
| `coordinate` | `
|
|
103
|
-
| `filter` | `
|
|
118
|
+
| `coordinate` | `GeoJSON.Position` | `Yes` | A point expressed in the map view’s coordinate system. |
|
|
119
|
+
| `filter` | `FilterExpression` | `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. |
|
|
104
120
|
| `layerIDs` | `Array` | `No` | A array of layer id's to filter the features by |
|
|
105
121
|
|
|
106
122
|
|
|
@@ -117,8 +133,8 @@ Returns an array of rendered map features that intersect with the given rectangl
|
|
|
117
133
|
##### arguments
|
|
118
134
|
| Name | Type | Required | Description |
|
|
119
135
|
| ---- | :--: | :------: | :----------: |
|
|
120
|
-
| `bbox` | `
|
|
121
|
-
| `filter` | `
|
|
136
|
+
| `bbox` | `GeoJSON.BBox` | `Yes` | A rectangle expressed in the map view’s coordinate system. |
|
|
137
|
+
| `filter` | `FilterExpression` | `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. |
|
|
122
138
|
| `layerIDs` | `Array` | `No` | A array of layer id's to filter the features by |
|
|
123
139
|
|
|
124
140
|
|
|
@@ -188,7 +204,7 @@ Sets the visibility of all the layers referencing the specified `sourceLayerId`
|
|
|
188
204
|
| Name | Type | Required | Description |
|
|
189
205
|
| ---- | :--: | :------: | :----------: |
|
|
190
206
|
| `visible` | `boolean` | `Yes` | Visibility of the layers |
|
|
191
|
-
| `sourceId` | `
|
|
207
|
+
| `sourceId` | `string` | `Yes` | Identifier of the target source (e.g. 'composite') |
|
|
192
208
|
| `sourceLayerId` | `String` | `No` | Identifier of the target source-layer (e.g. 'building') |
|
|
193
209
|
|
|
194
210
|
|
package/docs/MarkerView.md
CHANGED
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
| coordinate | `
|
|
8
|
+
| coordinate | `Array` | `none` | `true` | The center point (specified as a map coordinate) of the marker.<br/>See also #anchor. |
|
|
9
9
|
| 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
10
|
| x | `number` | `none` | `true` | `x` of anchor |
|
|
11
11
|
| y | `number` | `none` | `true` | `y` of anchor |
|
|
12
|
-
|
|
|
12
|
+
| allowOverlap | `boolean` | `false` | `false` | FIX ME NO DESCRIPTION |
|
|
13
|
+
| isSelected | `boolean` | `false` | `false` | FIX ME NO DESCRIPTION |
|
|
14
|
+
| children | `ReactReactElement` | `none` | `true` | Expects one child - can be container with multiple elements |
|
|
13
15
|
|
|
14
16
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
| androidRenderMode | `
|
|
9
|
-
| iosShowsUserHeadingIndicator | `
|
|
8
|
+
| androidRenderMode | `'normal' \| 'compass' \| 'gps'` | `none` | `false` | Android render mode.<br/><br/> - normal: just a circle<br/> - compass: triangle with heading<br/> - gps: large arrow<br/><br/>@platform android |
|
|
9
|
+
| iosShowsUserHeadingIndicator | `boolean` | `none` | `false` | iOS only. A Boolean value indicating whether the user location annotation may display a permanent heading indicator.<br/><br/>@platform ios |
|
|
10
10
|
|
|
11
11
|
|
package/docs/PointAnnotation.md
CHANGED
|
@@ -8,17 +8,14 @@
|
|
|
8
8
|
| id | `string` | `none` | `true` | A string that uniquely identifies the annotation |
|
|
9
9
|
| title | `string` | `none` | `false` | The string containing the annotation’s title. Note this is required to be set if you want to see a callout appear on iOS. |
|
|
10
10
|
| snippet | `string` | `none` | `false` | The string containing the annotation’s snippet(subtitle). Not displayed in the default callout. |
|
|
11
|
-
| selected | `
|
|
12
|
-
| draggable | `
|
|
13
|
-
| coordinate | `
|
|
11
|
+
| selected | `boolean` | `none` | `false` | Manually selects/deselects annotation<br/>@type {[type]} |
|
|
12
|
+
| draggable | `boolean` | `false` | `false` | Enable or disable dragging. Defaults to false. |
|
|
13
|
+
| coordinate | `Array` | `none` | `true` | The center point (specified as a map coordinate) of the annotation. |
|
|
14
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. |
|
|
15
15
|
| x | `number` | `none` | `true` | See anchor |
|
|
16
16
|
| y | `number` | `none` | `true` | See anchor |
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
| onDragStart | `func` | `none` | `false` | This callback is fired once this annotation has started being dragged. |
|
|
20
|
-
| onDragEnd | `func` | `none` | `false` | This callback is fired once this annotation has stopped being dragged. |
|
|
21
|
-
| onDrag | `func` | `none` | `false` | This callback is fired while this annotation is being dragged. |
|
|
17
|
+
| children | `React.ReactElement \| [React.ReactElement, React.ReactElement]` | `none` | `true` | Expects one child, and an optional callout can be added as well |
|
|
18
|
+
| style | `ViewProps['style']` | `none` | `false` | FIX ME NO DESCRIPTION |
|
|
22
19
|
|
|
23
20
|
### methods
|
|
24
21
|
#### refresh()
|
package/docs/RasterLayer.md
CHANGED
|
@@ -5,16 +5,8 @@
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
|
|
|
9
|
-
| sourceID | `
|
|
10
|
-
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |
|
|
11
|
-
| aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
|
|
12
|
-
| belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
|
|
13
|
-
| layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
|
|
14
|
-
| filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
|
|
15
|
-
| minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
|
|
16
|
-
| maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
|
|
17
|
-
| style | `union` | `none` | `false` | Customizable style attributes |
|
|
8
|
+
| style | `RasterLayerStyleProps` | `none` | `false` | Customizable style attributes |
|
|
9
|
+
| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
|
|
18
10
|
|
|
19
11
|
|
|
20
12
|
### styles
|
package/docs/RasterSource.md
CHANGED
|
@@ -7,11 +7,12 @@
|
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| id | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
|
|
9
9
|
| url | `string` | `none` | `false` | A URL to a TileJSON configuration file describing the source’s contents and other metadata. |
|
|
10
|
-
| tileUrlTemplates | `
|
|
10
|
+
| tileUrlTemplates | `Array` | `none` | `false` | An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.<br/>Example: https://example.com/raster-tiles/{z}/{x}/{y}.png |
|
|
11
11
|
| minZoomLevel | `number` | `none` | `false` | An unsigned integer that specifies the minimum zoom level at which to display tiles from the source.<br/>The value should be between 0 and 22, inclusive, and less than<br/>maxZoomLevel, if specified. The default value for this option is 0. |
|
|
12
12
|
| maxZoomLevel | `number` | `none` | `false` | An unsigned integer that specifies the maximum zoom level at which to display tiles from the source.<br/>The value should be between 0 and 22, inclusive, and less than<br/>minZoomLevel, if specified. The default value for this option is 22. |
|
|
13
13
|
| tileSize | `number` | `none` | `false` | Size of the map tiles.<br/>Mapbox urls default to 256, all others default to 512. |
|
|
14
|
-
| tms | `
|
|
14
|
+
| tms | `boolean` | `none` | `false` | Influences the y direction of the tile coordinates. (tms inverts y axis) |
|
|
15
15
|
| attribution | `string` | `none` | `false` | An HTML or literal text string defining the buttons to be displayed in an action sheet when the<br/>source is part of a map view’s style and the map view’s attribution button is pressed. |
|
|
16
|
+
| children | `React.ReactElement \| React.ReactElement[]` | `none` | `false` | FIX ME NO DESCRIPTION |
|
|
16
17
|
|
|
17
18
|
|
package/docs/ShapeSource.md
CHANGED
|
@@ -7,19 +7,24 @@
|
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| id | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
|
|
9
9
|
| url | `string` | `none` | `false` | An HTTP(S) URL, absolute file URL, or local file URL relative to the current application’s resource bundle. |
|
|
10
|
-
| shape |
|
|
11
|
-
|
|
10
|
+
| shape | `\| GeoJSON.GeometryCollection
|
|
11
|
+
\| GeoJSON.Feature
|
|
12
|
+
\| GeoJSON.FeatureCollection
|
|
13
|
+
\| GeoJSON.Geometry` | `none` | `false` | The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature colllection. |
|
|
14
|
+
| cluster | `boolean` | `none` | `false` | Enables clustering on the source for point shapes. |
|
|
12
15
|
| 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. |
|
|
13
16
|
| 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. |
|
|
14
|
-
| clusterProperties | `
|
|
17
|
+
| clusterProperties | `shape` | `none` | `false` | 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"]] }` |
|
|
18
|
+
| [object Object] | `ExpressionField` | `none` | `true` | FIX ME NO DESCRIPTION |
|
|
15
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. |
|
|
16
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. |
|
|
17
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. |
|
|
18
|
-
| lineMetrics | `
|
|
19
|
-
| 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:OnPressEvent) => void` |
|
|
20
24
|
| hitbox | `shape` | `none` | `false` | Overrides the default touch hitbox(44x44 pixels) for the source layers |
|
|
21
25
|
| width | `number` | `none` | `true` | `width` of hitbox |
|
|
22
26
|
| height | `number` | `none` | `true` | `height` of hitbox |
|
|
27
|
+
| children | `ReactElement \| ReactElement[]` | `none` | `false` | FIX ME NO DESCRIPTION |
|
|
23
28
|
|
|
24
29
|
### methods
|
|
25
30
|
#### features([filter])
|
|
@@ -29,7 +34,7 @@ Returns all features from the source that match the query parameters regardless
|
|
|
29
34
|
##### arguments
|
|
30
35
|
| Name | Type | Required | Description |
|
|
31
36
|
| ---- | :--: | :------: | :----------: |
|
|
32
|
-
| `filter` | `
|
|
37
|
+
| `filter` | `FilterExpression` | `No` | an optional filter statement to filter the returned Features. |
|
|
33
38
|
|
|
34
39
|
|
|
35
40
|
|
|
@@ -95,7 +100,7 @@ const collection = await shapeSource.getClusterChildren(clusterId);
|
|
|
95
100
|
##### arguments
|
|
96
101
|
| Name | Type | Required | Description |
|
|
97
102
|
| ---- | :--: | :------: | :----------: |
|
|
98
|
-
| `event` | `
|
|
103
|
+
| `event` | `NativeSyntheticEvent` | `Yes` | undefined |
|
|
99
104
|
|
|
100
105
|
|
|
101
106
|
|
package/docs/Style.md
CHANGED
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
| json | `
|
|
8
|
+
| json | `MaplibreJSON \| URL` | `none` | `false` | A JSON object conforming to the schema described in the MapLibre Style Specification, or a URL to such JSON. |
|
|
9
9
|
|
|
10
10
|
|
package/docs/SymbolLayer.md
CHANGED
|
@@ -5,16 +5,9 @@
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
| aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
|
|
12
|
-
| belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
|
|
13
|
-
| layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
|
|
14
|
-
| filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
|
|
15
|
-
| minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
|
|
16
|
-
| maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
|
|
17
|
-
| style | `union` | `none` | `false` | Customizable style attributes |
|
|
8
|
+
| style | `SymbolLayerStyleProps` | `none` | `false` | Customizable style attributes |
|
|
9
|
+
| children | `ReactElement \| ReactElement[]` | `none` | `false` | @deprecated passed children used to create an image with id of symbol in style and also set the iconImageName property accordingly.<br/>This is now deprecated, use Image component instead. |
|
|
10
|
+
| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
|
|
18
11
|
|
|
19
12
|
|
|
20
13
|
### styles
|
package/docs/UserLocation.md
CHANGED
|
@@ -5,25 +5,23 @@
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
| animated | `
|
|
9
|
-
| renderMode | `
|
|
10
|
-
| androidRenderMode | `
|
|
11
|
-
| visible | `
|
|
12
|
-
|
|
|
13
|
-
| onUpdate | `func` | `none` | `false` | Callback that is triggered on location update |
|
|
14
|
-
| showsUserHeadingIndicator | `bool` | `false` | `false` | Show or hide small arrow which indicates direction the device is pointing relative to north. |
|
|
8
|
+
| animated | `boolean` | `true` | `false` | Whether location icon is animated between updates |
|
|
9
|
+
| renderMode | `'normal' \| 'native'` | `'normal'` | `false` | Which render mode to use.<br/>Can either be `normal` or `native` |
|
|
10
|
+
| androidRenderMode | `'normal' \| 'compass' \| 'gps'` | `none` | `false` | native/android only render mode<br/><br/> - normal: just a circle<br/> - compass: triangle with heading<br/> - gps: large arrow<br/><br/>@platform android |
|
|
11
|
+
| visible | `boolean` | `true` | `false` | Whether location icon is visible |
|
|
12
|
+
| showsUserHeadingIndicator | `boolean` | `false` | `false` | Show or hide small arrow which indicates direction the device is pointing relative to north. |
|
|
15
13
|
| minDisplacement | `number` | `0` | `false` | Minimum amount of movement before GPS location is updated in meters |
|
|
16
|
-
| children | `
|
|
14
|
+
| children | `ReactElement \| ReactElement[]` | `none` | `false` | Custom location icon of type mapbox-gl-native components<br/><br/>NOTE: Forking maintainer does not understand the above comment. |
|
|
17
15
|
|
|
18
16
|
### methods
|
|
19
|
-
#### setLocationManager({running})
|
|
17
|
+
#### setLocationManager({running}: {running: boolean})
|
|
20
18
|
|
|
21
19
|
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
20
|
|
|
23
21
|
##### arguments
|
|
24
22
|
| Name | Type | Required | Description |
|
|
25
23
|
| ---- | :--: | :------: | :----------: |
|
|
26
|
-
| `{running}` | `
|
|
24
|
+
| `{running}: {running: boolean}` | `{running:boolean}` | `Yes` | undefined |
|
|
27
25
|
|
|
28
26
|
|
|
29
27
|
#### needsLocationManagerRunning()
|
package/docs/VectorSource.md
CHANGED
|
@@ -7,15 +7,16 @@
|
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| id | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
|
|
9
9
|
| url | `string` | `none` | `false` | A URL to a TileJSON configuration file describing the source’s contents and other metadata. |
|
|
10
|
-
| tileUrlTemplates | `
|
|
10
|
+
| tileUrlTemplates | `Array` | `none` | `false` | An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.<br/>Example: https://example.com/vector-tiles/{z}/{x}/{y}.pbf |
|
|
11
11
|
| minZoomLevel | `number` | `none` | `false` | An unsigned integer that specifies the minimum zoom level at which to display tiles from the source.<br/>The value should be between 0 and 22, inclusive, and less than<br/>maxZoomLevel, if specified. The default value for this option is 0. |
|
|
12
12
|
| maxZoomLevel | `number` | `none` | `false` | An unsigned integer that specifies the maximum zoom level at which to display tiles from the source.<br/>The value should be between 0 and 22, inclusive, and less than<br/>minZoomLevel, if specified. The default value for this option is 22. |
|
|
13
|
-
| tms | `
|
|
13
|
+
| tms | `boolean` | `none` | `false` | Influences the y direction of the tile coordinates. (tms inverts y axis) |
|
|
14
14
|
| attribution | `string` | `none` | `false` | An HTML or literal text string defining the buttons to be displayed in an action sheet when the<br/>source is part of a map view’s style and the map view’s attribution button is pressed. |
|
|
15
|
-
| 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 |
|
|
15
|
+
| 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/>*signature:*`(event:OnPressEvent) => void` |
|
|
16
16
|
| hitbox | `shape` | `none` | `false` | Overrides the default touch hitbox(44x44 pixels) for the source layers |
|
|
17
17
|
| width | `number` | `none` | `true` | `width` of hitbox |
|
|
18
18
|
| height | `number` | `none` | `true` | `height` of hitbox |
|
|
19
|
+
| children | `React.ReactElement \| React.ReactElement[]` | `none` | `false` | FIX ME NO DESCRIPTION |
|
|
19
20
|
|
|
20
21
|
### methods
|
|
21
22
|
#### features([layerIDs][, filter])
|
|
@@ -26,7 +27,7 @@ Returns all features that match the query parameters regardless of whether or no
|
|
|
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. |
|
|
29
|
-
| `filter` | `
|
|
30
|
+
| `filter` | `FilterExpression` | `No` | an optional filter statement to filter the returned Features. |
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
|
|
@@ -42,7 +43,7 @@ vectorSource.features(['id1', 'id2'])
|
|
|
42
43
|
##### arguments
|
|
43
44
|
| Name | Type | Required | Description |
|
|
44
45
|
| ---- | :--: | :------: | :----------: |
|
|
45
|
-
| `event` | `
|
|
46
|
+
| `event` | `NativeSyntheticEvent` | `Yes` | undefined |
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
|