@maplibre/maplibre-react-native 10.0.0-beta.12 → 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/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/package.json +1 -1
- 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/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
|
@@ -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;
|
|
@@ -22,17 +22,17 @@ import {
|
|
|
22
22
|
type NativeSyntheticEvent,
|
|
23
23
|
} from "react-native";
|
|
24
24
|
|
|
25
|
-
import useNativeBridge from "../hooks/useNativeBridge";
|
|
26
|
-
import useOnce from "../hooks/useOnce";
|
|
27
|
-
import { type Location } from "../modules/location/
|
|
25
|
+
import { useNativeBridge } from "../hooks/useNativeBridge";
|
|
26
|
+
import { useOnce } from "../hooks/useOnce";
|
|
27
|
+
import { type Location } from "../modules/location/LocationManager";
|
|
28
28
|
import { type BaseProps } from "../types/BaseProps";
|
|
29
29
|
import { type FilterExpression } from "../types/MapLibreRNStyles";
|
|
30
30
|
import { isFunction, isAndroid } from "../utils";
|
|
31
|
-
import Logger from "../utils/Logger";
|
|
31
|
+
import { Logger } from "../utils/Logger";
|
|
32
32
|
import { getFilter } from "../utils/filterUtils";
|
|
33
33
|
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
34
|
+
const MLRNModule = NativeModules.MLRNModule;
|
|
35
|
+
if (MLRNModule == null) {
|
|
36
36
|
console.error(
|
|
37
37
|
"Native module of @maplibre/maplibre-react-native library was not registered properly, please consult the docs: https://github.com/maplibre/maplibre-react-native",
|
|
38
38
|
);
|
|
@@ -67,7 +67,7 @@ interface MapViewProps extends BaseProps {
|
|
|
67
67
|
*/
|
|
68
68
|
style?: ViewProps["style"];
|
|
69
69
|
/**
|
|
70
|
-
* Style for map - either a URL or a Style JSON (https://maplibre.org/maplibre-style-spec/). Default: `
|
|
70
|
+
* Style for map - either a URL or a Style JSON (https://maplibre.org/maplibre-style-spec/). Default: `StyleURL.Default`
|
|
71
71
|
*/
|
|
72
72
|
mapStyle?: string | object;
|
|
73
73
|
/**
|
|
@@ -278,7 +278,7 @@ export interface MapViewRef {
|
|
|
278
278
|
/**
|
|
279
279
|
* MapView backed by MapLibre Native
|
|
280
280
|
*/
|
|
281
|
-
const MapView = memo(
|
|
281
|
+
export const MapView = memo(
|
|
282
282
|
forwardRef<MapViewRef, MapViewProps>(
|
|
283
283
|
(
|
|
284
284
|
{
|
|
@@ -433,46 +433,46 @@ const MapView = memo(
|
|
|
433
433
|
const events = [];
|
|
434
434
|
|
|
435
435
|
if (props.onRegionWillChange) {
|
|
436
|
-
events.push(
|
|
436
|
+
events.push(MLRNModule.EventTypes.RegionWillChange);
|
|
437
437
|
}
|
|
438
438
|
if (props.onRegionIsChanging) {
|
|
439
|
-
events.push(
|
|
439
|
+
events.push(MLRNModule.EventTypes.RegionIsChanging);
|
|
440
440
|
}
|
|
441
441
|
if (props.onRegionDidChange) {
|
|
442
|
-
events.push(
|
|
442
|
+
events.push(MLRNModule.EventTypes.RegionDidChange);
|
|
443
443
|
}
|
|
444
444
|
if (props.onUserLocationUpdate) {
|
|
445
|
-
events.push(
|
|
445
|
+
events.push(MLRNModule.EventTypes.UserLocationUpdated);
|
|
446
446
|
}
|
|
447
447
|
if (props.onWillStartLoadingMap) {
|
|
448
|
-
events.push(
|
|
448
|
+
events.push(MLRNModule.EventTypes.WillStartLoadingMap);
|
|
449
449
|
}
|
|
450
450
|
if (props.onDidFinishLoadingMap) {
|
|
451
|
-
events.push(
|
|
451
|
+
events.push(MLRNModule.EventTypes.DidFinishLoadingMap);
|
|
452
452
|
}
|
|
453
453
|
if (props.onDidFailLoadingMap) {
|
|
454
|
-
events.push(
|
|
454
|
+
events.push(MLRNModule.EventTypes.DidFailLoadingMap);
|
|
455
455
|
}
|
|
456
456
|
if (props.onWillStartRenderingFrame) {
|
|
457
|
-
events.push(
|
|
457
|
+
events.push(MLRNModule.EventTypes.WillStartRenderingFrame);
|
|
458
458
|
}
|
|
459
459
|
if (props.onDidFinishRenderingFrame) {
|
|
460
|
-
events.push(
|
|
460
|
+
events.push(MLRNModule.EventTypes.DidFinishRenderingFrame);
|
|
461
461
|
}
|
|
462
462
|
if (props.onDidFinishRenderingFrameFully) {
|
|
463
|
-
events.push(
|
|
463
|
+
events.push(MLRNModule.EventTypes.DidFinishRenderingFrameFully);
|
|
464
464
|
}
|
|
465
465
|
if (props.onWillStartRenderingMap) {
|
|
466
|
-
events.push(
|
|
466
|
+
events.push(MLRNModule.EventTypes.WillStartRenderingMap);
|
|
467
467
|
}
|
|
468
468
|
if (props.onDidFinishRenderingMap) {
|
|
469
|
-
events.push(
|
|
469
|
+
events.push(MLRNModule.EventTypes.DidFinishRenderingMap);
|
|
470
470
|
}
|
|
471
471
|
if (props.onDidFinishRenderingMapFully) {
|
|
472
|
-
events.push(
|
|
472
|
+
events.push(MLRNModule.EventTypes.DidFinishRenderingMapFully);
|
|
473
473
|
}
|
|
474
474
|
if (props.onDidFinishLoadingStyle) {
|
|
475
|
-
events.push(
|
|
475
|
+
events.push(MLRNModule.EventTypes.DidFinishLoadingStyle);
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
_runNativeCommand(
|
|
@@ -656,7 +656,7 @@ const MapView = memo(
|
|
|
656
656
|
let propName: CallableProps | undefined;
|
|
657
657
|
|
|
658
658
|
switch (type) {
|
|
659
|
-
case
|
|
659
|
+
case MLRNModule.EventTypes.RegionWillChange:
|
|
660
660
|
if (
|
|
661
661
|
regionWillChangeDebounceTime &&
|
|
662
662
|
regionWillChangeDebounceTime > 0
|
|
@@ -670,10 +670,10 @@ const MapView = memo(
|
|
|
670
670
|
propName = "onRegionWillChange";
|
|
671
671
|
}
|
|
672
672
|
break;
|
|
673
|
-
case
|
|
673
|
+
case MLRNModule.EventTypes.RegionIsChanging:
|
|
674
674
|
propName = "onRegionIsChanging";
|
|
675
675
|
break;
|
|
676
|
-
case
|
|
676
|
+
case MLRNModule.EventTypes.RegionDidChange:
|
|
677
677
|
if (
|
|
678
678
|
regionDidChangeDebounceTime &&
|
|
679
679
|
regionDidChangeDebounceTime > 0
|
|
@@ -687,37 +687,37 @@ const MapView = memo(
|
|
|
687
687
|
propName = "onRegionDidChange";
|
|
688
688
|
}
|
|
689
689
|
break;
|
|
690
|
-
case
|
|
690
|
+
case MLRNModule.EventTypes.UserLocationUpdated:
|
|
691
691
|
propName = "onUserLocationUpdate";
|
|
692
692
|
break;
|
|
693
|
-
case
|
|
693
|
+
case MLRNModule.EventTypes.WillStartLoadingMap:
|
|
694
694
|
propName = "onWillStartLoadingMap";
|
|
695
695
|
break;
|
|
696
|
-
case
|
|
696
|
+
case MLRNModule.EventTypes.DidFinishLoadingMap:
|
|
697
697
|
propName = "onDidFinishLoadingMap";
|
|
698
698
|
break;
|
|
699
|
-
case
|
|
699
|
+
case MLRNModule.EventTypes.DidFailLoadingMap:
|
|
700
700
|
propName = "onDidFailLoadingMap";
|
|
701
701
|
break;
|
|
702
|
-
case
|
|
702
|
+
case MLRNModule.EventTypes.WillStartRenderingFrame:
|
|
703
703
|
propName = "onWillStartRenderingFrame";
|
|
704
704
|
break;
|
|
705
|
-
case
|
|
705
|
+
case MLRNModule.EventTypes.DidFinishRenderingFrame:
|
|
706
706
|
propName = "onDidFinishRenderingFrame";
|
|
707
707
|
break;
|
|
708
|
-
case
|
|
708
|
+
case MLRNModule.EventTypes.DidFinishRenderingFrameFully:
|
|
709
709
|
propName = "onDidFinishRenderingFrameFully";
|
|
710
710
|
break;
|
|
711
|
-
case
|
|
711
|
+
case MLRNModule.EventTypes.WillStartRenderingMap:
|
|
712
712
|
propName = "onWillStartRenderingMap";
|
|
713
713
|
break;
|
|
714
|
-
case
|
|
714
|
+
case MLRNModule.EventTypes.DidFinishRenderingMap:
|
|
715
715
|
propName = "onDidFinishRenderingMap";
|
|
716
716
|
break;
|
|
717
|
-
case
|
|
717
|
+
case MLRNModule.EventTypes.DidFinishRenderingMapFully:
|
|
718
718
|
propName = "onDidFinishRenderingMapFully";
|
|
719
719
|
break;
|
|
720
|
-
case
|
|
720
|
+
case MLRNModule.EventTypes.DidFinishLoadingStyle:
|
|
721
721
|
propName = "onDidFinishLoadingStyle";
|
|
722
722
|
break;
|
|
723
723
|
default:
|
|
@@ -852,4 +852,3 @@ if (isAndroid()) {
|
|
|
852
852
|
ANDROID_TEXTURE_NATIVE_MODULE_NAME,
|
|
853
853
|
);
|
|
854
854
|
}
|
|
855
|
-
export default MapView;
|
|
@@ -2,7 +2,7 @@ import { point } from "@turf/helpers";
|
|
|
2
2
|
import { type ReactElement, useMemo } from "react";
|
|
3
3
|
import { Platform, requireNativeComponent, type ViewProps } from "react-native";
|
|
4
4
|
|
|
5
|
-
import PointAnnotation from "./PointAnnotation";
|
|
5
|
+
import { PointAnnotation } from "./PointAnnotation";
|
|
6
6
|
import { toJSONString } from "../utils";
|
|
7
7
|
|
|
8
8
|
export const NATIVE_MODULE_NAME = "MLRNMarkerView";
|
|
@@ -35,7 +35,7 @@ interface MarkerViewProps extends ViewProps {
|
|
|
35
35
|
/**
|
|
36
36
|
* Expects one child - can be container with multiple elements
|
|
37
37
|
*/
|
|
38
|
-
children:
|
|
38
|
+
children: ReactElement;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
interface NativeProps extends ViewProps {
|
|
@@ -53,12 +53,12 @@ interface NativeProps extends ViewProps {
|
|
|
53
53
|
* This is based on [MakerView plugin](https://docs.mapbox.com/android/plugins/overview/markerview/) on Android
|
|
54
54
|
* and PointAnnotation on iOS.
|
|
55
55
|
*/
|
|
56
|
-
const MarkerView = ({
|
|
56
|
+
export const MarkerView = ({
|
|
57
57
|
anchor = { x: 0.5, y: 0.5 },
|
|
58
58
|
allowOverlap = false,
|
|
59
59
|
isSelected = false,
|
|
60
60
|
...rest
|
|
61
|
-
}: MarkerViewProps)
|
|
61
|
+
}: MarkerViewProps) => {
|
|
62
62
|
const props = { anchor, allowOverlap, isSelected, ...rest };
|
|
63
63
|
const coordinate = props.coordinate
|
|
64
64
|
? toJSONString(point(props.coordinate))
|
|
@@ -84,5 +84,3 @@ const MarkerView = ({
|
|
|
84
84
|
let lastId = 0;
|
|
85
85
|
|
|
86
86
|
const MLRNMarkerView = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
87
|
-
|
|
88
|
-
export default MarkerView;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type ReactElement } from "react";
|
|
2
1
|
import { requireNativeComponent } from "react-native";
|
|
3
2
|
|
|
4
3
|
const NATIVE_MODULE_NAME = "MLRNNativeUserLocation";
|
|
@@ -26,10 +25,8 @@ interface NativeUserLocationProps {
|
|
|
26
25
|
androidPreferredFramesPerSecond?: number;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
const NativeUserLocation = (props: NativeUserLocationProps)
|
|
28
|
+
export const NativeUserLocation = (props: NativeUserLocationProps) => {
|
|
30
29
|
return <MLRNNativeUserLocation {...props} />;
|
|
31
30
|
};
|
|
32
31
|
|
|
33
32
|
const MLRNNativeUserLocation = requireNativeComponent(NATIVE_MODULE_NAME);
|
|
34
|
-
|
|
35
|
-
export default NativeUserLocation;
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
requireNativeComponent,
|
|
15
15
|
} from "react-native";
|
|
16
16
|
|
|
17
|
-
import useNativeBridge,
|
|
17
|
+
import { useNativeBridge, type RNMLEvent } from "../hooks/useNativeBridge";
|
|
18
18
|
import { isFunction, toJSONString } from "../utils";
|
|
19
19
|
|
|
20
20
|
export const NATIVE_MODULE_NAME = "MLRNPointAnnotation";
|
|
@@ -102,7 +102,7 @@ export interface PointAnnotationProps {
|
|
|
102
102
|
/**
|
|
103
103
|
* Expects one child, and an optional callout can be added as well
|
|
104
104
|
*/
|
|
105
|
-
children:
|
|
105
|
+
children: ReactElement | [ReactElement, ReactElement];
|
|
106
106
|
|
|
107
107
|
style?: ViewProps["style"];
|
|
108
108
|
}
|
|
@@ -125,7 +125,10 @@ export interface PointAnnotationRef {
|
|
|
125
125
|
* If you need interctive views please use MarkerView,
|
|
126
126
|
* as with PointAnnotation on Android child views are rendered onto a bitmap for better performance.
|
|
127
127
|
*/
|
|
128
|
-
const PointAnnotation = forwardRef<
|
|
128
|
+
export const PointAnnotation = forwardRef<
|
|
129
|
+
PointAnnotationRef,
|
|
130
|
+
PointAnnotationProps
|
|
131
|
+
>(
|
|
129
132
|
(
|
|
130
133
|
{
|
|
131
134
|
anchor = { x: 0.5, y: 0.5 },
|
|
@@ -133,7 +136,7 @@ const PointAnnotation = forwardRef<PointAnnotationRef, PointAnnotationProps>(
|
|
|
133
136
|
...props
|
|
134
137
|
}: PointAnnotationProps,
|
|
135
138
|
ref,
|
|
136
|
-
)
|
|
139
|
+
) => {
|
|
137
140
|
useImperativeHandle(
|
|
138
141
|
ref,
|
|
139
142
|
(): PointAnnotationRef => ({
|
|
@@ -241,5 +244,3 @@ PointAnnotation.displayName = "PointAnnotation";
|
|
|
241
244
|
|
|
242
245
|
const MLRNPointAnnotation =
|
|
243
246
|
requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
244
|
-
|
|
245
|
-
export default PointAnnotation;
|
|
@@ -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 RasterLayerStyle } from "../types/MapLibreRNStyles";
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const MLRNModule = NativeModules.MLRNModule;
|
|
12
12
|
|
|
13
13
|
export const NATIVE_MODULE_NAME = "MLRNRasterLayer";
|
|
14
14
|
|
|
@@ -25,8 +25,8 @@ interface NativeProps
|
|
|
25
25
|
|
|
26
26
|
const MLRNRasterLayer = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
27
27
|
|
|
28
|
-
const RasterLayer
|
|
29
|
-
sourceID =
|
|
28
|
+
export const RasterLayer = ({
|
|
29
|
+
sourceID = MLRNModule.StyleSource.DefaultSourceID,
|
|
30
30
|
...props
|
|
31
31
|
}: RasterLayerProps) => {
|
|
32
32
|
const { baseProps, setNativeLayer } = useAbstractLayer<
|
|
@@ -39,5 +39,3 @@ const RasterLayer: React.FC<RasterLayerProps> = ({
|
|
|
39
39
|
|
|
40
40
|
return <MLRNRasterLayer ref={setNativeLayer} {...baseProps} />;
|
|
41
41
|
};
|
|
42
|
-
|
|
43
|
-
export default RasterLayer;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
import { NativeModules, requireNativeComponent } from "react-native";
|
|
3
3
|
|
|
4
|
-
import useAbstractSource from "../hooks/useAbstractSource";
|
|
5
|
-
import useOnce from "../hooks/useOnce";
|
|
4
|
+
import { useAbstractSource } from "../hooks/useAbstractSource";
|
|
5
|
+
import { useOnce } from "../hooks/useOnce";
|
|
6
6
|
import { type BaseProps } from "../types/BaseProps";
|
|
7
7
|
import { cloneReactChildrenWithProps } from "../utils";
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const MLRNModule = NativeModules.MLRNModule;
|
|
10
10
|
|
|
11
11
|
export const NATIVE_MODULE_NAME = "MLRNRasterSource";
|
|
12
12
|
|
|
@@ -55,7 +55,7 @@ interface RasterSourceProps extends BaseProps {
|
|
|
55
55
|
*/
|
|
56
56
|
attribution?: string;
|
|
57
57
|
|
|
58
|
-
children?:
|
|
58
|
+
children?: ReactNode;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
type NativeProps = RasterSourceProps;
|
|
@@ -68,8 +68,8 @@ const MLRNRasterSource =
|
|
|
68
68
|
* The location of and metadata about the tiles are defined either by an option dictionary
|
|
69
69
|
* or by an external file that conforms to the TileJSON specification.
|
|
70
70
|
*/
|
|
71
|
-
const RasterSource
|
|
72
|
-
id =
|
|
71
|
+
export const RasterSource = ({
|
|
72
|
+
id = MLRNModule.StyleSource.DefaultSourceID,
|
|
73
73
|
...props
|
|
74
74
|
}: RasterSourceProps) => {
|
|
75
75
|
useOnce(() => {
|
|
@@ -110,5 +110,3 @@ const RasterSource: React.FC<RasterSourceProps> = ({
|
|
|
110
110
|
</MLRNRasterSource>
|
|
111
111
|
);
|
|
112
112
|
};
|
|
113
|
-
|
|
114
|
-
export default RasterSource;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Component,
|
|
3
|
-
type ReactElement,
|
|
4
3
|
forwardRef,
|
|
5
4
|
memo,
|
|
5
|
+
type ReactNode,
|
|
6
6
|
useImperativeHandle,
|
|
7
7
|
useRef,
|
|
8
8
|
} from "react";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
requireNativeComponent,
|
|
14
14
|
} from "react-native";
|
|
15
15
|
|
|
16
|
-
import useNativeBridge from "../hooks/useNativeBridge";
|
|
16
|
+
import { useNativeBridge } from "../hooks/useNativeBridge";
|
|
17
17
|
import { type BaseProps } from "../types/BaseProps";
|
|
18
18
|
import {
|
|
19
19
|
type ExpressionField,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from "../utils";
|
|
29
29
|
import { getFilter } from "../utils/filterUtils";
|
|
30
30
|
|
|
31
|
-
const
|
|
31
|
+
const MLRNModule = NativeModules.MLRNModule;
|
|
32
32
|
export const NATIVE_MODULE_NAME = "MLRNShapeSource";
|
|
33
33
|
|
|
34
34
|
interface NativeProps {
|
|
@@ -133,7 +133,7 @@ export interface ShapeSourceProps extends BaseProps {
|
|
|
133
133
|
height: number;
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
children?:
|
|
136
|
+
children?: ReactNode;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
export interface ShapeSourceRef {
|
|
@@ -158,11 +158,11 @@ export interface ShapeSourceRef {
|
|
|
158
158
|
* ShapeSource is a map content source that supplies vector shapes to be shown on the map.
|
|
159
159
|
* The shape may be a url or a GeoJSON object
|
|
160
160
|
*/
|
|
161
|
-
const ShapeSource = memo(
|
|
161
|
+
export const ShapeSource = memo(
|
|
162
162
|
forwardRef<ShapeSourceRef, ShapeSourceProps>(
|
|
163
163
|
(
|
|
164
164
|
{
|
|
165
|
-
id: shapeId =
|
|
165
|
+
id: shapeId = MLRNModule.StyleSource.DefaultSourceID,
|
|
166
166
|
...props
|
|
167
167
|
}: ShapeSourceProps,
|
|
168
168
|
ref,
|
|
@@ -364,5 +364,3 @@ const ShapeSource = memo(
|
|
|
364
364
|
);
|
|
365
365
|
|
|
366
366
|
const MLRNShapeSource = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
367
|
-
|
|
368
|
-
export default ShapeSource;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { NativeModules, requireNativeComponent } from "react-native";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import {
|
|
4
|
+
useAbstractLayer,
|
|
4
5
|
type BaseLayerProps,
|
|
5
6
|
type NativeBaseProps,
|
|
6
7
|
} from "../hooks/useAbstractLayer";
|
|
7
8
|
import { type BaseProps } from "../types/BaseProps";
|
|
8
9
|
import { type SymbolLayerStyle } from "../types/MapLibreRNStyles";
|
|
9
10
|
|
|
10
|
-
const
|
|
11
|
+
const MLRNModule = NativeModules.MLRNModule;
|
|
11
12
|
|
|
12
13
|
export const NATIVE_MODULE_NAME = "MLRNSymbolLayer";
|
|
13
14
|
|
|
@@ -27,8 +28,8 @@ const MLRNSymbolLayer = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
|
27
28
|
/**
|
|
28
29
|
* SymbolLayer is a style layer that renders icon and text labels at points or along lines on the map.
|
|
29
30
|
*/
|
|
30
|
-
const SymbolLayer
|
|
31
|
-
sourceID =
|
|
31
|
+
export const SymbolLayer = ({
|
|
32
|
+
sourceID = MLRNModule.StyleSource.DefaultSourceID,
|
|
32
33
|
...props
|
|
33
34
|
}: SymbolLayerProps) => {
|
|
34
35
|
const { baseProps, setNativeLayer } = useAbstractLayer<
|
|
@@ -45,5 +46,3 @@ const SymbolLayer: React.FC<SymbolLayerProps> = ({
|
|
|
45
46
|
|
|
46
47
|
return <MLRNSymbolLayer ref={setNativeLayer} {...updatedProps} />;
|
|
47
48
|
};
|
|
48
|
-
|
|
49
|
-
export default SymbolLayer;
|