@maplibre/maplibre-react-native 9.1.0 → 10.0.0-alpha.2
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 +18 -0
- package/android/rctmgl/build.gradle +7 -7
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/location/LocationManager.java +2 -2
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/modules/RCTMGLOfflineModule.java +21 -26
- 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 +18 -3
- package/scripts/autogenHelpers/globals.js +1 -1
- package/scripts/autogenerate.js +14 -6
- package/scripts/download-style-spec.sh +1 -1
- 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/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
|
|