@maplibre/maplibre-react-native 11.0.0-alpha.7 → 11.0.0-alpha.9
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/MapLibreReactNative.podspec +1 -1
- package/android/build.gradle +0 -3
- package/android/src/main/java/org/maplibre/reactnative/MLRNPackage.kt +43 -0
- package/android/src/main/java/org/maplibre/reactnative/components/AbstractEvent.kt +24 -0
- package/android/src/main/java/org/maplibre/reactnative/components/AbstractEventEmitter.kt +71 -0
- package/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotation.java +1 -1
- package/android/src/main/java/org/maplibre/reactnative/components/camera/CameraStop.kt +203 -0
- package/android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateItem.kt +109 -0
- package/android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateQueue.kt +60 -0
- package/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCamera.kt +409 -0
- package/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCameraManager.kt +69 -0
- package/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCameraModule.kt +34 -0
- package/android/src/main/java/org/maplibre/reactnative/components/camera/constants/CameraEasing.kt +24 -0
- package/android/src/main/java/org/maplibre/reactnative/components/images/MLRNImages.java +1 -2
- package/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.java +1 -1
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapView.kt +23 -0
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapViewManager.kt +23 -0
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.kt +1338 -0
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.kt +187 -0
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewModule.kt +159 -0
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/helpers/CameraChangeTracker.kt +26 -0
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/helpers/LayerSourceInfo.kt +74 -0
- package/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLayer.java +1 -5
- package/android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLight.java +1 -6
- package/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSource.java +2 -9
- package/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNSource.java +1 -1
- package/android/src/main/java/org/maplibre/reactnative/events/AbstractEvent.java +2 -5
- package/android/src/main/java/org/maplibre/reactnative/events/MapChangeEvent.kt +18 -0
- package/android/src/main/java/org/maplibre/reactnative/events/MapClickEvent.java +4 -0
- package/android/src/main/java/org/maplibre/reactnative/events/MapPressEvent.kt +27 -0
- package/android/src/main/java/org/maplibre/reactnative/events/TrackUserLocationChangeEvent.kt +24 -0
- package/android/src/main/java/org/maplibre/reactnative/events/constants/EventKeys.java +0 -1
- package/android/src/main/java/org/maplibre/reactnative/events/constants/EventTypes.java +0 -19
- package/android/src/main/java/org/maplibre/reactnative/location/LocationManager.java +1 -1
- package/android/src/main/java/org/maplibre/reactnative/location/TrackUserLocationMode.kt +43 -0
- package/android/src/main/java/org/maplibre/reactnative/location/{UserTrackingState.java → TrackUserLocationState.java} +1 -1
- package/android/src/main/java/org/maplibre/reactnative/location/UserLocation.java +1 -1
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNModule.java +1 -49
- package/android/src/main/java/org/maplibre/reactnative/utils/ConvertUtils.java +2 -9
- package/android/src/main/java/org/maplibre/reactnative/utils/GeoJSONUtils.kt +322 -0
- package/android/src/main/java/org/maplibre/reactnative/utils/ReactTagResolver.kt +85 -0
- package/ios/MLRNCallout.h +1 -1
- package/ios/MLRNEvent.m +3 -1
- package/ios/MLRNEventTypes.h +10 -31
- package/ios/MLRNEventTypes.m +10 -30
- package/ios/MLRNImages.h +1 -1
- package/ios/MLRNImages.m +1 -1
- package/ios/MLRNLayer.h +1 -1
- package/ios/MLRNLayer.m +2 -2
- package/ios/MLRNLight.h +2 -1
- package/ios/MLRNLocationModule.m +2 -2
- package/ios/MLRNMapTouchEvent.h +2 -1
- package/ios/MLRNMapTouchEvent.m +12 -10
- package/ios/MLRNModule.m +5 -52
- package/ios/MLRNNativeUserLocation.m +0 -1
- package/ios/MLRNOfflineModule.h +2 -2
- package/ios/MLRNOfflineModule.m +9 -9
- package/ios/MLRNPointAnnotation.h +1 -1
- package/ios/MLRNShapeSource.h +1 -1
- package/ios/MLRNSource.h +3 -1
- package/ios/MLRNStyle.m +20 -20
- package/ios/MLRNUtils.h +17 -2
- package/ios/MLRNUtils.m +25 -2
- package/ios/components/camera/CameraEasing.h +8 -0
- package/ios/{CameraStop.h → components/camera/CameraStop.h} +10 -6
- package/ios/components/camera/CameraStop.m +75 -0
- package/ios/{CameraUpdateItem.m → components/camera/CameraUpdateItem.m} +45 -46
- package/ios/components/camera/MLRNCamera.h +26 -0
- package/ios/components/camera/MLRNCamera.m +195 -0
- package/ios/components/camera/MLRNCameraComponentView.h +18 -0
- package/ios/components/camera/MLRNCameraComponentView.mm +192 -0
- package/ios/components/camera/MLRNCameraManager.h +11 -0
- package/ios/components/camera/MLRNCameraManager.m +20 -0
- package/ios/components/camera/MLRNCameraModule.h +4 -0
- package/ios/components/camera/MLRNCameraModule.mm +111 -0
- package/ios/{MLRNMapView.h → components/map-view/MLRNMapView.h} +42 -20
- package/ios/components/map-view/MLRNMapView.m +809 -0
- package/ios/components/map-view/MLRNMapViewComponentView.h +18 -0
- package/ios/components/map-view/MLRNMapViewComponentView.mm +400 -0
- package/ios/components/map-view/MLRNMapViewManager.h +70 -0
- package/ios/components/map-view/MLRNMapViewManager.m +163 -0
- package/ios/components/map-view/MLRNMapViewModule.h +4 -0
- package/ios/components/map-view/MLRNMapViewModule.mm +249 -0
- package/ios/{MLRNSnapshotModule → modules/snapshot}/MLRNSnapshotModule.mm +0 -1
- package/lib/commonjs/MLRNModule.js +1 -3
- package/lib/commonjs/MLRNModule.js.map +1 -1
- package/lib/commonjs/components/Annotation.js +1 -13
- package/lib/commonjs/components/Annotation.js.map +1 -1
- package/lib/commonjs/components/Images.js.map +1 -1
- package/lib/commonjs/components/ShapeSource.js +2 -21
- package/lib/commonjs/components/ShapeSource.js.map +1 -1
- package/lib/commonjs/components/VectorSource.js +3 -26
- package/lib/commonjs/components/VectorSource.js.map +1 -1
- package/lib/commonjs/components/camera/Camera.js +97 -0
- package/lib/commonjs/components/camera/Camera.js.map +1 -0
- package/lib/commonjs/components/camera/CameraNativeComponent.ts +61 -0
- package/lib/commonjs/components/camera/NativeCameraModule.js +11 -0
- package/lib/commonjs/components/camera/NativeCameraModule.js.map +1 -0
- package/lib/commonjs/components/map-view/MapView.js +115 -0
- package/lib/commonjs/components/map-view/MapView.js.map +1 -0
- package/lib/commonjs/components/map-view/MapViewNativeComponent.ts +96 -0
- package/lib/commonjs/components/map-view/NativeMapViewModule.js +9 -0
- package/lib/commonjs/components/map-view/NativeMapViewModule.js.map +1 -0
- package/lib/commonjs/index.js +246 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/snapshot/NativeSnapshotModule.js +2 -2
- package/lib/commonjs/modules/snapshot/NativeSnapshotModule.js.map +1 -1
- package/lib/commonjs/modules/snapshot/SnapshotManager.js +3 -2
- package/lib/commonjs/modules/snapshot/SnapshotManager.js.map +1 -1
- package/lib/commonjs/types/Bounds.js +2 -0
- package/lib/commonjs/types/{OnPressEvent.js.map → Bounds.js.map} +1 -1
- package/lib/commonjs/types/PressEvent.js +2 -0
- package/lib/{module/types/OnPressEvent.js.map → commonjs/types/PressEvent.js.map} +1 -1
- package/lib/commonjs/types/ViewPadding.js +2 -0
- package/lib/commonjs/types/{MapLibreRNEvent.js.map → ViewPadding.js.map} +1 -1
- package/lib/commonjs/types/codegen/UnsafeMixed.js +2 -0
- package/lib/commonjs/types/codegen/UnsafeMixed.js.map +1 -0
- package/lib/commonjs/utils/index.js +0 -11
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/MLRNModule.js +0 -1
- package/lib/module/MLRNModule.js.map +1 -1
- package/lib/module/components/Annotation.js +2 -14
- package/lib/module/components/Annotation.js.map +1 -1
- package/lib/module/components/Images.js.map +1 -1
- package/lib/module/components/ShapeSource.js +3 -22
- package/lib/module/components/ShapeSource.js.map +1 -1
- package/lib/module/components/VectorSource.js +4 -27
- package/lib/module/components/VectorSource.js.map +1 -1
- package/lib/module/components/camera/Camera.js +92 -0
- package/lib/module/components/camera/Camera.js.map +1 -0
- package/lib/module/components/camera/CameraNativeComponent.ts +61 -0
- package/lib/module/components/camera/NativeCameraModule.js +10 -0
- package/lib/module/components/camera/NativeCameraModule.js.map +1 -0
- package/lib/module/components/map-view/MapView.js +110 -0
- package/lib/module/components/map-view/MapView.js.map +1 -0
- package/lib/module/components/map-view/MapViewNativeComponent.ts +96 -0
- package/lib/module/components/map-view/NativeMapViewModule.js +5 -0
- package/lib/module/components/map-view/NativeMapViewModule.js.map +1 -0
- package/lib/module/index.js +30 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/snapshot/NativeSnapshotModule.js +1 -1
- package/lib/module/modules/snapshot/NativeSnapshotModule.js.map +1 -1
- package/lib/module/modules/snapshot/SnapshotManager.js +1 -1
- package/lib/module/modules/snapshot/SnapshotManager.js.map +1 -1
- package/lib/module/types/Bounds.js +2 -0
- package/lib/module/types/{MapLibreRNEvent.js.map → Bounds.js.map} +1 -1
- package/lib/module/types/PressEvent.js +2 -0
- package/lib/module/types/PressEvent.js.map +1 -0
- package/lib/module/types/ViewPadding.js +2 -0
- package/lib/module/types/ViewPadding.js.map +1 -0
- package/lib/module/types/codegen/UnsafeMixed.js +2 -0
- package/lib/module/types/codegen/UnsafeMixed.js.map +1 -0
- package/lib/module/utils/index.js +0 -9
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/commonjs/src/MLRNModule.d.ts +1 -7
- package/lib/typescript/commonjs/src/MLRNModule.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Annotation.d.ts +3 -3
- package/lib/typescript/commonjs/src/components/Annotation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Images.d.ts +1 -2
- package/lib/typescript/commonjs/src/components/Images.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/ShapeSource.d.ts +2 -5
- package/lib/typescript/commonjs/src/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/VectorSource.d.ts +3 -2
- package/lib/typescript/commonjs/src/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/camera/Camera.d.ts +180 -0
- package/lib/typescript/commonjs/src/components/camera/Camera.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/camera/CameraNativeComponent.d.ts +37 -0
- package/lib/typescript/commonjs/src/components/camera/CameraNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/camera/NativeCameraModule.d.ts +27 -0
- package/lib/typescript/commonjs/src/components/camera/NativeCameraModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/map-view/MapView.d.ts +323 -0
- package/lib/typescript/commonjs/src/components/map-view/MapView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/map-view/MapViewNativeComponent.d.ts +69 -0
- package/lib/typescript/commonjs/src/components/map-view/MapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/map-view/NativeMapViewModule.d.ts +45 -0
- package/lib/typescript/commonjs/src/components/map-view/NativeMapViewModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +41 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/snapshot/NativeSnapshotModule.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/snapshot/NativeSnapshotModule.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/Bounds.d.ts +2 -0
- package/lib/typescript/commonjs/src/types/Bounds.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/PressEvent.d.ts +16 -0
- package/lib/typescript/commonjs/src/types/PressEvent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/ViewPadding.d.ts +7 -0
- package/lib/typescript/commonjs/src/types/ViewPadding.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/codegen/UnsafeMixed.d.ts +10 -0
- package/lib/typescript/commonjs/src/types/codegen/UnsafeMixed.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/index.d.ts +1 -3
- package/lib/typescript/commonjs/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/module/src/MLRNModule.d.ts +1 -7
- package/lib/typescript/module/src/MLRNModule.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Annotation.d.ts +3 -3
- package/lib/typescript/module/src/components/Annotation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Images.d.ts +1 -2
- package/lib/typescript/module/src/components/Images.d.ts.map +1 -1
- package/lib/typescript/module/src/components/ShapeSource.d.ts +2 -5
- package/lib/typescript/module/src/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/module/src/components/VectorSource.d.ts +3 -2
- package/lib/typescript/module/src/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/module/src/components/camera/Camera.d.ts +180 -0
- package/lib/typescript/module/src/components/camera/Camera.d.ts.map +1 -0
- package/lib/typescript/module/src/components/camera/CameraNativeComponent.d.ts +37 -0
- package/lib/typescript/module/src/components/camera/CameraNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/components/camera/NativeCameraModule.d.ts +27 -0
- package/lib/typescript/module/src/components/camera/NativeCameraModule.d.ts.map +1 -0
- package/lib/typescript/module/src/components/map-view/MapView.d.ts +323 -0
- package/lib/typescript/module/src/components/map-view/MapView.d.ts.map +1 -0
- package/lib/typescript/module/src/components/map-view/MapViewNativeComponent.d.ts +69 -0
- package/lib/typescript/module/src/components/map-view/MapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/components/map-view/NativeMapViewModule.d.ts +45 -0
- package/lib/typescript/module/src/components/map-view/NativeMapViewModule.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +41 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/snapshot/NativeSnapshotModule.d.ts +2 -1
- package/lib/typescript/module/src/modules/snapshot/NativeSnapshotModule.d.ts.map +1 -1
- package/lib/typescript/module/src/types/Bounds.d.ts +2 -0
- package/lib/typescript/module/src/types/Bounds.d.ts.map +1 -0
- package/lib/typescript/module/src/types/PressEvent.d.ts +16 -0
- package/lib/typescript/module/src/types/PressEvent.d.ts.map +1 -0
- package/lib/typescript/module/src/types/ViewPadding.d.ts +7 -0
- package/lib/typescript/module/src/types/ViewPadding.d.ts.map +1 -0
- package/lib/typescript/module/src/types/codegen/UnsafeMixed.d.ts +10 -0
- package/lib/typescript/module/src/types/codegen/UnsafeMixed.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/index.d.ts +1 -3
- package/lib/typescript/module/src/utils/index.d.ts.map +1 -1
- package/package.json +38 -28
- package/src/MLRNModule.ts +0 -10
- package/src/components/Annotation.tsx +8 -23
- package/src/components/Images.tsx +2 -4
- package/src/components/ShapeSource.tsx +18 -31
- package/src/components/VectorSource.tsx +5 -28
- package/src/components/camera/Camera.tsx +311 -0
- package/src/components/camera/CameraNativeComponent.ts +61 -0
- package/src/components/camera/NativeCameraModule.ts +39 -0
- package/src/components/map-view/MapView.tsx +582 -0
- package/src/components/map-view/MapViewNativeComponent.ts +96 -0
- package/src/components/map-view/NativeMapViewModule.ts +83 -0
- package/src/index.ts +86 -1
- package/src/modules/snapshot/NativeSnapshotModule.ts +1 -2
- package/src/modules/snapshot/SnapshotManager.ts +1 -1
- package/src/types/Bounds.ts +1 -0
- package/src/types/PressEvent.ts +19 -0
- package/src/types/ViewPadding.ts +6 -0
- package/src/types/codegen/UnsafeMixed.ts +9 -0
- package/src/utils/index.ts +1 -14
- package/android/src/main/java/org/maplibre/reactnative/components/AbstractEvent.java +0 -35
- package/android/src/main/java/org/maplibre/reactnative/components/AbstractEventEmitter.java +0 -80
- package/android/src/main/java/org/maplibre/reactnative/components/camera/CameraStop.java +0 -245
- package/android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateItem.java +0 -121
- package/android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateQueue.java +0 -68
- package/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCamera.java +0 -519
- package/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCameraManager.java +0 -101
- package/android/src/main/java/org/maplibre/reactnative/components/camera/constants/CameraMode.java +0 -18
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/LayerSourceInfo.java +0 -59
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapView.java +0 -13
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapViewManager.java +0 -27
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.java +0 -1521
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.java +0 -342
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/helpers/CameraChangeTracker.java +0 -37
- package/android/src/main/java/org/maplibre/reactnative/events/MapChangeEvent.java +0 -43
- package/android/src/main/java/org/maplibre/reactnative/events/MapUserTrackingModeEvent.java +0 -32
- package/android/src/main/java/org/maplibre/reactnative/location/UserLocationVerticalAlignment.java +0 -7
- package/android/src/main/java/org/maplibre/reactnative/location/UserTrackingMode.java +0 -59
- package/android/src/main/java/org/maplibre/reactnative/utils/GeoJSONUtils.java +0 -310
- package/ios/CameraMode.h +0 -10
- package/ios/CameraMode.m +0 -10
- package/ios/CameraStop.m +0 -73
- package/ios/MLRNCamera.h +0 -29
- package/ios/MLRNCamera.m +0 -236
- package/ios/MLRNCameraManager.h +0 -5
- package/ios/MLRNCameraManager.m +0 -39
- package/ios/MLRNMapView.m +0 -497
- package/ios/MLRNMapViewManager.h +0 -9
- package/ios/MLRNMapViewManager.m +0 -604
- package/lib/commonjs/MapLibreRN.js +0 -266
- package/lib/commonjs/MapLibreRN.js.map +0 -1
- package/lib/commonjs/components/Camera.js +0 -333
- package/lib/commonjs/components/Camera.js.map +0 -1
- package/lib/commonjs/components/MapView.js +0 -449
- package/lib/commonjs/components/MapView.js.map +0 -1
- package/lib/commonjs/hooks/useNativeRef.js +0 -14
- package/lib/commonjs/hooks/useNativeRef.js.map +0 -1
- package/lib/commonjs/types/CameraMode.js +0 -14
- package/lib/commonjs/types/CameraMode.js.map +0 -1
- package/lib/commonjs/types/MapLibreRNEvent.js +0 -6
- package/lib/commonjs/types/OnPressEvent.js +0 -2
- package/lib/module/MapLibreRN.js +0 -33
- package/lib/module/MapLibreRN.js.map +0 -1
- package/lib/module/components/Camera.js +0 -328
- package/lib/module/components/Camera.js.map +0 -1
- package/lib/module/components/MapView.js +0 -444
- package/lib/module/components/MapView.js.map +0 -1
- package/lib/module/hooks/useNativeRef.js +0 -10
- package/lib/module/hooks/useNativeRef.js.map +0 -1
- package/lib/module/types/CameraMode.js +0 -10
- package/lib/module/types/CameraMode.js.map +0 -1
- package/lib/module/types/MapLibreRNEvent.js +0 -4
- package/lib/module/types/OnPressEvent.js +0 -2
- package/lib/typescript/commonjs/src/MapLibreRN.d.ts +0 -41
- package/lib/typescript/commonjs/src/MapLibreRN.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/Camera.d.ts +0 -134
- package/lib/typescript/commonjs/src/components/Camera.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/MapView.d.ts +0 -223
- package/lib/typescript/commonjs/src/components/MapView.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts +0 -8
- package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/CameraMode.d.ts +0 -7
- package/lib/typescript/commonjs/src/types/CameraMode.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/MapLibreRNEvent.d.ts +0 -6
- package/lib/typescript/commonjs/src/types/MapLibreRNEvent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/OnPressEvent.d.ts +0 -12
- package/lib/typescript/commonjs/src/types/OnPressEvent.d.ts.map +0 -1
- package/lib/typescript/module/src/MapLibreRN.d.ts +0 -41
- package/lib/typescript/module/src/MapLibreRN.d.ts.map +0 -1
- package/lib/typescript/module/src/components/Camera.d.ts +0 -134
- package/lib/typescript/module/src/components/Camera.d.ts.map +0 -1
- package/lib/typescript/module/src/components/MapView.d.ts +0 -223
- package/lib/typescript/module/src/components/MapView.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useNativeRef.d.ts +0 -8
- package/lib/typescript/module/src/hooks/useNativeRef.d.ts.map +0 -1
- package/lib/typescript/module/src/types/CameraMode.d.ts +0 -7
- package/lib/typescript/module/src/types/CameraMode.d.ts.map +0 -1
- package/lib/typescript/module/src/types/MapLibreRNEvent.d.ts +0 -6
- package/lib/typescript/module/src/types/MapLibreRNEvent.d.ts.map +0 -1
- package/lib/typescript/module/src/types/OnPressEvent.d.ts +0 -12
- package/lib/typescript/module/src/types/OnPressEvent.d.ts.map +0 -1
- package/src/MapLibreRN.ts +0 -75
- package/src/components/Camera.tsx +0 -568
- package/src/components/MapView.tsx +0 -838
- package/src/hooks/useNativeRef.ts +0 -14
- package/src/types/CameraMode.ts +0 -6
- package/src/types/MapLibreRNEvent.ts +0 -7
- package/src/types/OnPressEvent.ts +0 -11
- /package/ios/{CameraUpdateItem.h → components/camera/CameraUpdateItem.h} +0 -0
- /package/ios/{CameraUpdateQueue.h → components/camera/CameraUpdateQueue.h} +0 -0
- /package/ios/{CameraUpdateQueue.m → components/camera/CameraUpdateQueue.m} +0 -0
- /package/ios/{MLRNSnapshotModule → modules/snapshot}/MLRNSnapshotModule.h +0 -0
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { type ViewProps } from "react-native";
|
|
2
|
-
import { type BaseProps } from "../types/BaseProps";
|
|
3
|
-
import { CameraMode } from "../types/CameraMode";
|
|
4
|
-
import { type MapLibreRNEvent } from "../types/MapLibreRNEvent";
|
|
5
|
-
export declare const NATIVE_MODULE_NAME = "MLRNCamera";
|
|
6
|
-
export declare enum UserTrackingMode {
|
|
7
|
-
Follow = "normal",
|
|
8
|
-
FollowWithHeading = "compass",
|
|
9
|
-
FollowWithCourse = "course"
|
|
10
|
-
}
|
|
11
|
-
export type UserTrackingModeChangeCallback = (event: MapLibreRNEvent<"usertrackingmodechange", {
|
|
12
|
-
followUserLocation: boolean;
|
|
13
|
-
followUserMode: UserTrackingMode | null;
|
|
14
|
-
}>) => void;
|
|
15
|
-
export declare function getNativeCameraMode(mode?: CameraAnimationMode): CameraMode;
|
|
16
|
-
export interface CameraRef {
|
|
17
|
-
setCamera: (config: CameraStop | CameraStops) => void;
|
|
18
|
-
fitBounds: (ne: GeoJSON.Position, sw: GeoJSON.Position, paddingConfig?: number | number[], animationDuration?: number) => void;
|
|
19
|
-
flyTo: (coordinates: GeoJSON.Position, animationDuration?: number) => void;
|
|
20
|
-
moveTo: (coordinates: GeoJSON.Position, animationDuration?: number) => void;
|
|
21
|
-
zoomTo: (zoomLevel: number, animationDuration?: number) => void;
|
|
22
|
-
}
|
|
23
|
-
export interface CameraPadding {
|
|
24
|
-
/**
|
|
25
|
-
* Left padding in points
|
|
26
|
-
*/
|
|
27
|
-
paddingLeft?: number;
|
|
28
|
-
/**
|
|
29
|
-
* Right padding in points
|
|
30
|
-
*/
|
|
31
|
-
paddingRight?: number;
|
|
32
|
-
/**
|
|
33
|
-
* Top padding in points
|
|
34
|
-
*/
|
|
35
|
-
paddingTop?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Bottom padding in points
|
|
38
|
-
*/
|
|
39
|
-
paddingBottom?: number;
|
|
40
|
-
}
|
|
41
|
-
export interface CameraBounds {
|
|
42
|
-
/**
|
|
43
|
-
* North east coordinate of bound
|
|
44
|
-
*/
|
|
45
|
-
ne: number[];
|
|
46
|
-
/**
|
|
47
|
-
* South west coordinate of bound
|
|
48
|
-
*/
|
|
49
|
-
sw: number[];
|
|
50
|
-
}
|
|
51
|
-
interface CameraBoundsWithPadding extends CameraBounds, Partial<CameraPadding> {
|
|
52
|
-
}
|
|
53
|
-
export type CameraAnimationMode = "flyTo" | "easeTo" | "linearTo" | "moveTo";
|
|
54
|
-
export interface NativeCameraStop extends CameraPadding {
|
|
55
|
-
duration?: number;
|
|
56
|
-
mode?: CameraMode;
|
|
57
|
-
pitch?: number;
|
|
58
|
-
heading?: number;
|
|
59
|
-
zoom?: number;
|
|
60
|
-
centerCoordinate?: string;
|
|
61
|
-
bounds?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface CameraStop {
|
|
64
|
-
/** The location on which the map should center. */
|
|
65
|
-
centerCoordinate?: GeoJSON.Position;
|
|
66
|
-
/** The corners of a box around which the map should bound. Contains padding props for backwards
|
|
67
|
-
* compatibility; the root `padding` prop should be used instead. */
|
|
68
|
-
bounds?: CameraBoundsWithPadding;
|
|
69
|
-
/** The heading (orientation) of the map. */
|
|
70
|
-
heading?: number;
|
|
71
|
-
/** The pitch of the map. */
|
|
72
|
-
pitch?: number;
|
|
73
|
-
/** The zoom level of the map. */
|
|
74
|
-
zoomLevel?: number;
|
|
75
|
-
/** The viewport padding in points. */
|
|
76
|
-
padding?: CameraPadding;
|
|
77
|
-
/** The duration the map takes to animate to a new configuration. */
|
|
78
|
-
animationDuration?: number;
|
|
79
|
-
/** The easing or path the camera uses to animate to a new configuration. */
|
|
80
|
-
animationMode?: CameraAnimationMode;
|
|
81
|
-
}
|
|
82
|
-
export type CameraStops = {
|
|
83
|
-
stops: CameraStop[];
|
|
84
|
-
};
|
|
85
|
-
export interface CameraProps extends BaseProps, CameraStop {
|
|
86
|
-
/**
|
|
87
|
-
* Default view settings applied on camera
|
|
88
|
-
*/
|
|
89
|
-
defaultSettings?: CameraStop;
|
|
90
|
-
/**
|
|
91
|
-
* Minimum zoom level of the map
|
|
92
|
-
*/
|
|
93
|
-
minZoomLevel?: number;
|
|
94
|
-
/**
|
|
95
|
-
* Maximum zoom level of the map
|
|
96
|
-
*/
|
|
97
|
-
maxZoomLevel?: number;
|
|
98
|
-
/**
|
|
99
|
-
* Restrict map panning so that the center is within these bounds
|
|
100
|
-
*/
|
|
101
|
-
maxBounds?: CameraBounds;
|
|
102
|
-
/**
|
|
103
|
-
* Should the map orientation follow the user's.
|
|
104
|
-
*/
|
|
105
|
-
followUserLocation?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* 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.
|
|
108
|
-
*/
|
|
109
|
-
followUserMode?: UserTrackingMode;
|
|
110
|
-
/**
|
|
111
|
-
* The zoomLevel on map while followUserLocation is set to `true`
|
|
112
|
-
*/
|
|
113
|
-
followZoomLevel?: number;
|
|
114
|
-
/**
|
|
115
|
-
* The pitch on map while followUserLocation is set to `true`
|
|
116
|
-
*/
|
|
117
|
-
followPitch?: number;
|
|
118
|
-
/**
|
|
119
|
-
* The heading on map while followUserLocation is set to `true`
|
|
120
|
-
*/
|
|
121
|
-
followHeading?: number;
|
|
122
|
-
/**
|
|
123
|
-
* Triggered when `followUserLocation` or `followUserMode` changes
|
|
124
|
-
*/
|
|
125
|
-
onUserTrackingModeChange?: UserTrackingModeChangeCallback;
|
|
126
|
-
}
|
|
127
|
-
export interface NativeCameraProps extends Omit<CameraProps, "maxBounds">, ViewProps {
|
|
128
|
-
maxBounds?: string;
|
|
129
|
-
stop?: NativeCameraStop;
|
|
130
|
-
defaultStop?: NativeCameraStop;
|
|
131
|
-
}
|
|
132
|
-
export declare const Camera: import("react").NamedExoticComponent<CameraProps & import("react").RefAttributes<CameraRef>>;
|
|
133
|
-
export {};
|
|
134
|
-
//# sourceMappingURL=Camera.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":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;IAC3B,4EAA4E;IAC5E,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,UAAU;IACxD;;OAEG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAE7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC;IAEzB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAElC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,wBAAwB,CAAC,EAAE,8BAA8B,CAAC;CAC3D;AAED,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,EACpC,SAAS;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAChC;AAED,eAAO,MAAM,MAAM,8FA+SlB,CAAC"}
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
import { type ViewProps, type NativeSyntheticEvent } from "react-native";
|
|
3
|
-
import { type Location } from "../modules/location/LocationManager";
|
|
4
|
-
import { type BaseProps } from "../types/BaseProps";
|
|
5
|
-
import { type FilterExpression } from "../types/MapLibreRNStyles";
|
|
6
|
-
export declare const NATIVE_MODULE_NAME = "MLRNMapView";
|
|
7
|
-
export declare const ANDROID_TEXTURE_NATIVE_MODULE_NAME = "MLRNAndroidTextureMapView";
|
|
8
|
-
export interface RegionPayload {
|
|
9
|
-
zoomLevel: number;
|
|
10
|
-
heading: number;
|
|
11
|
-
animated: boolean;
|
|
12
|
-
isUserInteraction: boolean;
|
|
13
|
-
visibleBounds: VisibleBounds;
|
|
14
|
-
pitch: number;
|
|
15
|
-
}
|
|
16
|
-
type RegionPayloadFeature = GeoJSON.Feature<GeoJSON.Point, RegionPayload>;
|
|
17
|
-
type VisibleBounds = [northEast: GeoJSON.Position, southWest: GeoJSON.Position];
|
|
18
|
-
interface MapViewProps extends BaseProps {
|
|
19
|
-
/**
|
|
20
|
-
* The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport.
|
|
21
|
-
*/
|
|
22
|
-
contentInset?: number[] | number;
|
|
23
|
-
/**
|
|
24
|
-
* Style for wrapping React Native View
|
|
25
|
-
*/
|
|
26
|
-
style?: ViewProps["style"];
|
|
27
|
-
/**
|
|
28
|
-
* Style for map - either a URL or a Style JSON (https://maplibre.org/maplibre-style-spec/). Default: `StyleURL.Default`
|
|
29
|
-
*/
|
|
30
|
-
mapStyle?: string | object;
|
|
31
|
-
/**
|
|
32
|
-
* iOS: The preferred frame rate at which the map view is rendered.
|
|
33
|
-
* The default value for this property is MLNMapViewPreferredFramesPerSecondDefault,
|
|
34
|
-
* which will adaptively set the preferred frame rate based on the capability of
|
|
35
|
-
* the user’s device to maintain a smooth experience. This property can be set to arbitrary integer values.
|
|
36
|
-
*
|
|
37
|
-
* Android: The maximum frame rate at which the map view is rendered, but it can't excess the ability of device hardware.
|
|
38
|
-
* This property can be set to arbitrary integer values.
|
|
39
|
-
*/
|
|
40
|
-
preferredFramesPerSecond?: number;
|
|
41
|
-
/**
|
|
42
|
-
* Automatically change the language of the map labels to the system’s preferred language,
|
|
43
|
-
* this is not something that can be toggled on/off
|
|
44
|
-
*/
|
|
45
|
-
localizeLabels?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Enable/Disable zoom on the map
|
|
48
|
-
*/
|
|
49
|
-
zoomEnabled?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Enable/Disable scroll on the map
|
|
52
|
-
*/
|
|
53
|
-
scrollEnabled?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Enable/Disable pitch on map
|
|
56
|
-
*/
|
|
57
|
-
pitchEnabled?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Enable/Disable rotation on map
|
|
60
|
-
*/
|
|
61
|
-
rotateEnabled?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Enable/Disable attribution on map
|
|
64
|
-
*/
|
|
65
|
-
attributionEnabled?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map
|
|
68
|
-
*/
|
|
69
|
-
attributionPosition?: {
|
|
70
|
-
top?: number;
|
|
71
|
-
left?: number;
|
|
72
|
-
} | {
|
|
73
|
-
top?: number;
|
|
74
|
-
right?: number;
|
|
75
|
-
} | {
|
|
76
|
-
bottom?: number;
|
|
77
|
-
left?: number;
|
|
78
|
-
} | {
|
|
79
|
-
bottom?: number;
|
|
80
|
-
right?: number;
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* MapView's tintColor
|
|
84
|
-
*/
|
|
85
|
-
tintColor?: string | unknown[];
|
|
86
|
-
/**
|
|
87
|
-
* Enable/Disable the logo on the map.
|
|
88
|
-
*/
|
|
89
|
-
logoEnabled?: boolean;
|
|
90
|
-
/**
|
|
91
|
-
* Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map
|
|
92
|
-
*/
|
|
93
|
-
logoPosition?: {
|
|
94
|
-
top?: number;
|
|
95
|
-
left?: number;
|
|
96
|
-
} | {
|
|
97
|
-
top?: number;
|
|
98
|
-
right?: number;
|
|
99
|
-
} | {
|
|
100
|
-
bottom?: number;
|
|
101
|
-
left?: number;
|
|
102
|
-
} | {
|
|
103
|
-
bottom?: number;
|
|
104
|
-
right?: number;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* Enable/Disable the compass from appearing on the map
|
|
108
|
-
*/
|
|
109
|
-
compassEnabled?: boolean;
|
|
110
|
-
/**
|
|
111
|
-
* Change corner of map the compass starts at. 0: TopLeft, 1: TopRight, 2: BottomLeft, 3: BottomRight
|
|
112
|
-
*/
|
|
113
|
-
compassViewPosition?: number;
|
|
114
|
-
/**
|
|
115
|
-
* Add margins to the compass with x and y values
|
|
116
|
-
*/
|
|
117
|
-
compassViewMargins?: object;
|
|
118
|
-
/**
|
|
119
|
-
* [Android only] Enable/Disable use of GLSurfaceView instead of TextureView
|
|
120
|
-
*/
|
|
121
|
-
surfaceView?: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* Map press listener, gets called when a user presses the map
|
|
124
|
-
*/
|
|
125
|
-
onPress?: (feature: GeoJSON.Feature) => void;
|
|
126
|
-
/**
|
|
127
|
-
* Map long press listener, gets called when a user long presses the map
|
|
128
|
-
*/
|
|
129
|
-
onLongPress?: (feature: GeoJSON.Feature) => void;
|
|
130
|
-
/**
|
|
131
|
-
* Triggered when the currently displayed map region is about to change
|
|
132
|
-
*/
|
|
133
|
-
onRegionWillChange?: (feature: RegionPayloadFeature) => void;
|
|
134
|
-
/**
|
|
135
|
-
* Triggered when the currently displayed map region is changing
|
|
136
|
-
*/
|
|
137
|
-
onRegionIsChanging?: (feature: RegionPayloadFeature) => void;
|
|
138
|
-
/**
|
|
139
|
-
* Triggered when the currently displayed map region finished changing
|
|
140
|
-
*/
|
|
141
|
-
onRegionDidChange?: (feature: RegionPayloadFeature) => void;
|
|
142
|
-
/**
|
|
143
|
-
* Triggered when the map is about to start loading a new map style
|
|
144
|
-
*/
|
|
145
|
-
onWillStartLoadingMap?: () => void;
|
|
146
|
-
/**
|
|
147
|
-
* This is triggered when the map has successfully loaded a new map style
|
|
148
|
-
*/
|
|
149
|
-
onDidFinishLoadingMap?: () => void;
|
|
150
|
-
/**
|
|
151
|
-
* Triggered when the map has failed to load a new map style
|
|
152
|
-
*/
|
|
153
|
-
onDidFailLoadingMap?: () => void;
|
|
154
|
-
/**
|
|
155
|
-
* Triggered when the map will start rendering a frame
|
|
156
|
-
*/
|
|
157
|
-
onWillStartRenderingFrame?: () => void;
|
|
158
|
-
/**
|
|
159
|
-
* Triggered when the map finished rendering a frame
|
|
160
|
-
*/
|
|
161
|
-
onDidFinishRenderingFrame?: () => void;
|
|
162
|
-
/**
|
|
163
|
-
* Triggered when the map fully finished rendering a frame
|
|
164
|
-
*/
|
|
165
|
-
onDidFinishRenderingFrameFully?: () => void;
|
|
166
|
-
/**
|
|
167
|
-
* Triggered when the map will start rendering the map
|
|
168
|
-
*/
|
|
169
|
-
onWillStartRenderingMap?: () => void;
|
|
170
|
-
/**
|
|
171
|
-
* Triggered when the map finished rendering the map
|
|
172
|
-
*/
|
|
173
|
-
onDidFinishRenderingMap?: () => void;
|
|
174
|
-
/**
|
|
175
|
-
* Triggered when the map fully finished rendering the map
|
|
176
|
-
*/
|
|
177
|
-
onDidFinishRenderingMapFully?: () => void;
|
|
178
|
-
/**
|
|
179
|
-
* Triggered when the user location is updated
|
|
180
|
-
*/
|
|
181
|
-
onUserLocationUpdate?: (location: Location) => void;
|
|
182
|
-
/**
|
|
183
|
-
* Triggered when a style has finished loading
|
|
184
|
-
*/
|
|
185
|
-
onDidFinishLoadingStyle?: () => void;
|
|
186
|
-
/**
|
|
187
|
-
* Emitted frequency of regionWillChange events
|
|
188
|
-
*/
|
|
189
|
-
regionWillChangeDebounceTime?: number;
|
|
190
|
-
/**
|
|
191
|
-
* Emitted frequency of regionDidChange events
|
|
192
|
-
*/
|
|
193
|
-
regionDidChangeDebounceTime?: number;
|
|
194
|
-
children?: ReactNode;
|
|
195
|
-
}
|
|
196
|
-
interface NativeProps extends Omit<MapViewProps, "onPress" | "onLongPress"> {
|
|
197
|
-
mapStyle?: string;
|
|
198
|
-
onPress(event: NativeSyntheticEvent<{
|
|
199
|
-
payload: GeoJSON.Feature;
|
|
200
|
-
}>): void;
|
|
201
|
-
onLongPress(event: NativeSyntheticEvent<{
|
|
202
|
-
payload: GeoJSON.Feature;
|
|
203
|
-
}>): void;
|
|
204
|
-
}
|
|
205
|
-
export interface MapViewRef {
|
|
206
|
-
getPointInView: (coordinate: GeoJSON.Position) => Promise<[x: number, y: number]>;
|
|
207
|
-
getCoordinateFromView: (point: [x: number, y: number]) => Promise<GeoJSON.Position>;
|
|
208
|
-
getVisibleBounds: () => Promise<VisibleBounds>;
|
|
209
|
-
queryRenderedFeaturesAtPoint: (point: [screenPointX: number, screenPointY: number], filter: FilterExpression | undefined, layerIDs: string[]) => Promise<GeoJSON.FeatureCollection>;
|
|
210
|
-
queryRenderedFeaturesInRect: (bbox: GeoJSON.BBox, filter: FilterExpression | undefined, layerIDs: string[]) => Promise<GeoJSON.FeatureCollection>;
|
|
211
|
-
takeSnap: (writeToDisk?: boolean) => Promise<string>;
|
|
212
|
-
getZoom: () => Promise<number>;
|
|
213
|
-
getCenter: () => Promise<GeoJSON.Position>;
|
|
214
|
-
setSourceVisibility: (visible: boolean, sourceId: string, sourceLayerId?: string | null) => void;
|
|
215
|
-
showAttribution: () => Promise<void>;
|
|
216
|
-
setNativeProps: (props: NativeProps) => void;
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* MapView backed by MapLibre Native
|
|
220
|
-
*/
|
|
221
|
-
export declare const MapView: import("react").NamedExoticComponent<MapViewProps & import("react").RefAttributes<MapViewRef>>;
|
|
222
|
-
export {};
|
|
223
|
-
//# sourceMappingURL=MapView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MapView.d.ts","sourceRoot":"","sources":["../../../../../src/components/MapView.tsx"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AACf,OAAO,EAKL,KAAK,SAAS,EAEd,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAItB,OAAO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B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,KAC1B,IAAI,CAAC;IACV,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,cAAc,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CAC9C;AAED;;GAEG;AACH,eAAO,MAAM,OAAO,gGA4iBnB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Component, type RefObject } from "react";
|
|
2
|
-
import { type NativeMethods } from "react-native";
|
|
3
|
-
export type NativeRef<NativeProps> = Component<NativeProps> & Readonly<NativeMethods>;
|
|
4
|
-
/**
|
|
5
|
-
* Separate module which allows to be mocked in tests.
|
|
6
|
-
*/
|
|
7
|
-
export declare function useNativeRef<NativeProps = object>(): RefObject<NativeRef<NativeProps> | null>;
|
|
8
|
-
//# sourceMappingURL=useNativeRef.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useNativeRef.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useNativeRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,WAAW,CAAC,GACzD,QAAQ,CAAC,aAAa,CAAC,CAAC;AAE1B;;GAEG;AACH,wBAAgB,YAAY,CAC1B,WAAW,GAAG,MAAM,KACjB,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAE5C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CameraMode.d.ts","sourceRoot":"","sources":["../../../../../src/types/CameraMode.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,MAAM,IAAI;IACV,IAAI,IAAI;IACR,MAAM,IAAI;IACV,IAAI,IAAI;CACT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MapLibreRNEvent.d.ts","sourceRoot":"","sources":["../../../../../src/types/MapLibreRNEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,eAAe,CACzB,CAAC,SAAS,MAAM,EAChB,CAAC,GAAG,OAAO,CAAC,OAAO,EACnB,CAAC,GAAG,OAAO,IACT,cAAc,CAAC,CAAC,EAAE;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OnPressEvent.d.ts","sourceRoot":"","sources":["../../../../../src/types/OnPressEvent.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;IAC5B,WAAW,EAAE;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,KAAK,EAAE;QACL,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;CACH"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export * from "./MLRNModule";
|
|
2
|
-
export { Camera, UserTrackingMode, type CameraPadding, type CameraAnimationMode, type CameraBounds, type CameraRef, type CameraStop, } from "./components/Camera";
|
|
3
|
-
export { MapView, type MapViewRef, type RegionPayload, } from "./components/MapView";
|
|
4
|
-
export { Light } from "./components/Light";
|
|
5
|
-
export { PointAnnotation } from "./components/PointAnnotation";
|
|
6
|
-
export type { PointAnnotationRef } from "./components/PointAnnotation";
|
|
7
|
-
export { Annotation } from "./components/Annotation";
|
|
8
|
-
export { Callout } from "./components/Callout";
|
|
9
|
-
export { requestAndroidLocationPermissions } from "./requestAndroidLocationPermissions";
|
|
10
|
-
export { UserLocation, UserLocationRenderMode, } from "./components/UserLocation";
|
|
11
|
-
export type { UserLocationRef } from "./components/UserLocation";
|
|
12
|
-
export { VectorSource } from "./components/VectorSource";
|
|
13
|
-
export { ShapeSource } from "./components/ShapeSource";
|
|
14
|
-
export type { ShapeSourceRef } from "./components/ShapeSource";
|
|
15
|
-
export { RasterSource } from "./components/RasterSource";
|
|
16
|
-
export { ImageSource } from "./components/ImageSource";
|
|
17
|
-
export { Images } from "./components/Images";
|
|
18
|
-
export { FillLayer } from "./components/FillLayer";
|
|
19
|
-
export { FillExtrusionLayer } from "./components/FillExtrusionLayer";
|
|
20
|
-
export { HeatmapLayer } from "./components/HeatmapLayer";
|
|
21
|
-
export { LineLayer } from "./components/LineLayer";
|
|
22
|
-
export { CircleLayer } from "./components/CircleLayer";
|
|
23
|
-
export { SymbolLayer } from "./components/SymbolLayer";
|
|
24
|
-
export { RasterLayer } from "./components/RasterLayer";
|
|
25
|
-
export { BackgroundLayer } from "./components/BackgroundLayer";
|
|
26
|
-
export { MarkerView } from "./components/MarkerView";
|
|
27
|
-
export { LocationManager, type Location, } from "./modules/location/LocationManager";
|
|
28
|
-
export { OfflineManager } from "./modules/offline/OfflineManager";
|
|
29
|
-
export type { OfflinePackError } from "./modules/offline/OfflineManager";
|
|
30
|
-
export type { OfflinePackStatus } from "./modules/offline/OfflinePack";
|
|
31
|
-
export { OfflinePack } from "./modules/offline/OfflinePack";
|
|
32
|
-
export { OfflineCreatePackOptions } from "./modules/offline/OfflineCreatePackOptions";
|
|
33
|
-
export { SnapshotManager } from "./modules/snapshot/SnapshotManager";
|
|
34
|
-
export type { SnapshotInputOptions } from "./modules/snapshot/SnapshotOptions";
|
|
35
|
-
export type { FillLayerStyle, LineLayerStyle, SymbolLayerStyle, CircleLayerStyle, HeatmapLayerStyle, FillExtrusionLayerStyle, RasterLayerStyle, HillshadeLayerStyle, BackgroundLayerStyle, LightLayerStyle, Expression, } from "./types/MapLibreRNStyles";
|
|
36
|
-
export type { MapLibreRNEvent } from "./types/MapLibreRNEvent";
|
|
37
|
-
export type { OnPressEvent } from "./types/OnPressEvent";
|
|
38
|
-
export { Animated } from "./utils/animated/Animated";
|
|
39
|
-
export { Logger, type LogLevel } from "./utils/Logger";
|
|
40
|
-
export type { MapLibrePluginProps } from "./plugin/MapLibrePluginProps";
|
|
41
|
-
//# sourceMappingURL=MapLibreRN.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MapLibreRN.d.ts","sourceRoot":"","sources":["../../../../src/MapLibreRN.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,UAAU,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,OAAO,EACP,KAAK,UAAU,EACf,KAAK,aAAa,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EACL,YAAY,EACZ,sBAAsB,GACvB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA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AC;AAC/D,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEvD,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { type ViewProps } from "react-native";
|
|
2
|
-
import { type BaseProps } from "../types/BaseProps";
|
|
3
|
-
import { CameraMode } from "../types/CameraMode";
|
|
4
|
-
import { type MapLibreRNEvent } from "../types/MapLibreRNEvent";
|
|
5
|
-
export declare const NATIVE_MODULE_NAME = "MLRNCamera";
|
|
6
|
-
export declare enum UserTrackingMode {
|
|
7
|
-
Follow = "normal",
|
|
8
|
-
FollowWithHeading = "compass",
|
|
9
|
-
FollowWithCourse = "course"
|
|
10
|
-
}
|
|
11
|
-
export type UserTrackingModeChangeCallback = (event: MapLibreRNEvent<"usertrackingmodechange", {
|
|
12
|
-
followUserLocation: boolean;
|
|
13
|
-
followUserMode: UserTrackingMode | null;
|
|
14
|
-
}>) => void;
|
|
15
|
-
export declare function getNativeCameraMode(mode?: CameraAnimationMode): CameraMode;
|
|
16
|
-
export interface CameraRef {
|
|
17
|
-
setCamera: (config: CameraStop | CameraStops) => void;
|
|
18
|
-
fitBounds: (ne: GeoJSON.Position, sw: GeoJSON.Position, paddingConfig?: number | number[], animationDuration?: number) => void;
|
|
19
|
-
flyTo: (coordinates: GeoJSON.Position, animationDuration?: number) => void;
|
|
20
|
-
moveTo: (coordinates: GeoJSON.Position, animationDuration?: number) => void;
|
|
21
|
-
zoomTo: (zoomLevel: number, animationDuration?: number) => void;
|
|
22
|
-
}
|
|
23
|
-
export interface CameraPadding {
|
|
24
|
-
/**
|
|
25
|
-
* Left padding in points
|
|
26
|
-
*/
|
|
27
|
-
paddingLeft?: number;
|
|
28
|
-
/**
|
|
29
|
-
* Right padding in points
|
|
30
|
-
*/
|
|
31
|
-
paddingRight?: number;
|
|
32
|
-
/**
|
|
33
|
-
* Top padding in points
|
|
34
|
-
*/
|
|
35
|
-
paddingTop?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Bottom padding in points
|
|
38
|
-
*/
|
|
39
|
-
paddingBottom?: number;
|
|
40
|
-
}
|
|
41
|
-
export interface CameraBounds {
|
|
42
|
-
/**
|
|
43
|
-
* North east coordinate of bound
|
|
44
|
-
*/
|
|
45
|
-
ne: number[];
|
|
46
|
-
/**
|
|
47
|
-
* South west coordinate of bound
|
|
48
|
-
*/
|
|
49
|
-
sw: number[];
|
|
50
|
-
}
|
|
51
|
-
interface CameraBoundsWithPadding extends CameraBounds, Partial<CameraPadding> {
|
|
52
|
-
}
|
|
53
|
-
export type CameraAnimationMode = "flyTo" | "easeTo" | "linearTo" | "moveTo";
|
|
54
|
-
export interface NativeCameraStop extends CameraPadding {
|
|
55
|
-
duration?: number;
|
|
56
|
-
mode?: CameraMode;
|
|
57
|
-
pitch?: number;
|
|
58
|
-
heading?: number;
|
|
59
|
-
zoom?: number;
|
|
60
|
-
centerCoordinate?: string;
|
|
61
|
-
bounds?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface CameraStop {
|
|
64
|
-
/** The location on which the map should center. */
|
|
65
|
-
centerCoordinate?: GeoJSON.Position;
|
|
66
|
-
/** The corners of a box around which the map should bound. Contains padding props for backwards
|
|
67
|
-
* compatibility; the root `padding` prop should be used instead. */
|
|
68
|
-
bounds?: CameraBoundsWithPadding;
|
|
69
|
-
/** The heading (orientation) of the map. */
|
|
70
|
-
heading?: number;
|
|
71
|
-
/** The pitch of the map. */
|
|
72
|
-
pitch?: number;
|
|
73
|
-
/** The zoom level of the map. */
|
|
74
|
-
zoomLevel?: number;
|
|
75
|
-
/** The viewport padding in points. */
|
|
76
|
-
padding?: CameraPadding;
|
|
77
|
-
/** The duration the map takes to animate to a new configuration. */
|
|
78
|
-
animationDuration?: number;
|
|
79
|
-
/** The easing or path the camera uses to animate to a new configuration. */
|
|
80
|
-
animationMode?: CameraAnimationMode;
|
|
81
|
-
}
|
|
82
|
-
export type CameraStops = {
|
|
83
|
-
stops: CameraStop[];
|
|
84
|
-
};
|
|
85
|
-
export interface CameraProps extends BaseProps, CameraStop {
|
|
86
|
-
/**
|
|
87
|
-
* Default view settings applied on camera
|
|
88
|
-
*/
|
|
89
|
-
defaultSettings?: CameraStop;
|
|
90
|
-
/**
|
|
91
|
-
* Minimum zoom level of the map
|
|
92
|
-
*/
|
|
93
|
-
minZoomLevel?: number;
|
|
94
|
-
/**
|
|
95
|
-
* Maximum zoom level of the map
|
|
96
|
-
*/
|
|
97
|
-
maxZoomLevel?: number;
|
|
98
|
-
/**
|
|
99
|
-
* Restrict map panning so that the center is within these bounds
|
|
100
|
-
*/
|
|
101
|
-
maxBounds?: CameraBounds;
|
|
102
|
-
/**
|
|
103
|
-
* Should the map orientation follow the user's.
|
|
104
|
-
*/
|
|
105
|
-
followUserLocation?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* 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.
|
|
108
|
-
*/
|
|
109
|
-
followUserMode?: UserTrackingMode;
|
|
110
|
-
/**
|
|
111
|
-
* The zoomLevel on map while followUserLocation is set to `true`
|
|
112
|
-
*/
|
|
113
|
-
followZoomLevel?: number;
|
|
114
|
-
/**
|
|
115
|
-
* The pitch on map while followUserLocation is set to `true`
|
|
116
|
-
*/
|
|
117
|
-
followPitch?: number;
|
|
118
|
-
/**
|
|
119
|
-
* The heading on map while followUserLocation is set to `true`
|
|
120
|
-
*/
|
|
121
|
-
followHeading?: number;
|
|
122
|
-
/**
|
|
123
|
-
* Triggered when `followUserLocation` or `followUserMode` changes
|
|
124
|
-
*/
|
|
125
|
-
onUserTrackingModeChange?: UserTrackingModeChangeCallback;
|
|
126
|
-
}
|
|
127
|
-
export interface NativeCameraProps extends Omit<CameraProps, "maxBounds">, ViewProps {
|
|
128
|
-
maxBounds?: string;
|
|
129
|
-
stop?: NativeCameraStop;
|
|
130
|
-
defaultStop?: NativeCameraStop;
|
|
131
|
-
}
|
|
132
|
-
export declare const Camera: import("react").NamedExoticComponent<CameraProps & import("react").RefAttributes<CameraRef>>;
|
|
133
|
-
export {};
|
|
134
|
-
//# sourceMappingURL=Camera.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Camera.d.ts","sourceRoot":"","sources":["../../../../../src/components/Camera.tsx"],"names":[],"mappings":"AASA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIhF,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhE,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAE/C,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,iBAAiB,YAAY;IAC7B,gBAAgB,WAAW;CAC5B;AAED,MAAM,MAAM,8BAA8B,GAAG,CAC3C,KAAK,EAAE,eAAe,CACpB,wBAAwB,EACxB;IACE,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACzC,CACF,KACE,IAAI,CAAC;AAEV,wBAAgB,mBAAmB,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,UAAU,CAa1E;AAiED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,WAAW,KAAK,IAAI,CAAC;IAEtD,SAAS,EAAE,CACT,EAAE,EAAE,OAAO,CAAC,QAAQ,EACpB,EAAE,EAAE,OAAO,CAAC,QAAQ,EACpB,a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