@maplibre/maplibre-react-native 10.0.0-beta.11 → 10.0.0-beta.13
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/README.md +3 -3
- package/android/build.gradle +1 -1
- package/ios/MLRN/MLRNStyle.m +0 -40
- package/lib/commonjs/MapLibreRN.js +77 -59
- package/lib/commonjs/MapLibreRN.js.map +1 -1
- package/lib/commonjs/components/Annotation.js +7 -9
- package/lib/commonjs/components/Annotation.js.map +1 -1
- package/lib/commonjs/components/BackgroundLayer.js +6 -8
- package/lib/commonjs/components/BackgroundLayer.js.map +1 -1
- package/lib/commonjs/components/Callout.js +2 -2
- package/lib/commonjs/components/Callout.js.map +1 -1
- package/lib/commonjs/components/Camera.js +2 -3
- package/lib/commonjs/components/Camera.js.map +1 -1
- package/lib/commonjs/components/CircleLayer.js +6 -8
- package/lib/commonjs/components/CircleLayer.js.map +1 -1
- package/lib/commonjs/components/FillExtrusionLayer.js +6 -8
- package/lib/commonjs/components/FillExtrusionLayer.js.map +1 -1
- package/lib/commonjs/components/FillLayer.js +6 -8
- package/lib/commonjs/components/FillLayer.js.map +1 -1
- package/lib/commonjs/components/HeadingIndicator.js +4 -4
- package/lib/commonjs/components/HeadingIndicator.js.map +1 -1
- package/lib/commonjs/components/HeatmapLayer.js +6 -8
- package/lib/commonjs/components/HeatmapLayer.js.map +1 -1
- package/lib/commonjs/components/ImageSource.js +4 -5
- package/lib/commonjs/components/ImageSource.js.map +1 -1
- package/lib/commonjs/components/Images.js +2 -2
- package/lib/commonjs/components/Images.js.map +1 -1
- package/lib/commonjs/components/Light.js +4 -6
- package/lib/commonjs/components/Light.js.map +1 -1
- package/lib/commonjs/components/LineLayer.js +6 -8
- package/lib/commonjs/components/LineLayer.js.map +1 -1
- package/lib/commonjs/components/MapView.js +38 -39
- package/lib/commonjs/components/MapView.js.map +1 -1
- package/lib/commonjs/components/MarkerView.js +4 -5
- package/lib/commonjs/components/MarkerView.js.map +1 -1
- package/lib/commonjs/components/NativeUserLocation.js +2 -2
- package/lib/commonjs/components/NativeUserLocation.js.map +1 -1
- package/lib/commonjs/components/PointAnnotation.js +4 -6
- package/lib/commonjs/components/PointAnnotation.js.map +1 -1
- package/lib/commonjs/components/RasterLayer.js +6 -8
- package/lib/commonjs/components/RasterLayer.js.map +1 -1
- package/lib/commonjs/components/RasterSource.js +8 -10
- package/lib/commonjs/components/RasterSource.js.map +1 -1
- package/lib/commonjs/components/ShapeSource.js +6 -8
- package/lib/commonjs/components/ShapeSource.js.map +1 -1
- package/lib/commonjs/components/SymbolLayer.js +6 -7
- package/lib/commonjs/components/SymbolLayer.js.map +1 -1
- package/lib/commonjs/components/UserLocation.js +20 -22
- package/lib/commonjs/components/UserLocation.js.map +1 -1
- package/lib/commonjs/components/VectorSource.js +8 -10
- package/lib/commonjs/components/VectorSource.js.map +1 -1
- package/lib/commonjs/hooks/useAbstractLayer.js +1 -1
- package/lib/commonjs/hooks/useAbstractLayer.js.map +1 -1
- package/lib/commonjs/hooks/useAbstractSource.js +1 -1
- package/lib/commonjs/hooks/useAbstractSource.js.map +1 -1
- package/lib/commonjs/hooks/useNativeBridge.js +2 -2
- package/lib/commonjs/hooks/useNativeBridge.js.map +1 -1
- package/lib/commonjs/hooks/useOnce.js +2 -2
- package/lib/commonjs/hooks/useOnce.js.map +1 -1
- package/lib/commonjs/index.js +3 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/location/{locationManager.js → LocationManager.js} +10 -10
- package/lib/commonjs/modules/location/LocationManager.js.map +1 -0
- package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js +2 -2
- package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -1
- package/lib/commonjs/modules/offline/{offlineManager.js → OfflineManager.js} +26 -28
- package/lib/commonjs/modules/offline/OfflineManager.js.map +1 -0
- package/lib/commonjs/modules/offline/OfflinePack.js +2 -2
- package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -1
- package/lib/commonjs/modules/snapshot/{snapshotManager.js → SnapshotManager.js} +12 -14
- package/lib/commonjs/modules/snapshot/SnapshotManager.js.map +1 -0
- package/lib/commonjs/modules/snapshot/SnapshotOptions.js +3 -4
- package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -1
- package/lib/commonjs/utils/BridgeValue.js +2 -2
- package/lib/commonjs/utils/BridgeValue.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +2 -2
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/StyleValue.js +2 -3
- package/lib/commonjs/utils/StyleValue.js.map +1 -1
- package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js +2 -2
- package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js.map +1 -1
- package/lib/commonjs/utils/animated/Animated.js +29 -31
- package/lib/commonjs/utils/animated/Animated.js.map +1 -1
- package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js +4 -5
- package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js.map +1 -1
- package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js +2 -2
- package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -1
- package/lib/commonjs/utils/animated/AnimatedPoint.js +1 -2
- package/lib/commonjs/utils/animated/AnimatedPoint.js.map +1 -1
- package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js +4 -4
- package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -1
- package/lib/commonjs/utils/animated/AnimatedShape.js +2 -2
- package/lib/commonjs/utils/animated/AnimatedShape.js.map +1 -1
- package/lib/module/MapLibreRN.js +40 -28
- package/lib/module/MapLibreRN.js.map +1 -1
- package/lib/module/components/Annotation.js +5 -6
- package/lib/module/components/Annotation.js.map +1 -1
- package/lib/module/components/BackgroundLayer.js +4 -6
- package/lib/module/components/BackgroundLayer.js.map +1 -1
- package/lib/module/components/Callout.js +2 -3
- package/lib/module/components/Callout.js.map +1 -1
- package/lib/module/components/Camera.js +1 -2
- package/lib/module/components/Camera.js.map +1 -1
- package/lib/module/components/CircleLayer.js +4 -6
- package/lib/module/components/CircleLayer.js.map +1 -1
- package/lib/module/components/FillExtrusionLayer.js +4 -6
- package/lib/module/components/FillExtrusionLayer.js.map +1 -1
- package/lib/module/components/FillLayer.js +4 -6
- package/lib/module/components/FillLayer.js.map +1 -1
- package/lib/module/components/HeadingIndicator.js +2 -3
- package/lib/module/components/HeadingIndicator.js.map +1 -1
- package/lib/module/components/HeatmapLayer.js +4 -6
- package/lib/module/components/HeatmapLayer.js.map +1 -1
- package/lib/module/components/ImageSource.js +2 -3
- package/lib/module/components/ImageSource.js.map +1 -1
- package/lib/module/components/Images.js +2 -3
- package/lib/module/components/Images.js.map +1 -1
- package/lib/module/components/Light.js +2 -4
- package/lib/module/components/Light.js.map +1 -1
- package/lib/module/components/LineLayer.js +4 -6
- package/lib/module/components/LineLayer.js.map +1 -1
- package/lib/module/components/MapView.js +34 -35
- package/lib/module/components/MapView.js.map +1 -1
- package/lib/module/components/MarkerView.js +2 -3
- package/lib/module/components/MarkerView.js.map +1 -1
- package/lib/module/components/NativeUserLocation.js +1 -2
- package/lib/module/components/NativeUserLocation.js.map +1 -1
- package/lib/module/components/PointAnnotation.js +2 -3
- package/lib/module/components/PointAnnotation.js.map +1 -1
- package/lib/module/components/RasterLayer.js +4 -6
- package/lib/module/components/RasterLayer.js.map +1 -1
- package/lib/module/components/RasterSource.js +5 -7
- package/lib/module/components/RasterSource.js.map +1 -1
- package/lib/module/components/ShapeSource.js +4 -5
- package/lib/module/components/ShapeSource.js.map +1 -1
- package/lib/module/components/SymbolLayer.js +4 -5
- package/lib/module/components/SymbolLayer.js.map +1 -1
- package/lib/module/components/UserLocation.js +13 -14
- package/lib/module/components/UserLocation.js.map +1 -1
- package/lib/module/components/VectorSource.js +5 -6
- package/lib/module/components/VectorSource.js.map +1 -1
- package/lib/module/hooks/useAbstractLayer.js +1 -1
- package/lib/module/hooks/useAbstractLayer.js.map +1 -1
- package/lib/module/hooks/useAbstractSource.js +1 -1
- package/lib/module/hooks/useAbstractSource.js.map +1 -1
- package/lib/module/hooks/useNativeBridge.js +1 -2
- package/lib/module/hooks/useNativeBridge.js.map +1 -1
- package/lib/module/hooks/useNativeRef.js.map +1 -1
- package/lib/module/hooks/useOnce.js +1 -2
- package/lib/module/hooks/useOnce.js.map +1 -1
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/location/{locationManager.js → LocationManager.js} +10 -9
- package/lib/module/modules/location/LocationManager.js.map +1 -0
- package/lib/module/modules/offline/OfflineCreatePackOptions.js +1 -2
- package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -1
- package/lib/module/modules/offline/{offlineManager.js → OfflineManager.js} +22 -22
- package/lib/module/modules/offline/OfflineManager.js.map +1 -0
- package/lib/module/modules/offline/OfflinePack.js +1 -2
- package/lib/module/modules/offline/OfflinePack.js.map +1 -1
- package/lib/module/modules/snapshot/{snapshotManager.js → SnapshotManager.js} +10 -10
- package/lib/module/modules/snapshot/{snapshotManager.js.map → SnapshotManager.js.map} +1 -1
- package/lib/module/modules/snapshot/SnapshotOptions.js +2 -3
- package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -1
- package/lib/module/utils/BridgeValue.js +1 -1
- package/lib/module/utils/BridgeValue.js.map +1 -1
- package/lib/module/utils/Logger.js +1 -2
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/StyleValue.js +1 -1
- package/lib/module/utils/StyleValue.js.map +1 -1
- package/lib/module/utils/animated/AbstractAnimatedCoordinates.js +1 -2
- package/lib/module/utils/animated/AbstractAnimatedCoordinates.js.map +1 -1
- package/lib/module/utils/animated/Animated.js +14 -15
- package/lib/module/utils/animated/Animated.js.map +1 -1
- package/lib/module/utils/animated/AnimatedCoordinatesArray.js +2 -3
- package/lib/module/utils/animated/AnimatedCoordinatesArray.js.map +1 -1
- package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js +1 -1
- package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -1
- package/lib/module/utils/animated/AnimatedPoint.js +0 -1
- package/lib/module/utils/animated/AnimatedPoint.js.map +1 -1
- package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js +2 -2
- package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -1
- package/lib/module/utils/animated/AnimatedShape.js +1 -2
- package/lib/module/utils/animated/AnimatedShape.js.map +1 -1
- package/lib/typescript/commonjs/src/MLRNModule.d.ts +1 -1
- package/lib/typescript/commonjs/src/MLRNModule.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/MapLibreRN.d.ts +41 -29
- package/lib/typescript/commonjs/src/MapLibreRN.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Annotation.d.ts +4 -4
- package/lib/typescript/commonjs/src/components/Annotation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts +1 -3
- package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Callout.d.ts +3 -4
- package/lib/typescript/commonjs/src/components/Callout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Camera.d.ts +4 -4
- package/lib/typescript/commonjs/src/components/Camera.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/CircleLayer.d.ts +1 -3
- package/lib/typescript/commonjs/src/components/CircleLayer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts +1 -3
- package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/FillLayer.d.ts +1 -3
- package/lib/typescript/commonjs/src/components/FillLayer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts +2 -3
- package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts +1 -3
- package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/ImageSource.d.ts +3 -4
- package/lib/typescript/commonjs/src/components/ImageSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Images.d.ts +4 -4
- package/lib/typescript/commonjs/src/components/Images.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Light.d.ts +2 -3
- package/lib/typescript/commonjs/src/components/Light.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/LineLayer.d.ts +1 -3
- package/lib/typescript/commonjs/src/components/LineLayer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/MapView.d.ts +4 -4
- package/lib/typescript/commonjs/src/components/MapView.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/MarkerView.d.ts +3 -3
- package/lib/typescript/commonjs/src/components/MarkerView.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/NativeUserLocation.d.ts +2 -3
- package/lib/typescript/commonjs/src/components/NativeUserLocation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/PointAnnotation.d.ts +4 -3
- package/lib/typescript/commonjs/src/components/PointAnnotation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/RasterLayer.d.ts +1 -3
- package/lib/typescript/commonjs/src/components/RasterLayer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/RasterSource.d.ts +4 -4
- package/lib/typescript/commonjs/src/components/RasterSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/ShapeSource.d.ts +4 -4
- package/lib/typescript/commonjs/src/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts +1 -2
- package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/UserLocation.d.ts +6 -6
- package/lib/typescript/commonjs/src/components/UserLocation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/VectorSource.d.ts +4 -3
- package/lib/typescript/commonjs/src/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts +3 -2
- package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useAbstractSource.d.ts +4 -3
- package/lib/typescript/commonjs/src/hooks/useAbstractSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts +5 -5
- package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts +2 -2
- package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useOnce.d.ts +1 -2
- package/lib/typescript/commonjs/src/hooks/useOnce.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/offline/OfflineCreatePackOptions.d.ts +1 -2
- package/lib/typescript/commonjs/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/offline/{offlineManager.d.ts → OfflineManager.d.ts} +17 -17
- package/lib/typescript/commonjs/src/modules/offline/OfflineManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts +2 -3
- package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts.map +1 -1
- package/lib/typescript/{module/src/modules/snapshot/snapshotManager.d.ts → commonjs/src/modules/snapshot/SnapshotManager.d.ts} +9 -9
- package/lib/typescript/commonjs/src/modules/snapshot/SnapshotManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts +1 -1
- package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/Logger.d.ts +2 -2
- package/lib/typescript/commonjs/src/utils/Logger.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/StyleValue.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
- package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts +19 -19
- package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts +3 -3
- package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +2 -2
- package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts +5 -5
- package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts.map +1 -1
- package/lib/typescript/module/src/MLRNModule.d.ts +1 -1
- package/lib/typescript/module/src/MLRNModule.d.ts.map +1 -1
- package/lib/typescript/module/src/MapLibreRN.d.ts +41 -29
- package/lib/typescript/module/src/MapLibreRN.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Annotation.d.ts +4 -4
- package/lib/typescript/module/src/components/Annotation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/BackgroundLayer.d.ts +1 -3
- package/lib/typescript/module/src/components/BackgroundLayer.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Callout.d.ts +3 -4
- package/lib/typescript/module/src/components/Callout.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Camera.d.ts +4 -4
- package/lib/typescript/module/src/components/Camera.d.ts.map +1 -1
- package/lib/typescript/module/src/components/CircleLayer.d.ts +1 -3
- package/lib/typescript/module/src/components/CircleLayer.d.ts.map +1 -1
- package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts +1 -3
- package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts.map +1 -1
- package/lib/typescript/module/src/components/FillLayer.d.ts +1 -3
- package/lib/typescript/module/src/components/FillLayer.d.ts.map +1 -1
- package/lib/typescript/module/src/components/HeadingIndicator.d.ts +2 -3
- package/lib/typescript/module/src/components/HeadingIndicator.d.ts.map +1 -1
- package/lib/typescript/module/src/components/HeatmapLayer.d.ts +1 -3
- package/lib/typescript/module/src/components/HeatmapLayer.d.ts.map +1 -1
- package/lib/typescript/module/src/components/ImageSource.d.ts +3 -4
- package/lib/typescript/module/src/components/ImageSource.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Images.d.ts +4 -4
- package/lib/typescript/module/src/components/Images.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Light.d.ts +2 -3
- package/lib/typescript/module/src/components/Light.d.ts.map +1 -1
- package/lib/typescript/module/src/components/LineLayer.d.ts +1 -3
- package/lib/typescript/module/src/components/LineLayer.d.ts.map +1 -1
- package/lib/typescript/module/src/components/MapView.d.ts +4 -4
- package/lib/typescript/module/src/components/MapView.d.ts.map +1 -1
- package/lib/typescript/module/src/components/MarkerView.d.ts +3 -3
- package/lib/typescript/module/src/components/MarkerView.d.ts.map +1 -1
- package/lib/typescript/module/src/components/NativeUserLocation.d.ts +2 -3
- package/lib/typescript/module/src/components/NativeUserLocation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/PointAnnotation.d.ts +4 -3
- package/lib/typescript/module/src/components/PointAnnotation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/RasterLayer.d.ts +1 -3
- package/lib/typescript/module/src/components/RasterLayer.d.ts.map +1 -1
- package/lib/typescript/module/src/components/RasterSource.d.ts +4 -4
- package/lib/typescript/module/src/components/RasterSource.d.ts.map +1 -1
- package/lib/typescript/module/src/components/ShapeSource.d.ts +4 -4
- package/lib/typescript/module/src/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/module/src/components/SymbolLayer.d.ts +1 -2
- package/lib/typescript/module/src/components/SymbolLayer.d.ts.map +1 -1
- package/lib/typescript/module/src/components/UserLocation.d.ts +6 -6
- package/lib/typescript/module/src/components/UserLocation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/VectorSource.d.ts +4 -3
- package/lib/typescript/module/src/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts +3 -2
- package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useAbstractSource.d.ts +4 -3
- package/lib/typescript/module/src/hooks/useAbstractSource.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useNativeBridge.d.ts +5 -5
- package/lib/typescript/module/src/hooks/useNativeBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useNativeRef.d.ts +2 -2
- package/lib/typescript/module/src/hooks/useNativeRef.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useOnce.d.ts +1 -2
- package/lib/typescript/module/src/hooks/useOnce.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +3 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/location/LocationManager.d.ts +33 -0
- package/lib/typescript/module/src/modules/location/LocationManager.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/offline/OfflineCreatePackOptions.d.ts +1 -2
- package/lib/typescript/module/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/offline/{offlineManager.d.ts → OfflineManager.d.ts} +17 -17
- package/lib/typescript/module/src/modules/offline/OfflineManager.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts +2 -3
- package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts.map +1 -1
- package/lib/typescript/{commonjs/src/modules/snapshot/snapshotManager.d.ts → module/src/modules/snapshot/SnapshotManager.d.ts} +9 -9
- package/lib/typescript/module/src/modules/snapshot/SnapshotManager.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts +1 -1
- package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/BridgeValue.d.ts +1 -1
- package/lib/typescript/module/src/utils/BridgeValue.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/Logger.d.ts +2 -2
- package/lib/typescript/module/src/utils/Logger.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/StyleValue.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
- package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/Animated.d.ts +19 -19
- package/lib/typescript/module/src/utils/animated/Animated.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts +3 -3
- package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +1 -1
- package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts +1 -1
- package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +2 -2
- package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts +5 -5
- package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts.map +1 -1
- package/maplibre-react-native.podspec +1 -1
- package/package.json +7 -5
- package/src/MLRNModule.ts +1 -1
- package/src/MapLibreRN.ts +46 -30
- package/src/components/Annotation.tsx +9 -11
- package/src/components/BackgroundLayer.tsx +5 -7
- package/src/components/Callout.tsx +8 -10
- package/src/components/Camera.tsx +3 -5
- package/src/components/CircleLayer.tsx +5 -7
- package/src/components/FillExtrusionLayer.tsx +5 -7
- package/src/components/FillLayer.tsx +5 -7
- package/src/components/HeadingIndicator.tsx +2 -6
- package/src/components/HeatmapLayer.tsx +5 -7
- package/src/components/ImageSource.tsx +4 -6
- package/src/components/Images.tsx +6 -8
- package/src/components/Light.tsx +3 -5
- package/src/components/LineLayer.tsx +5 -7
- package/src/components/MapView.tsx +36 -37
- package/src/components/MarkerView.tsx +4 -6
- package/src/components/NativeUserLocation.tsx +1 -4
- package/src/components/PointAnnotation.tsx +7 -6
- package/src/components/RasterLayer.tsx +5 -7
- package/src/components/RasterSource.tsx +7 -9
- package/src/components/ShapeSource.tsx +6 -8
- package/src/components/SymbolLayer.tsx +5 -6
- package/src/components/UserLocation.tsx +18 -19
- package/src/components/VectorSource.tsx +7 -9
- package/src/hooks/useAbstractLayer.ts +5 -5
- package/src/hooks/useAbstractSource.ts +6 -6
- package/src/hooks/useNativeBridge.ts +9 -6
- package/src/hooks/useNativeRef.ts +2 -2
- package/src/hooks/useOnce.ts +3 -3
- package/src/index.ts +3 -0
- package/src/modules/location/{locationManager.ts → LocationManager.ts} +16 -15
- package/src/modules/offline/OfflineCreatePackOptions.ts +1 -3
- package/src/modules/offline/{offlineManager.ts → OfflineManager.ts} +22 -21
- package/src/modules/offline/OfflinePack.ts +2 -4
- package/src/modules/snapshot/{snapshotManager.ts → SnapshotManager.ts} +9 -9
- package/src/modules/snapshot/SnapshotOptions.ts +2 -4
- package/src/types/MapLibreRNStyles.ts +1 -1
- package/src/utils/BridgeValue.ts +1 -1
- package/src/utils/Logger.ts +1 -3
- package/src/utils/StyleValue.ts +2 -1
- package/src/utils/animated/AbstractAnimatedCoordinates.ts +3 -3
- package/src/utils/animated/Animated.ts +23 -21
- package/src/utils/animated/AnimatedCoordinatesArray.ts +3 -4
- package/src/utils/animated/AnimatedExtractCoordinateFromArray.ts +1 -1
- package/src/utils/animated/AnimatedPoint.ts +0 -2
- package/src/utils/animated/AnimatedRouteCoordinatesArray.ts +3 -2
- package/src/utils/animated/AnimatedShape.ts +4 -6
- package/lib/commonjs/modules/location/locationManager.js.map +0 -1
- package/lib/commonjs/modules/offline/offlineManager.js.map +0 -1
- package/lib/commonjs/modules/snapshot/snapshotManager.js.map +0 -1
- package/lib/module/modules/location/locationManager.js.map +0 -1
- package/lib/module/modules/offline/offlineManager.js.map +0 -1
- package/lib/typescript/commonjs/src/modules/location/locationManager.d.ts +0 -64
- package/lib/typescript/commonjs/src/modules/location/locationManager.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/offline/offlineManager.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/snapshot/snapshotManager.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/location/locationManager.d.ts +0 -64
- package/lib/typescript/module/src/modules/location/locationManager.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/offline/offlineManager.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/snapshot/snapshotManager.d.ts.map +0 -1
package/src/MapLibreRN.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./MLRNModule";
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
Camera,
|
|
4
4
|
UserTrackingMode,
|
|
5
5
|
type CameraPadding,
|
|
6
6
|
type CameraAnimationMode,
|
|
@@ -8,53 +8,69 @@ export {
|
|
|
8
8
|
type CameraRef,
|
|
9
9
|
} from "./components/Camera";
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
MapView,
|
|
12
12
|
type MapViewRef,
|
|
13
13
|
type RegionPayload,
|
|
14
14
|
} from "./components/MapView";
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
15
|
+
export { Light } from "./components/Light";
|
|
16
|
+
export { PointAnnotation } from "./components/PointAnnotation";
|
|
17
17
|
export type { PointAnnotationRef } from "./components/PointAnnotation";
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
18
|
+
export { Annotation } from "./components/Annotation";
|
|
19
|
+
export { Callout } from "./components/Callout";
|
|
20
20
|
export { requestAndroidLocationPermissions } from "./requestAndroidLocationPermissions";
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
UserLocation,
|
|
23
23
|
UserLocationRenderMode,
|
|
24
24
|
} from "./components/UserLocation";
|
|
25
25
|
export type { UserLocationRef } from "./components/UserLocation";
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
26
|
+
export { VectorSource } from "./components/VectorSource";
|
|
27
|
+
export { ShapeSource } from "./components/ShapeSource";
|
|
28
28
|
export type { ShapeSourceRef } from "./components/ShapeSource";
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
29
|
+
export { RasterSource } from "./components/RasterSource";
|
|
30
|
+
export { ImageSource } from "./components/ImageSource";
|
|
31
|
+
export { Images } from "./components/Images";
|
|
32
|
+
export { FillLayer } from "./components/FillLayer";
|
|
33
|
+
export { FillExtrusionLayer } from "./components/FillExtrusionLayer";
|
|
34
|
+
export { HeatmapLayer } from "./components/HeatmapLayer";
|
|
35
|
+
export { LineLayer } from "./components/LineLayer";
|
|
36
|
+
export { CircleLayer } from "./components/CircleLayer";
|
|
37
|
+
export { SymbolLayer } from "./components/SymbolLayer";
|
|
38
|
+
export { RasterLayer } from "./components/RasterLayer";
|
|
39
|
+
export { BackgroundLayer } from "./components/BackgroundLayer";
|
|
40
|
+
export { MarkerView } from "./components/MarkerView";
|
|
41
41
|
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
LocationManager,
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Use LocationManager instead
|
|
46
|
+
*/
|
|
47
|
+
LocationManager as locationManager,
|
|
44
48
|
type Location,
|
|
45
|
-
} from "./modules/location/
|
|
46
|
-
export {
|
|
47
|
-
|
|
49
|
+
} from "./modules/location/LocationManager";
|
|
50
|
+
export {
|
|
51
|
+
OfflineManager,
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Use OfflineManager instead
|
|
54
|
+
*/
|
|
55
|
+
OfflineManager as offlineManager,
|
|
56
|
+
} from "./modules/offline/OfflineManager";
|
|
57
|
+
export type { OfflinePackError } from "./modules/offline/OfflineManager";
|
|
48
58
|
export type { OfflinePackStatus } from "./modules/offline/OfflinePack";
|
|
49
|
-
export {
|
|
50
|
-
export {
|
|
51
|
-
export {
|
|
59
|
+
export { OfflinePack } from "./modules/offline/OfflinePack";
|
|
60
|
+
export { OfflineCreatePackOptions } from "./modules/offline/OfflineCreatePackOptions";
|
|
61
|
+
export {
|
|
62
|
+
SnapshotManager,
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated Use SnapshotManager instead
|
|
65
|
+
*/
|
|
66
|
+
SnapshotManager as snapshotManager,
|
|
67
|
+
} from "./modules/snapshot/SnapshotManager";
|
|
52
68
|
export type { SnapshotInputOptions } from "./modules/snapshot/SnapshotOptions";
|
|
53
69
|
|
|
54
70
|
export type { MapLibreRNEvent } from "./types/MapLibreRNEvent";
|
|
55
71
|
|
|
56
|
-
export {
|
|
57
|
-
export {
|
|
72
|
+
export { Animated } from "./utils/animated/Animated";
|
|
73
|
+
export { Logger, type LogLevel } from "./utils/Logger";
|
|
58
74
|
export type {
|
|
59
75
|
FillLayerStyle,
|
|
60
76
|
LineLayerStyle,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
forwardRef,
|
|
3
|
-
type
|
|
3
|
+
type ReactNode,
|
|
4
4
|
useCallback,
|
|
5
5
|
useEffect,
|
|
6
6
|
useImperativeHandle,
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
} from "react";
|
|
9
9
|
import { Animated as RNAnimated, Easing } from "react-native";
|
|
10
10
|
|
|
11
|
-
import SymbolLayer from "./SymbolLayer";
|
|
11
|
+
import { SymbolLayer } from "./SymbolLayer";
|
|
12
12
|
import { type SymbolLayerStyle } from "../types/MapLibreRNStyles";
|
|
13
13
|
import { type OnPressEvent } from "../types/OnPressEvent";
|
|
14
14
|
import { AnimatedShapeSource } from "../utils/animated/Animated";
|
|
15
|
-
import
|
|
15
|
+
import { AnimatedPoint } from "../utils/animated/AnimatedPoint";
|
|
16
16
|
|
|
17
17
|
interface AnnotationProps {
|
|
18
18
|
id: string;
|
|
@@ -21,12 +21,12 @@ interface AnnotationProps {
|
|
|
21
21
|
animationEasingFunction?(x: number): number;
|
|
22
22
|
coordinates?: number[];
|
|
23
23
|
onPress?(event: OnPressEvent): void;
|
|
24
|
-
children?:
|
|
24
|
+
children?: ReactNode;
|
|
25
25
|
style?: object;
|
|
26
26
|
icon?: string | number | object;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
type Shape =
|
|
29
|
+
type Shape = AnimatedPoint | GeoJSON.Point;
|
|
30
30
|
|
|
31
31
|
function getShapeFromProps(props: Partial<AnnotationProps> = {}): Shape {
|
|
32
32
|
const lng = props.coordinates?.[0] || 0;
|
|
@@ -34,14 +34,14 @@ function getShapeFromProps(props: Partial<AnnotationProps> = {}): Shape {
|
|
|
34
34
|
const point: GeoJSON.Point = { type: "Point", coordinates: [lng, lat] };
|
|
35
35
|
|
|
36
36
|
if (props.animated) {
|
|
37
|
-
return new
|
|
37
|
+
return new AnimatedPoint(point);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
return point;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
function isShapeAnimated(shape: Shape): shape is
|
|
44
|
-
return shape instanceof
|
|
43
|
+
function isShapeAnimated(shape: Shape): shape is AnimatedPoint {
|
|
44
|
+
return shape instanceof AnimatedPoint;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
interface AnnotationRef {
|
|
@@ -49,7 +49,7 @@ interface AnnotationRef {
|
|
|
49
49
|
symbolStyle: SymbolLayerStyle | undefined;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
const Annotation = forwardRef<AnnotationRef, AnnotationProps>(
|
|
52
|
+
export const Annotation = forwardRef<AnnotationRef, AnnotationProps>(
|
|
53
53
|
(
|
|
54
54
|
{
|
|
55
55
|
animated = false,
|
|
@@ -160,5 +160,3 @@ const Annotation = forwardRef<AnnotationRef, AnnotationProps>(
|
|
|
160
160
|
);
|
|
161
161
|
|
|
162
162
|
Annotation.displayName = "Annotation";
|
|
163
|
-
|
|
164
|
-
export default Annotation;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { NativeModules, requireNativeComponent } from "react-native";
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import {
|
|
4
|
+
useAbstractLayer,
|
|
5
5
|
type BaseLayerProps,
|
|
6
6
|
type NativeBaseProps,
|
|
7
7
|
} from "../hooks/useAbstractLayer";
|
|
8
8
|
import { type BaseProps } from "../types/BaseProps";
|
|
9
9
|
import { type BackgroundLayerStyle } from "../types/MapLibreRNStyles";
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const MLRNModule = NativeModules.MLRNModule;
|
|
12
12
|
|
|
13
13
|
export const NATIVE_MODULE_NAME = "MLRNBackgroundLayer";
|
|
14
14
|
|
|
@@ -26,8 +26,8 @@ interface NativeProps
|
|
|
26
26
|
const MLRNBackgroundLayer =
|
|
27
27
|
requireNativeComponent<BackgroundLayerProps>(NATIVE_MODULE_NAME);
|
|
28
28
|
|
|
29
|
-
const BackgroundLayer
|
|
30
|
-
sourceID =
|
|
29
|
+
export const BackgroundLayer = ({
|
|
30
|
+
sourceID = MLRNModule.StyleSource.DefaultSourceID,
|
|
31
31
|
...props
|
|
32
32
|
}: BackgroundLayerProps) => {
|
|
33
33
|
const { baseProps, setNativeLayer } = useAbstractLayer<
|
|
@@ -46,5 +46,3 @@ const BackgroundLayer: React.FC<BackgroundLayerProps> = ({
|
|
|
46
46
|
/>
|
|
47
47
|
);
|
|
48
48
|
};
|
|
49
|
-
|
|
50
|
-
export default BackgroundLayer;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Children
|
|
1
|
+
import { Children } from "react";
|
|
2
2
|
import {
|
|
3
|
-
View,
|
|
4
|
-
Text,
|
|
5
3
|
Animated,
|
|
6
4
|
requireNativeComponent,
|
|
5
|
+
type StyleProp,
|
|
7
6
|
StyleSheet,
|
|
8
|
-
|
|
7
|
+
Text,
|
|
8
|
+
View,
|
|
9
9
|
type ViewProps,
|
|
10
|
-
type
|
|
10
|
+
type ViewStyle,
|
|
11
11
|
} from "react-native";
|
|
12
12
|
|
|
13
13
|
export const NATIVE_MODULE_NAME = "MLRNCallout";
|
|
@@ -82,7 +82,7 @@ interface NativeProps extends Omit<CalloutProps, "style"> {
|
|
|
82
82
|
/**
|
|
83
83
|
* Callout that displays information about a selected annotation near the annotation.
|
|
84
84
|
*/
|
|
85
|
-
const Callout = (props: CalloutProps)
|
|
85
|
+
export const Callout = (props: CalloutProps) => {
|
|
86
86
|
const {
|
|
87
87
|
title,
|
|
88
88
|
style,
|
|
@@ -104,7 +104,7 @@ const Callout = (props: CalloutProps): ReactElement => {
|
|
|
104
104
|
|
|
105
105
|
const _hasChildren = Children.count(children) > 0;
|
|
106
106
|
|
|
107
|
-
const _renderDefaultCallout = ()
|
|
107
|
+
const _renderDefaultCallout = () => {
|
|
108
108
|
return (
|
|
109
109
|
<Animated.View testID="container" style={[styles.container, style]}>
|
|
110
110
|
<View testID="wrapper" style={[styles.content, contentStyle]}>
|
|
@@ -117,7 +117,7 @@ const Callout = (props: CalloutProps): ReactElement => {
|
|
|
117
117
|
);
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
-
const _renderCustomCallout = ()
|
|
120
|
+
const _renderCustomCallout = () => {
|
|
121
121
|
return (
|
|
122
122
|
<Animated.View testID="container" {...props} style={style}>
|
|
123
123
|
{children}
|
|
@@ -137,5 +137,3 @@ const Callout = (props: CalloutProps): ReactElement => {
|
|
|
137
137
|
};
|
|
138
138
|
|
|
139
139
|
const MLRNCallout = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
140
|
-
|
|
141
|
-
export default Callout;
|
|
@@ -6,7 +6,7 @@ import { CameraModes } from "../MLRNModule";
|
|
|
6
6
|
import { useNativeRef } from "../hooks/useNativeRef";
|
|
7
7
|
import { type BaseProps } from "../types/BaseProps";
|
|
8
8
|
import { CameraMode } from "../types/CameraMode";
|
|
9
|
-
import type
|
|
9
|
+
import { type MapLibreRNEvent } from "../types/MapLibreRNEvent";
|
|
10
10
|
import { makeNativeBounds } from "../utils/makeNativeBounds";
|
|
11
11
|
|
|
12
12
|
export const NATIVE_MODULE_NAME = "MLRNCamera";
|
|
@@ -211,7 +211,7 @@ export interface CameraProps extends BaseProps, CameraStop {
|
|
|
211
211
|
followUserLocation?: boolean;
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
|
-
* The mode used to track the user location on the map. One of; "normal", "compass", "course". Each mode string is also available as a member on the `
|
|
214
|
+
* The mode used to track the user location on the map. One of; "normal", "compass", "course". Each mode string is also available as a member on the `UserTrackingMode` object. `Follow` (normal), `FollowWithHeading` (compass), `FollowWithCourse` (course). NOTE: `followUserLocation` must be set to `true` for any of the modes to take effect. [Example](/packages/examples/src/examples/Camera/SetUserTrackingMode.js)
|
|
215
215
|
*/
|
|
216
216
|
followUserMode?: UserTrackingMode;
|
|
217
217
|
|
|
@@ -244,7 +244,7 @@ export interface NativeCameraProps
|
|
|
244
244
|
defaultStop?: NativeCameraStop;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
const Camera = memo(
|
|
247
|
+
export const Camera = memo(
|
|
248
248
|
forwardRef<CameraRef, CameraProps>(
|
|
249
249
|
(
|
|
250
250
|
{
|
|
@@ -488,5 +488,3 @@ const Camera = memo(
|
|
|
488
488
|
|
|
489
489
|
const MLRNCamera =
|
|
490
490
|
requireNativeComponent<NativeCameraProps>(NATIVE_MODULE_NAME);
|
|
491
|
-
|
|
492
|
-
export default Camera;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { NativeModules, requireNativeComponent } from "react-native";
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import {
|
|
4
|
+
useAbstractLayer,
|
|
5
5
|
type BaseLayerProps,
|
|
6
6
|
type NativeBaseProps,
|
|
7
7
|
} from "../hooks/useAbstractLayer";
|
|
8
8
|
import { type BaseProps } from "../types/BaseProps";
|
|
9
9
|
import { type CircleLayerStyle } from "../types/MapLibreRNStyles";
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const MLRNModule = NativeModules.MLRNModule;
|
|
12
12
|
|
|
13
13
|
export const NATIVE_MODULE_NAME = "MLRNCircleLayer";
|
|
14
14
|
|
|
@@ -28,8 +28,8 @@ const MLRNCircleLayer = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
|
28
28
|
/**
|
|
29
29
|
* CircleLayer is a style layer that renders one or more filled circles on the map.
|
|
30
30
|
*/
|
|
31
|
-
const CircleLayer
|
|
32
|
-
sourceID =
|
|
31
|
+
export const CircleLayer = ({
|
|
32
|
+
sourceID = MLRNModule.StyleSource.DefaultSourceID,
|
|
33
33
|
...props
|
|
34
34
|
}: CircleLayerProps) => {
|
|
35
35
|
const { baseProps, setNativeLayer } = useAbstractLayer<
|
|
@@ -48,5 +48,3 @@ const CircleLayer: React.FC<CircleLayerProps> = ({
|
|
|
48
48
|
/>
|
|
49
49
|
);
|
|
50
50
|
};
|
|
51
|
-
|
|
52
|
-
export default CircleLayer;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { NativeModules, requireNativeComponent } from "react-native";
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import {
|
|
4
|
+
useAbstractLayer,
|
|
5
5
|
type BaseLayerProps,
|
|
6
6
|
type NativeBaseProps,
|
|
7
7
|
} from "../hooks/useAbstractLayer";
|
|
8
8
|
import { type BaseProps } from "../types/BaseProps";
|
|
9
9
|
import { type FillExtrusionLayerStyle } from "../types/MapLibreRNStyles";
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const MLRNModule = NativeModules.MLRNModule;
|
|
12
12
|
|
|
13
13
|
export const NATIVE_MODULE_NAME = "MLRNFillExtrusionLayer";
|
|
14
14
|
|
|
@@ -29,8 +29,8 @@ const MLRNFillExtrusionLayer =
|
|
|
29
29
|
/**
|
|
30
30
|
* FillExtrusionLayer is a style layer that renders one or more 3D extruded polygons on the map.
|
|
31
31
|
*/
|
|
32
|
-
const FillExtrusionLayer
|
|
33
|
-
sourceID =
|
|
32
|
+
export const FillExtrusionLayer = ({
|
|
33
|
+
sourceID = MLRNModule.StyleSource.DefaultSourceID,
|
|
34
34
|
...props
|
|
35
35
|
}: FillExtrusionLayerProps) => {
|
|
36
36
|
const { baseProps, setNativeLayer } = useAbstractLayer<
|
|
@@ -43,5 +43,3 @@ const FillExtrusionLayer: React.FC<FillExtrusionLayerProps> = ({
|
|
|
43
43
|
|
|
44
44
|
return <MLRNFillExtrusionLayer ref={setNativeLayer} {...baseProps} />;
|
|
45
45
|
};
|
|
46
|
-
|
|
47
|
-
export default FillExtrusionLayer;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { NativeModules, requireNativeComponent } from "react-native";
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import {
|
|
4
|
+
useAbstractLayer,
|
|
5
5
|
type BaseLayerProps,
|
|
6
6
|
type NativeBaseProps,
|
|
7
7
|
} from "../hooks/useAbstractLayer";
|
|
8
8
|
import { type BaseProps } from "../types/BaseProps";
|
|
9
9
|
import { type FillLayerStyle } from "../types/MapLibreRNStyles";
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const MLRNModule = NativeModules.MLRNModule;
|
|
12
12
|
|
|
13
13
|
export const NATIVE_MODULE_NAME = "MLRNFillLayer";
|
|
14
14
|
|
|
@@ -26,8 +26,8 @@ const MLRNFillLayer = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
|
26
26
|
/**
|
|
27
27
|
* FillLayer is a style layer that renders one or more filled (and optionally stroked) polygons on the map.
|
|
28
28
|
*/
|
|
29
|
-
const FillLayer
|
|
30
|
-
sourceID =
|
|
29
|
+
export const FillLayer = ({
|
|
30
|
+
sourceID = MLRNModule.StyleSource.DefaultSourceID,
|
|
31
31
|
...props
|
|
32
32
|
}: FillLayerProps) => {
|
|
33
33
|
const { baseProps, setNativeLayer } = useAbstractLayer<
|
|
@@ -40,5 +40,3 @@ const FillLayer: React.FC<FillLayerProps> = ({
|
|
|
40
40
|
|
|
41
41
|
return <MLRNFillLayer ref={setNativeLayer} {...baseProps} />;
|
|
42
42
|
};
|
|
43
|
-
|
|
44
|
-
export default FillLayer;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import SymbolLayer from "./SymbolLayer";
|
|
1
|
+
import { SymbolLayer } from "./SymbolLayer";
|
|
4
2
|
import headingIcon from "../assets/heading.png";
|
|
5
3
|
import { type BaseProps } from "../types/BaseProps";
|
|
6
4
|
|
|
@@ -15,7 +13,7 @@ interface HeadingIndicatorProps extends BaseProps {
|
|
|
15
13
|
heading?: number;
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
const HeadingIndicator = ({ heading }: HeadingIndicatorProps)
|
|
16
|
+
export const HeadingIndicator = ({ heading }: HeadingIndicatorProps) => (
|
|
19
17
|
<SymbolLayer
|
|
20
18
|
key="mapboxUserLocationHeadingIndicator"
|
|
21
19
|
id="mapboxUserLocationHeadingIndicator"
|
|
@@ -26,5 +24,3 @@ const HeadingIndicator = ({ heading }: HeadingIndicatorProps): ReactElement => (
|
|
|
26
24
|
}}
|
|
27
25
|
/>
|
|
28
26
|
);
|
|
29
|
-
|
|
30
|
-
export default HeadingIndicator;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { NativeModules, requireNativeComponent } from "react-native";
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import {
|
|
5
4
|
type BaseLayerProps,
|
|
6
5
|
type NativeBaseProps,
|
|
6
|
+
useAbstractLayer,
|
|
7
7
|
} from "../hooks/useAbstractLayer";
|
|
8
8
|
import { type BaseProps } from "../types/BaseProps";
|
|
9
9
|
import { type HeatmapLayerStyle } from "../types/MapLibreRNStyles";
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const MLRNModule = NativeModules.MLRNModule;
|
|
12
12
|
|
|
13
13
|
export const NATIVE_MODULE_NAME = "MLRNHeatmapLayer";
|
|
14
14
|
|
|
@@ -28,8 +28,8 @@ const MLRNHeatmapLayer =
|
|
|
28
28
|
/**
|
|
29
29
|
* HeatmapLayer is a style layer that renders one or more filled circles on the map.
|
|
30
30
|
*/
|
|
31
|
-
const HeatmapLayer
|
|
32
|
-
sourceID =
|
|
31
|
+
export const HeatmapLayer = ({
|
|
32
|
+
sourceID = MLRNModule.StyleSource.DefaultSourceID,
|
|
33
33
|
...props
|
|
34
34
|
}: HeatmapLayerProps) => {
|
|
35
35
|
const { baseProps, setNativeLayer } = useAbstractLayer<
|
|
@@ -42,5 +42,3 @@ const HeatmapLayer: React.FC<HeatmapLayerProps> = ({
|
|
|
42
42
|
|
|
43
43
|
return <MLRNHeatmapLayer ref={setNativeLayer} {...baseProps} />;
|
|
44
44
|
};
|
|
45
|
-
|
|
46
|
-
export default HeatmapLayer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
import { requireNativeComponent } from "react-native";
|
|
3
3
|
|
|
4
|
-
import useAbstractSource from "../hooks/useAbstractSource";
|
|
4
|
+
import { useAbstractSource } from "../hooks/useAbstractSource";
|
|
5
5
|
import { type BaseProps } from "../types/BaseProps";
|
|
6
6
|
import {
|
|
7
7
|
cloneReactChildrenWithProps,
|
|
@@ -31,7 +31,7 @@ export interface ImageSourceProps extends BaseProps {
|
|
|
31
31
|
GeoJSON.Position,
|
|
32
32
|
];
|
|
33
33
|
|
|
34
|
-
children?:
|
|
34
|
+
children?: ReactNode;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
type NativeProps = ImageSourceProps;
|
|
@@ -42,7 +42,7 @@ const MLRNImageSource = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
|
42
42
|
* ImageSource is a content source that is used for a georeferenced raster image to be shown on the map.
|
|
43
43
|
* The georeferenced image scales and rotates as the user zooms and rotates the map
|
|
44
44
|
*/
|
|
45
|
-
const ImageSource
|
|
45
|
+
export const ImageSource = (props: ImageSourceProps) => {
|
|
46
46
|
const { setNativeRef } = useAbstractSource<NativeProps>();
|
|
47
47
|
|
|
48
48
|
const _getURL = (): string | undefined => {
|
|
@@ -66,5 +66,3 @@ const ImageSource: React.FC<ImageSourceProps> = (props: ImageSourceProps) => {
|
|
|
66
66
|
</MLRNImageSource>
|
|
67
67
|
);
|
|
68
68
|
};
|
|
69
|
-
|
|
70
|
-
export default ImageSource;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
import {
|
|
3
|
-
requireNativeComponent,
|
|
4
3
|
Image,
|
|
5
|
-
type NativeSyntheticEvent,
|
|
6
4
|
type ImageSourcePropType,
|
|
7
5
|
type ImageURISource,
|
|
6
|
+
type NativeSyntheticEvent,
|
|
7
|
+
requireNativeComponent,
|
|
8
8
|
} from "react-native";
|
|
9
9
|
|
|
10
10
|
import { type BaseProps } from "../types/BaseProps";
|
|
@@ -55,19 +55,19 @@ interface ImagesProps extends BaseProps {
|
|
|
55
55
|
|
|
56
56
|
id?: string;
|
|
57
57
|
|
|
58
|
-
children?:
|
|
58
|
+
children?: ReactNode;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* Images defines the images used in Symbol etc layers
|
|
63
63
|
*/
|
|
64
|
-
const Images = ({
|
|
64
|
+
export const Images = ({
|
|
65
65
|
images,
|
|
66
66
|
nativeAssetImages,
|
|
67
67
|
onImageMissing,
|
|
68
68
|
id,
|
|
69
69
|
children,
|
|
70
|
-
}: ImagesProps)
|
|
70
|
+
}: ImagesProps) => {
|
|
71
71
|
const _getImages = (): {
|
|
72
72
|
images?: { [key: string]: ImageEntry };
|
|
73
73
|
nativeImages?: ImageEntry[];
|
|
@@ -123,5 +123,3 @@ const Images = ({
|
|
|
123
123
|
};
|
|
124
124
|
|
|
125
125
|
const MLRNImages = requireNativeComponent(NATIVE_MODULE_NAME);
|
|
126
|
-
|
|
127
|
-
export default Images;
|
package/src/components/Light.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { requireNativeComponent } from "react-native";
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import {
|
|
4
|
+
useAbstractLayer,
|
|
5
5
|
type BaseLayerProps,
|
|
6
6
|
} from "../hooks/useAbstractLayer";
|
|
7
7
|
import { type BaseProps } from "../types/BaseProps";
|
|
@@ -26,7 +26,7 @@ const MLRNLight = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
|
26
26
|
/**
|
|
27
27
|
* Light represents the light source for extruded geometries
|
|
28
28
|
*/
|
|
29
|
-
const Light
|
|
29
|
+
export const Light = (props: LightProps) => {
|
|
30
30
|
const { baseProps, setNativeLayer } = useAbstractLayer<
|
|
31
31
|
LightProps,
|
|
32
32
|
NativeProps
|
|
@@ -36,5 +36,3 @@ const Light: React.FC<LightProps> = (props: LightProps) => {
|
|
|
36
36
|
|
|
37
37
|
return <MLRNLight ref={setNativeLayer} testID="mlrnLight" {...baseProps} />;
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
export default Light;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { NativeModules, requireNativeComponent } from "react-native";
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import {
|
|
4
|
+
useAbstractLayer,
|
|
5
5
|
type BaseLayerProps,
|
|
6
6
|
type NativeBaseProps,
|
|
7
7
|
} from "../hooks/useAbstractLayer";
|
|
8
8
|
import { type BaseProps } from "../types/BaseProps";
|
|
9
9
|
import { type LineLayerStyle } from "../types/MapLibreRNStyles";
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const MLRNModule = NativeModules.MLRNModule;
|
|
12
12
|
|
|
13
13
|
export const NATIVE_MODULE_NAME = "MLRNLineLayer";
|
|
14
14
|
|
|
@@ -27,8 +27,8 @@ const MLRNLineLayer =
|
|
|
27
27
|
/**
|
|
28
28
|
* LineLayer is a style layer that renders one or more stroked polylines on the map.
|
|
29
29
|
*/
|
|
30
|
-
const LineLayer
|
|
31
|
-
sourceID =
|
|
30
|
+
export const LineLayer = ({
|
|
31
|
+
sourceID = MLRNModule.StyleSource.DefaultSourceID,
|
|
32
32
|
...props
|
|
33
33
|
}: LineLayerProps) => {
|
|
34
34
|
const { baseProps, setNativeLayer } = useAbstractLayer<
|
|
@@ -41,5 +41,3 @@ const LineLayer: React.FC<LineLayerProps> = ({
|
|
|
41
41
|
|
|
42
42
|
return <MLRNLineLayer ref={setNativeLayer} {...baseProps} />;
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
export default LineLayer;
|