@maplibre/maplibre-react-native 10.1.5 → 11.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{maplibre-react-native.podspec → MapLibreReactNative.podspec} +15 -16
- package/android/build.gradle +89 -110
- package/android/gradle.properties +5 -5
- package/android/src/main/AndroidManifest.xml +1 -3
- package/android/src/main/java/org/maplibre/reactnative/MLRNPackage.kt +144 -0
- package/android/src/main/java/org/maplibre/reactnative/components/AbstractEventEmitter.java +1 -5
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNModule.java +0 -34
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNSnapshotModule.kt +128 -0
- package/ios/{MLRN/MLRNModule.m → MLRNModule.m} +0 -26
- package/ios/MLRNSnapshotModule/MLRNSnapshotModule.h +4 -0
- package/ios/MLRNSnapshotModule/MLRNSnapshotModule.mm +78 -0
- package/ios/{MLRN/MLRNUtils.h → MLRNUtils.h} +1 -2
- package/lib/commonjs/MLRNModule.js +1 -5
- package/lib/commonjs/MLRNModule.js.map +1 -1
- package/lib/commonjs/MapLibreRN.js +0 -21
- package/lib/commonjs/MapLibreRN.js.map +1 -1
- package/lib/commonjs/components/MapView.js +1 -1
- package/lib/commonjs/components/MapView.js.map +1 -1
- package/lib/commonjs/components/PointAnnotation.js +1 -1
- package/lib/commonjs/components/PointAnnotation.js.map +1 -1
- package/lib/commonjs/components/ShapeSource.js +1 -1
- package/lib/commonjs/components/ShapeSource.js.map +1 -1
- package/lib/commonjs/hooks/useNativeRef.js.map +1 -1
- package/lib/commonjs/index.js +4 -12
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/snapshot/NativeSnapshotModule.js +9 -0
- package/lib/commonjs/modules/snapshot/NativeSnapshotModule.js.map +1 -0
- package/lib/commonjs/modules/snapshot/SnapshotManager.js +2 -4
- package/lib/commonjs/modules/snapshot/SnapshotManager.js.map +1 -1
- package/lib/commonjs/modules/snapshot/SnapshotOptions.js +4 -4
- package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js +1 -7
- package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -1
- package/lib/module/MLRNModule.js +0 -2
- package/lib/module/MLRNModule.js.map +1 -1
- package/lib/module/MapLibreRN.js +3 -15
- package/lib/module/MapLibreRN.js.map +1 -1
- package/lib/module/components/MapView.js +1 -1
- package/lib/module/components/MapView.js.map +1 -1
- package/lib/module/components/PointAnnotation.js +1 -1
- package/lib/module/components/PointAnnotation.js.map +1 -1
- package/lib/module/components/ShapeSource.js +1 -1
- package/lib/module/components/ShapeSource.js.map +1 -1
- package/lib/module/hooks/useNativeRef.js.map +1 -1
- package/lib/module/index.js +0 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/snapshot/NativeSnapshotModule.js +5 -0
- package/lib/module/modules/snapshot/NativeSnapshotModule.js.map +1 -0
- package/lib/module/modules/snapshot/SnapshotManager.js +2 -3
- package/lib/module/modules/snapshot/SnapshotManager.js.map +1 -1
- package/lib/module/modules/snapshot/SnapshotOptions.js +4 -4
- package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js +1 -7
- package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.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 +3 -15
- package/lib/typescript/commonjs/src/MapLibreRN.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Camera.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/Camera.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/MapView.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/MapView.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/ShapeSource.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/UserLocation.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/UserLocation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/VectorSource.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts +1 -1
- package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +0 -5
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/snapshot/NativeSnapshotModule.d.ts +18 -0
- package/lib/typescript/commonjs/src/modules/snapshot/NativeSnapshotModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/snapshot/SnapshotManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts +5 -25
- package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +0 -4
- package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.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 +3 -15
- package/lib/typescript/module/src/MapLibreRN.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Camera.d.ts +1 -1
- package/lib/typescript/module/src/components/Camera.d.ts.map +1 -1
- package/lib/typescript/module/src/components/MapView.d.ts +1 -1
- package/lib/typescript/module/src/components/MapView.d.ts.map +1 -1
- package/lib/typescript/module/src/components/ShapeSource.d.ts +2 -2
- package/lib/typescript/module/src/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/module/src/components/UserLocation.d.ts +1 -1
- package/lib/typescript/module/src/components/UserLocation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/VectorSource.d.ts +1 -1
- package/lib/typescript/module/src/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useNativeRef.d.ts +1 -1
- package/lib/typescript/module/src/hooks/useNativeRef.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +0 -5
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/snapshot/NativeSnapshotModule.d.ts +18 -0
- package/lib/typescript/module/src/modules/snapshot/NativeSnapshotModule.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/snapshot/SnapshotManager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts +5 -25
- package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/Animated.d.ts +1 -1
- package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +0 -4
- package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -1
- package/package.json +20 -12
- package/src/MLRNModule.ts +0 -14
- package/src/MapLibreRN.ts +2 -18
- package/src/components/MapView.tsx +1 -1
- package/src/components/PointAnnotation.tsx +1 -1
- package/src/components/ShapeSource.tsx +2 -2
- package/src/hooks/useNativeRef.ts +3 -3
- package/src/index.ts +0 -6
- package/src/modules/snapshot/NativeSnapshotModule.ts +24 -0
- package/src/modules/snapshot/SnapshotManager.ts +3 -6
- package/src/modules/snapshot/SnapshotOptions.ts +10 -27
- package/src/utils/animated/AnimatedRouteCoordinatesArray.ts +1 -14
- package/android/src/main/AndroidManifestNew.xml +0 -5
- package/android/src/main/java/org/maplibre/reactnative/MLRNPackage.java +0 -90
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNSnapshotModule.java +0 -135
- package/ios/MLRN/MLRNSnapshotModule.h +0 -5
- package/ios/MLRN/MLRNSnapshotModule.m +0 -70
- package/ios/MLRN.xcodeproj/project.pbxproj +0 -1
- /package/ios/{MLRN/CameraMode.h → CameraMode.h} +0 -0
- /package/ios/{MLRN/CameraMode.m → CameraMode.m} +0 -0
- /package/ios/{MLRN/CameraStop.h → CameraStop.h} +0 -0
- /package/ios/{MLRN/CameraStop.m → CameraStop.m} +0 -0
- /package/ios/{MLRN/CameraUpdateItem.h → CameraUpdateItem.h} +0 -0
- /package/ios/{MLRN/CameraUpdateItem.m → CameraUpdateItem.m} +0 -0
- /package/ios/{MLRN/CameraUpdateQueue.h → CameraUpdateQueue.h} +0 -0
- /package/ios/{MLRN/CameraUpdateQueue.m → CameraUpdateQueue.m} +0 -0
- /package/ios/{MLRN/FilterParser.h → FilterParser.h} +0 -0
- /package/ios/{MLRN/FilterParser.m → FilterParser.m} +0 -0
- /package/ios/{MLRN/MLRN.h → MLRN.h} +0 -0
- /package/ios/{MLRN/MLRN.m → MLRN.m} +0 -0
- /package/ios/{MLRN/MLRNBackgroundLayer.h → MLRNBackgroundLayer.h} +0 -0
- /package/ios/{MLRN/MLRNBackgroundLayer.m → MLRNBackgroundLayer.m} +0 -0
- /package/ios/{MLRN/MLRNBackgroundLayerManager.h → MLRNBackgroundLayerManager.h} +0 -0
- /package/ios/{MLRN/MLRNBackgroundLayerManager.m → MLRNBackgroundLayerManager.m} +0 -0
- /package/ios/{MLRN/MLRNCallout.h → MLRNCallout.h} +0 -0
- /package/ios/{MLRN/MLRNCallout.m → MLRNCallout.m} +0 -0
- /package/ios/{MLRN/MLRNCalloutManager.h → MLRNCalloutManager.h} +0 -0
- /package/ios/{MLRN/MLRNCalloutManager.m → MLRNCalloutManager.m} +0 -0
- /package/ios/{MLRN/MLRNCamera.h → MLRNCamera.h} +0 -0
- /package/ios/{MLRN/MLRNCamera.m → MLRNCamera.m} +0 -0
- /package/ios/{MLRN/MLRNCameraManager.h → MLRNCameraManager.h} +0 -0
- /package/ios/{MLRN/MLRNCameraManager.m → MLRNCameraManager.m} +0 -0
- /package/ios/{MLRN/MLRNCircleLayer.h → MLRNCircleLayer.h} +0 -0
- /package/ios/{MLRN/MLRNCircleLayer.m → MLRNCircleLayer.m} +0 -0
- /package/ios/{MLRN/MLRNCircleLayerManager.h → MLRNCircleLayerManager.h} +0 -0
- /package/ios/{MLRN/MLRNCircleLayerManager.m → MLRNCircleLayerManager.m} +0 -0
- /package/ios/{MLRN/MLRNCustomHeaders.h → MLRNCustomHeaders.h} +0 -0
- /package/ios/{MLRN/MLRNCustomHeaders.m → MLRNCustomHeaders.m} +0 -0
- /package/ios/{MLRN/MLRNEvent.h → MLRNEvent.h} +0 -0
- /package/ios/{MLRN/MLRNEvent.m → MLRNEvent.m} +0 -0
- /package/ios/{MLRN/MLRNEventProtocol.h → MLRNEventProtocol.h} +0 -0
- /package/ios/{MLRN/MLRNEventTypes.h → MLRNEventTypes.h} +0 -0
- /package/ios/{MLRN/MLRNEventTypes.m → MLRNEventTypes.m} +0 -0
- /package/ios/{MLRN/MLRNFillExtrusionLayer.h → MLRNFillExtrusionLayer.h} +0 -0
- /package/ios/{MLRN/MLRNFillExtrusionLayer.m → MLRNFillExtrusionLayer.m} +0 -0
- /package/ios/{MLRN/MLRNFillExtrusionLayerManager.h → MLRNFillExtrusionLayerManager.h} +0 -0
- /package/ios/{MLRN/MLRNFillExtrusionLayerManager.m → MLRNFillExtrusionLayerManager.m} +0 -0
- /package/ios/{MLRN/MLRNFillLayer.h → MLRNFillLayer.h} +0 -0
- /package/ios/{MLRN/MLRNFillLayer.m → MLRNFillLayer.m} +0 -0
- /package/ios/{MLRN/MLRNFillLayerManager.h → MLRNFillLayerManager.h} +0 -0
- /package/ios/{MLRN/MLRNFillLayerManager.m → MLRNFillLayerManager.m} +0 -0
- /package/ios/{MLRN/MLRNHeatmapLayer.h → MLRNHeatmapLayer.h} +0 -0
- /package/ios/{MLRN/MLRNHeatmapLayer.m → MLRNHeatmapLayer.m} +0 -0
- /package/ios/{MLRN/MLRNHeatmapLayerManager.h → MLRNHeatmapLayerManager.h} +0 -0
- /package/ios/{MLRN/MLRNHeatmapLayerManager.m → MLRNHeatmapLayerManager.m} +0 -0
- /package/ios/{MLRN/MLRNImageQueue.h → MLRNImageQueue.h} +0 -0
- /package/ios/{MLRN/MLRNImageQueue.m → MLRNImageQueue.m} +0 -0
- /package/ios/{MLRN/MLRNImageQueueOperation.h → MLRNImageQueueOperation.h} +0 -0
- /package/ios/{MLRN/MLRNImageQueueOperation.m → MLRNImageQueueOperation.m} +0 -0
- /package/ios/{MLRN/MLRNImageSource.h → MLRNImageSource.h} +0 -0
- /package/ios/{MLRN/MLRNImageSource.m → MLRNImageSource.m} +0 -0
- /package/ios/{MLRN/MLRNImageSourceManager.h → MLRNImageSourceManager.h} +0 -0
- /package/ios/{MLRN/MLRNImageSourceManager.m → MLRNImageSourceManager.m} +0 -0
- /package/ios/{MLRN/MLRNImageUtils.h → MLRNImageUtils.h} +0 -0
- /package/ios/{MLRN/MLRNImageUtils.m → MLRNImageUtils.m} +0 -0
- /package/ios/{MLRN/MLRNImages.h → MLRNImages.h} +0 -0
- /package/ios/{MLRN/MLRNImages.m → MLRNImages.m} +0 -0
- /package/ios/{MLRN/MLRNImagesManager.h → MLRNImagesManager.h} +0 -0
- /package/ios/{MLRN/MLRNImagesManager.m → MLRNImagesManager.m} +0 -0
- /package/ios/{MLRN/MLRNLayer.h → MLRNLayer.h} +0 -0
- /package/ios/{MLRN/MLRNLayer.m → MLRNLayer.m} +0 -0
- /package/ios/{MLRN/MLRNLight.h → MLRNLight.h} +0 -0
- /package/ios/{MLRN/MLRNLight.m → MLRNLight.m} +0 -0
- /package/ios/{MLRN/MLRNLightManager.h → MLRNLightManager.h} +0 -0
- /package/ios/{MLRN/MLRNLightManager.m → MLRNLightManager.m} +0 -0
- /package/ios/{MLRN/MLRNLineLayer.h → MLRNLineLayer.h} +0 -0
- /package/ios/{MLRN/MLRNLineLayer.m → MLRNLineLayer.m} +0 -0
- /package/ios/{MLRN/MLRNLineLayerManager.h → MLRNLineLayerManager.h} +0 -0
- /package/ios/{MLRN/MLRNLineLayerManager.m → MLRNLineLayerManager.m} +0 -0
- /package/ios/{MLRN/MLRNLocation.h → MLRNLocation.h} +0 -0
- /package/ios/{MLRN/MLRNLocation.m → MLRNLocation.m} +0 -0
- /package/ios/{MLRN/MLRNLocationManager.h → MLRNLocationManager.h} +0 -0
- /package/ios/{MLRN/MLRNLocationManager.m → MLRNLocationManager.m} +0 -0
- /package/ios/{MLRN/MLRNLocationManagerDelegate.h → MLRNLocationManagerDelegate.h} +0 -0
- /package/ios/{MLRN/MLRNLocationModule.h → MLRNLocationModule.h} +0 -0
- /package/ios/{MLRN/MLRNLocationModule.m → MLRNLocationModule.m} +0 -0
- /package/ios/{MLRN/MLRNLogging.h → MLRNLogging.h} +0 -0
- /package/ios/{MLRN/MLRNLogging.m → MLRNLogging.m} +0 -0
- /package/ios/{MLRN/MLRNMapTouchEvent.h → MLRNMapTouchEvent.h} +0 -0
- /package/ios/{MLRN/MLRNMapTouchEvent.m → MLRNMapTouchEvent.m} +0 -0
- /package/ios/{MLRN/MLRNMapView.h → MLRNMapView.h} +0 -0
- /package/ios/{MLRN/MLRNMapView.m → MLRNMapView.m} +0 -0
- /package/ios/{MLRN/MLRNMapViewManager.h → MLRNMapViewManager.h} +0 -0
- /package/ios/{MLRN/MLRNMapViewManager.m → MLRNMapViewManager.m} +0 -0
- /package/ios/{MLRN/MLRNModule.h → MLRNModule.h} +0 -0
- /package/ios/{MLRN/MLRNNativeUserLocation.h → MLRNNativeUserLocation.h} +0 -0
- /package/ios/{MLRN/MLRNNativeUserLocation.m → MLRNNativeUserLocation.m} +0 -0
- /package/ios/{MLRN/MLRNNativeUserLocationManager.h → MLRNNativeUserLocationManager.h} +0 -0
- /package/ios/{MLRN/MLRNNativeUserLocationManager.m → MLRNNativeUserLocationManager.m} +0 -0
- /package/ios/{MLRN/MLRNOfflineModule.h → MLRNOfflineModule.h} +0 -0
- /package/ios/{MLRN/MLRNOfflineModule.m → MLRNOfflineModule.m} +0 -0
- /package/ios/{MLRN/MLRNPointAnnotation.h → MLRNPointAnnotation.h} +0 -0
- /package/ios/{MLRN/MLRNPointAnnotation.m → MLRNPointAnnotation.m} +0 -0
- /package/ios/{MLRN/MLRNPointAnnotationManager.h → MLRNPointAnnotationManager.h} +0 -0
- /package/ios/{MLRN/MLRNPointAnnotationManager.m → MLRNPointAnnotationManager.m} +0 -0
- /package/ios/{MLRN/MLRNRasterLayer.h → MLRNRasterLayer.h} +0 -0
- /package/ios/{MLRN/MLRNRasterLayer.m → MLRNRasterLayer.m} +0 -0
- /package/ios/{MLRN/MLRNRasterLayerManager.h → MLRNRasterLayerManager.h} +0 -0
- /package/ios/{MLRN/MLRNRasterLayerManager.m → MLRNRasterLayerManager.m} +0 -0
- /package/ios/{MLRN/MLRNRasterSource.h → MLRNRasterSource.h} +0 -0
- /package/ios/{MLRN/MLRNRasterSource.m → MLRNRasterSource.m} +0 -0
- /package/ios/{MLRN/MLRNRasterSourceManager.h → MLRNRasterSourceManager.h} +0 -0
- /package/ios/{MLRN/MLRNRasterSourceManager.m → MLRNRasterSourceManager.m} +0 -0
- /package/ios/{MLRN/MLRNShapeSource.h → MLRNShapeSource.h} +0 -0
- /package/ios/{MLRN/MLRNShapeSource.m → MLRNShapeSource.m} +0 -0
- /package/ios/{MLRN/MLRNShapeSourceManager.h → MLRNShapeSourceManager.h} +0 -0
- /package/ios/{MLRN/MLRNShapeSourceManager.m → MLRNShapeSourceManager.m} +0 -0
- /package/ios/{MLRN/MLRNSource.h → MLRNSource.h} +0 -0
- /package/ios/{MLRN/MLRNSource.m → MLRNSource.m} +0 -0
- /package/ios/{MLRN/MLRNStyle.h → MLRNStyle.h} +0 -0
- /package/ios/{MLRN/MLRNStyle.m → MLRNStyle.m} +0 -0
- /package/ios/{MLRN/MLRNStyleValue.h → MLRNStyleValue.h} +0 -0
- /package/ios/{MLRN/MLRNStyleValue.m → MLRNStyleValue.m} +0 -0
- /package/ios/{MLRN/MLRNSymbolLayer.h → MLRNSymbolLayer.h} +0 -0
- /package/ios/{MLRN/MLRNSymbolLayer.m → MLRNSymbolLayer.m} +0 -0
- /package/ios/{MLRN/MLRNSymbolLayerManager.h → MLRNSymbolLayerManager.h} +0 -0
- /package/ios/{MLRN/MLRNSymbolLayerManager.m → MLRNSymbolLayerManager.m} +0 -0
- /package/ios/{MLRN/MLRNTileSource.h → MLRNTileSource.h} +0 -0
- /package/ios/{MLRN/MLRNTileSource.m → MLRNTileSource.m} +0 -0
- /package/ios/{MLRN/MLRNUserLocation.h → MLRNUserLocation.h} +0 -0
- /package/ios/{MLRN/MLRNUserLocation.m → MLRNUserLocation.m} +0 -0
- /package/ios/{MLRN/MLRNUtils.m → MLRNUtils.m} +0 -0
- /package/ios/{MLRN/MLRNVectorLayer.h → MLRNVectorLayer.h} +0 -0
- /package/ios/{MLRN/MLRNVectorLayer.m → MLRNVectorLayer.m} +0 -0
- /package/ios/{MLRN/MLRNVectorSource.h → MLRNVectorSource.h} +0 -0
- /package/ios/{MLRN/MLRNVectorSource.m → MLRNVectorSource.m} +0 -0
- /package/ios/{MLRN/MLRNVectorSourceManager.h → MLRNVectorSourceManager.h} +0 -0
- /package/ios/{MLRN/MLRNVectorSourceManager.m → MLRNVectorSourceManager.m} +0 -0
- /package/ios/{MLRN/ViewManager.h → ViewManager.h} +0 -0
- /package/ios/{MLRN/ViewManager.m → ViewManager.m} +0 -0
package/src/index.ts
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { TurboModule } from "react-native";
|
|
2
|
+
import { TurboModuleRegistry } from "react-native";
|
|
3
|
+
|
|
4
|
+
export interface SnapshotJsonOptions {
|
|
5
|
+
centerCoordinate?: string;
|
|
6
|
+
zoomLevel?: number;
|
|
7
|
+
|
|
8
|
+
bounds?: string;
|
|
9
|
+
|
|
10
|
+
styleURL: string;
|
|
11
|
+
heading: number;
|
|
12
|
+
pitch: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
writeToDisk: boolean;
|
|
16
|
+
withLogo: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Spec extends TurboModule {
|
|
20
|
+
takeSnap(options: SnapshotJsonOptions): Promise<string>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const NativeSnapshotModule =
|
|
24
|
+
TurboModuleRegistry.getEnforcing<Spec>("MLRNSnapshotModule");
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { SnapshotOptions, type SnapshotInputOptions } from "./SnapshotOptions";
|
|
4
|
-
|
|
5
|
-
const MLRNSnapshotModule = NativeModules.MLRNSnapshotModule;
|
|
1
|
+
import { NativeSnapshotModule } from "./NativeSnapshotModule";
|
|
2
|
+
import { type SnapshotInputOptions, SnapshotOptions } from "./SnapshotOptions";
|
|
6
3
|
|
|
7
4
|
/**
|
|
8
5
|
* The SnapshotManager generates static raster images of the map.
|
|
@@ -53,7 +50,7 @@ class SnapshotManager {
|
|
|
53
50
|
async takeSnap(options: SnapshotInputOptions = {}): Promise<string> {
|
|
54
51
|
const snapshotOptions = new SnapshotOptions(options);
|
|
55
52
|
|
|
56
|
-
const uri = await
|
|
53
|
+
const uri = await NativeSnapshotModule.takeSnap(snapshotOptions.toJSON());
|
|
57
54
|
return uri;
|
|
58
55
|
}
|
|
59
56
|
}
|
|
@@ -1,37 +1,18 @@
|
|
|
1
1
|
import { featureCollection, point } from "@turf/helpers";
|
|
2
2
|
import { NativeModules } from "react-native";
|
|
3
3
|
|
|
4
|
+
import type { SnapshotJsonOptions } from "./NativeSnapshotModule";
|
|
4
5
|
import { toJSONString } from "../../utils";
|
|
5
6
|
|
|
6
7
|
const MLRNModule = NativeModules.MLRNModule;
|
|
7
8
|
|
|
8
|
-
export interface SnapshotInputOptions
|
|
9
|
+
export interface SnapshotInputOptions
|
|
10
|
+
extends Partial<Omit<SnapshotJsonOptions, "centerCoordinate" | "bounds">> {
|
|
9
11
|
centerCoordinate?: GeoJSON.Position;
|
|
10
12
|
bounds?: GeoJSON.Position[];
|
|
11
|
-
styleURL?: string;
|
|
12
|
-
heading?: number;
|
|
13
|
-
pitch?: number;
|
|
14
|
-
zoomLevel?: number;
|
|
15
|
-
width?: number;
|
|
16
|
-
height?: number;
|
|
17
|
-
writeToDisk?: boolean;
|
|
18
|
-
withLogo?: boolean;
|
|
19
13
|
}
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
centerCoordinate?: string;
|
|
23
|
-
bounds?: string;
|
|
24
|
-
styleURL: string;
|
|
25
|
-
heading: number;
|
|
26
|
-
pitch: number;
|
|
27
|
-
zoomLevel: number;
|
|
28
|
-
width: number;
|
|
29
|
-
height: number;
|
|
30
|
-
writeToDisk: boolean;
|
|
31
|
-
withLogo: boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export class SnapshotOptions {
|
|
15
|
+
export class SnapshotOptions implements SnapshotJsonOptions {
|
|
35
16
|
centerCoordinate?: string;
|
|
36
17
|
bounds?: string;
|
|
37
18
|
styleURL: string;
|
|
@@ -60,13 +41,13 @@ export class SnapshotOptions {
|
|
|
60
41
|
this.withLogo = options.withLogo === undefined ? true : options.withLogo;
|
|
61
42
|
|
|
62
43
|
if (options.centerCoordinate) {
|
|
63
|
-
this.centerCoordinate = this.
|
|
44
|
+
this.centerCoordinate = this.stringifyCenterCoordinate(
|
|
64
45
|
options.centerCoordinate,
|
|
65
46
|
);
|
|
66
47
|
}
|
|
67
48
|
|
|
68
49
|
if (options.bounds) {
|
|
69
|
-
this.bounds = this.
|
|
50
|
+
this.bounds = this.stringifyBounds(options.bounds);
|
|
70
51
|
}
|
|
71
52
|
}
|
|
72
53
|
|
|
@@ -85,11 +66,13 @@ export class SnapshotOptions {
|
|
|
85
66
|
};
|
|
86
67
|
}
|
|
87
68
|
|
|
88
|
-
|
|
69
|
+
private stringifyCenterCoordinate(
|
|
70
|
+
centerCoordinate: GeoJSON.Position,
|
|
71
|
+
): string {
|
|
89
72
|
return toJSONString(point(centerCoordinate));
|
|
90
73
|
}
|
|
91
74
|
|
|
92
|
-
|
|
75
|
+
private stringifyBounds(bounds: GeoJSON.Position[]): string {
|
|
93
76
|
const features = [];
|
|
94
77
|
|
|
95
78
|
for (const bound of bounds) {
|
|
@@ -26,11 +26,6 @@ interface AnimatedRouteToValue {
|
|
|
26
26
|
along: number;
|
|
27
27
|
units?: Units;
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated Use `end.units` in conjunction with `end.along` instead
|
|
32
|
-
*/
|
|
33
|
-
units?: Units;
|
|
34
29
|
}
|
|
35
30
|
|
|
36
31
|
interface AnimatedRouteState {
|
|
@@ -128,17 +123,9 @@ export class AnimatedRouteCoordinatesArray extends AbstractAnimatedCoordinates<
|
|
|
128
123
|
let to: number | undefined = undefined;
|
|
129
124
|
|
|
130
125
|
if ("along" in toValue.end) {
|
|
131
|
-
const { units } = toValue;
|
|
132
|
-
|
|
133
|
-
if (units !== undefined) {
|
|
134
|
-
console.warn(
|
|
135
|
-
"RouteCoordinatesArray: `toValue.units` is deprecated, use `toValue.end.units` instead.",
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
126
|
to =
|
|
140
127
|
length(fullRouteLineString) -
|
|
141
|
-
convertLength(toValue.end.along, toValue.end.units
|
|
128
|
+
convertLength(toValue.end.along, toValue.end.units);
|
|
142
129
|
} else {
|
|
143
130
|
const nearest = nearestPointOnLine(
|
|
144
131
|
fullRouteLineString,
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
package org.maplibre.reactnative;
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.ReactPackage;
|
|
4
|
-
import com.facebook.react.bridge.JavaScriptModule;
|
|
5
|
-
import com.facebook.react.bridge.NativeModule;
|
|
6
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
7
|
-
import com.facebook.react.uimanager.ViewManager;
|
|
8
|
-
|
|
9
|
-
import java.util.ArrayList;
|
|
10
|
-
import java.util.Collections;
|
|
11
|
-
import java.util.List;
|
|
12
|
-
|
|
13
|
-
import org.maplibre.reactnative.components.annotation.MLRNCalloutManager;
|
|
14
|
-
import org.maplibre.reactnative.components.annotation.MLRNPointAnnotationManager;
|
|
15
|
-
import org.maplibre.reactnative.components.annotation.MLRNMarkerViewManager;
|
|
16
|
-
import org.maplibre.reactnative.components.camera.MLRNCameraManager;
|
|
17
|
-
import org.maplibre.reactnative.components.images.MLRNImagesManager;
|
|
18
|
-
import org.maplibre.reactnative.components.location.MLRNNativeUserLocationManager;
|
|
19
|
-
import org.maplibre.reactnative.components.mapview.MLRNMapViewManager;
|
|
20
|
-
import org.maplibre.reactnative.components.mapview.MLRNAndroidTextureMapViewManager;
|
|
21
|
-
import org.maplibre.reactnative.components.styles.layers.MLRNBackgroundLayerManager;
|
|
22
|
-
import org.maplibre.reactnative.components.styles.layers.MLRNCircleLayerManager;
|
|
23
|
-
import org.maplibre.reactnative.components.styles.layers.MLRNFillExtrusionLayerManager;
|
|
24
|
-
import org.maplibre.reactnative.components.styles.layers.MLRNFillLayerManager;
|
|
25
|
-
import org.maplibre.reactnative.components.styles.layers.MLRNHeatmapLayerManager;
|
|
26
|
-
import org.maplibre.reactnative.components.styles.layers.MLRNLineLayerManager;
|
|
27
|
-
import org.maplibre.reactnative.components.styles.layers.MLRNRasterLayerManager;
|
|
28
|
-
import org.maplibre.reactnative.components.styles.layers.MLRNSymbolLayerManager;
|
|
29
|
-
import org.maplibre.reactnative.components.styles.light.MLRNLightManager;
|
|
30
|
-
import org.maplibre.reactnative.components.styles.sources.MLRNImageSourceManager;
|
|
31
|
-
import org.maplibre.reactnative.components.styles.sources.MLRNRasterSourceManager;
|
|
32
|
-
import org.maplibre.reactnative.components.styles.sources.MLRNShapeSourceManager;
|
|
33
|
-
import org.maplibre.reactnative.components.styles.sources.MLRNVectorSourceManager;
|
|
34
|
-
import org.maplibre.reactnative.modules.MLRNLocationModule;
|
|
35
|
-
import org.maplibre.reactnative.modules.MLRNLogging;
|
|
36
|
-
import org.maplibre.reactnative.modules.MLRNModule;
|
|
37
|
-
import org.maplibre.reactnative.modules.MLRNOfflineModule;
|
|
38
|
-
import org.maplibre.reactnative.modules.MLRNSnapshotModule;
|
|
39
|
-
|
|
40
|
-
public class MLRNPackage implements ReactPackage {
|
|
41
|
-
|
|
42
|
-
@Override
|
|
43
|
-
public List<NativeModule> createNativeModules(ReactApplicationContext reactApplicationContext) {
|
|
44
|
-
List<NativeModule> modules = new ArrayList<>();
|
|
45
|
-
|
|
46
|
-
modules.add(new MLRNModule(reactApplicationContext));
|
|
47
|
-
modules.add(new MLRNOfflineModule(reactApplicationContext));
|
|
48
|
-
modules.add(new MLRNSnapshotModule(reactApplicationContext));
|
|
49
|
-
modules.add(new MLRNLocationModule(reactApplicationContext));
|
|
50
|
-
modules.add(new MLRNLogging(reactApplicationContext));
|
|
51
|
-
|
|
52
|
-
return modules;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@Override
|
|
56
|
-
public List<ViewManager> createViewManagers(ReactApplicationContext reactApplicationContext) {
|
|
57
|
-
List<ViewManager> managers = new ArrayList<>();
|
|
58
|
-
|
|
59
|
-
// components
|
|
60
|
-
managers.add(new MLRNCameraManager(reactApplicationContext));
|
|
61
|
-
managers.add(new MLRNMapViewManager(reactApplicationContext));
|
|
62
|
-
managers.add(new MLRNMarkerViewManager(reactApplicationContext));
|
|
63
|
-
managers.add(new MLRNAndroidTextureMapViewManager(reactApplicationContext));
|
|
64
|
-
managers.add(new MLRNLightManager());
|
|
65
|
-
managers.add(new MLRNPointAnnotationManager(reactApplicationContext));
|
|
66
|
-
managers.add(new MLRNCalloutManager());
|
|
67
|
-
managers.add(new MLRNNativeUserLocationManager());
|
|
68
|
-
|
|
69
|
-
// sources
|
|
70
|
-
managers.add(new MLRNVectorSourceManager(reactApplicationContext));
|
|
71
|
-
managers.add(new MLRNShapeSourceManager(reactApplicationContext));
|
|
72
|
-
managers.add(new MLRNRasterSourceManager(reactApplicationContext));
|
|
73
|
-
managers.add(new MLRNImageSourceManager());
|
|
74
|
-
|
|
75
|
-
// images
|
|
76
|
-
managers.add(new MLRNImagesManager(reactApplicationContext));
|
|
77
|
-
|
|
78
|
-
// layers
|
|
79
|
-
managers.add(new MLRNFillLayerManager());
|
|
80
|
-
managers.add(new MLRNFillExtrusionLayerManager());
|
|
81
|
-
managers.add(new MLRNHeatmapLayerManager());
|
|
82
|
-
managers.add(new MLRNLineLayerManager());
|
|
83
|
-
managers.add(new MLRNCircleLayerManager());
|
|
84
|
-
managers.add(new MLRNSymbolLayerManager());
|
|
85
|
-
managers.add(new MLRNRasterLayerManager());
|
|
86
|
-
managers.add(new MLRNBackgroundLayerManager());
|
|
87
|
-
|
|
88
|
-
return managers;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
package org.maplibre.reactnative.modules;
|
|
2
|
-
|
|
3
|
-
import android.content.Context;
|
|
4
|
-
import android.content.pm.PackageManager;
|
|
5
|
-
import android.graphics.Bitmap;
|
|
6
|
-
import android.net.Uri;
|
|
7
|
-
import android.os.AsyncTask;
|
|
8
|
-
import android.os.Handler;
|
|
9
|
-
import android.os.Looper;
|
|
10
|
-
import android.util.Base64;
|
|
11
|
-
import android.util.Log;
|
|
12
|
-
|
|
13
|
-
import com.facebook.react.bridge.Promise;
|
|
14
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
15
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
16
|
-
import com.facebook.react.bridge.ReactMethod;
|
|
17
|
-
import com.facebook.react.bridge.ReadableMap;
|
|
18
|
-
import com.facebook.react.module.annotations.ReactModule;
|
|
19
|
-
import org.maplibre.geojson.Feature;
|
|
20
|
-
import org.maplibre.geojson.FeatureCollection;
|
|
21
|
-
import org.maplibre.geojson.Point;
|
|
22
|
-
import org.maplibre.android.camera.CameraPosition;
|
|
23
|
-
import org.maplibre.android.snapshotter.MapSnapshot;
|
|
24
|
-
import org.maplibre.android.snapshotter.MapSnapshotter;
|
|
25
|
-
import org.maplibre.android.storage.FileSource;
|
|
26
|
-
import org.maplibre.reactnative.utils.BitmapUtils;
|
|
27
|
-
import org.maplibre.reactnative.utils.GeoJSONUtils;
|
|
28
|
-
|
|
29
|
-
import java.io.IOException;
|
|
30
|
-
import java.io.OutputStream;
|
|
31
|
-
import java.util.HashMap;
|
|
32
|
-
import java.util.Map;
|
|
33
|
-
import java.util.UUID;
|
|
34
|
-
|
|
35
|
-
import static android.content.Context.CONTEXT_IGNORE_SECURITY;
|
|
36
|
-
|
|
37
|
-
@ReactModule(name = MLRNSnapshotModule.REACT_CLASS)
|
|
38
|
-
public class MLRNSnapshotModule extends ReactContextBaseJavaModule {
|
|
39
|
-
public static final String REACT_CLASS = "MLRNSnapshotModule";
|
|
40
|
-
|
|
41
|
-
private ReactApplicationContext mContext;
|
|
42
|
-
|
|
43
|
-
// prevents snapshotter from being GC'ed
|
|
44
|
-
private Map<String, MapSnapshotter> mSnapshotterMap;
|
|
45
|
-
|
|
46
|
-
public MLRNSnapshotModule(ReactApplicationContext reactContext) {
|
|
47
|
-
super(reactContext);
|
|
48
|
-
mContext = reactContext;
|
|
49
|
-
mSnapshotterMap = new HashMap<>();
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@Override
|
|
53
|
-
public String getName() {
|
|
54
|
-
return REACT_CLASS;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@ReactMethod
|
|
58
|
-
public void takeSnap(final ReadableMap jsOptions, final Promise promise) {
|
|
59
|
-
FileSource.getInstance(mContext).activate();
|
|
60
|
-
|
|
61
|
-
mContext.runOnUiQueueThread(new Runnable() {
|
|
62
|
-
@Override
|
|
63
|
-
public void run() {
|
|
64
|
-
final String snapshotterID = UUID.randomUUID().toString();
|
|
65
|
-
final MapSnapshotter snapshotter = new MapSnapshotter(mContext, getOptions(jsOptions));
|
|
66
|
-
mSnapshotterMap.put(snapshotterID, snapshotter);
|
|
67
|
-
|
|
68
|
-
snapshotter.start(new MapSnapshotter.SnapshotReadyCallback() {
|
|
69
|
-
@Override
|
|
70
|
-
public void onSnapshotReady(MapSnapshot snapshot) {
|
|
71
|
-
Bitmap bitmap = snapshot.getBitmap();
|
|
72
|
-
|
|
73
|
-
String result = null;
|
|
74
|
-
if (jsOptions.getBoolean("writeToDisk")) {
|
|
75
|
-
result = BitmapUtils.createTempFile(mContext, bitmap);
|
|
76
|
-
} else {
|
|
77
|
-
result = BitmapUtils.createBase64(bitmap);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (result == null) {
|
|
81
|
-
promise.reject(REACT_CLASS, "Could not generate snapshot, please check Android logs for more info.");
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
promise.resolve(result);
|
|
86
|
-
mSnapshotterMap.remove(snapshotterID);
|
|
87
|
-
}
|
|
88
|
-
}, new MapSnapshotter.ErrorHandler() {
|
|
89
|
-
@Override
|
|
90
|
-
public void onError(String error) {
|
|
91
|
-
Log.w(REACT_CLASS, error);
|
|
92
|
-
mSnapshotterMap.remove(snapshotterID);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
private MapSnapshotter.Options getOptions(ReadableMap jsOptions) {
|
|
100
|
-
MapSnapshotter.Options options = new MapSnapshotter.Options(
|
|
101
|
-
(int) jsOptions.getDouble("width"),
|
|
102
|
-
(int) jsOptions.getDouble("height"));
|
|
103
|
-
|
|
104
|
-
options.withLogo(jsOptions.getBoolean("withLogo"));
|
|
105
|
-
options.withStyle(jsOptions.getString("styleURL"));
|
|
106
|
-
options.withPixelRatio(Float.valueOf(mContext.getResources().getDisplayMetrics().scaledDensity).intValue());
|
|
107
|
-
|
|
108
|
-
if (jsOptions.hasKey("bounds")) {
|
|
109
|
-
FeatureCollection bounds = FeatureCollection.fromJson(jsOptions.getString("bounds"));
|
|
110
|
-
options.withRegion(GeoJSONUtils.toLatLngBounds(bounds));
|
|
111
|
-
} else {
|
|
112
|
-
Feature centerPoint = Feature.fromJson(jsOptions.getString("centerCoordinate"));
|
|
113
|
-
CameraPosition cameraPosition = new CameraPosition.Builder()
|
|
114
|
-
.target(GeoJSONUtils.toLatLng((Point) centerPoint.geometry()))
|
|
115
|
-
.tilt(jsOptions.getDouble("pitch"))
|
|
116
|
-
.bearing(jsOptions.getDouble("heading"))
|
|
117
|
-
.zoom(jsOptions.getDouble("zoomLevel"))
|
|
118
|
-
.build();
|
|
119
|
-
options.withCameraPosition(cameraPosition);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
return options;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
private void closeSnapshotOutputStream(OutputStream outputStream) {
|
|
126
|
-
if (outputStream == null) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
try {
|
|
130
|
-
outputStream.close();
|
|
131
|
-
} catch (IOException e) {
|
|
132
|
-
Log.w(REACT_CLASS, e.getLocalizedMessage());
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
#import "MLRNSnapshotModule.h"
|
|
2
|
-
#import "MLRNImageUtils.h"
|
|
3
|
-
#import "MLRNUtils.h"
|
|
4
|
-
@import MapLibre;
|
|
5
|
-
|
|
6
|
-
@implementation MLRNSnapshotModule
|
|
7
|
-
|
|
8
|
-
RCT_EXPORT_MODULE()
|
|
9
|
-
|
|
10
|
-
+ (BOOL)requiresMainQueueSetup {
|
|
11
|
-
return YES;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
RCT_EXPORT_METHOD(takeSnap : (NSDictionary *)jsOptions resolver : (RCTPromiseResolveBlock)
|
|
15
|
-
resolve rejecter : (RCTPromiseRejectBlock)reject) {
|
|
16
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
17
|
-
MLNMapSnapshotOptions *options = [self _getOptions:jsOptions];
|
|
18
|
-
__block MLNMapSnapshotter *snapshotter = [[MLNMapSnapshotter alloc] initWithOptions:options];
|
|
19
|
-
|
|
20
|
-
[snapshotter
|
|
21
|
-
startWithCompletionHandler:^(MLNMapSnapshot *_Nullable snapshot, NSError *_Nullable err) {
|
|
22
|
-
if (err != nil) {
|
|
23
|
-
reject(@"takeSnap", @"Could not create snapshot", err);
|
|
24
|
-
snapshotter = nil;
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
NSString *result = nil;
|
|
29
|
-
if ([jsOptions[@"writeToDisk"] boolValue]) {
|
|
30
|
-
result = [MLRNImageUtils createTempFile:snapshot.image];
|
|
31
|
-
} else {
|
|
32
|
-
result = [MLRNImageUtils createBase64:snapshot.image];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
resolve(result);
|
|
36
|
-
snapshotter = nil;
|
|
37
|
-
}];
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
- (MLNMapSnapshotOptions *)_getOptions:(NSDictionary *)jsOptions {
|
|
42
|
-
MLNMapCamera *camera = [[MLNMapCamera alloc] init];
|
|
43
|
-
|
|
44
|
-
camera.pitch = [jsOptions[@"pitch"] doubleValue];
|
|
45
|
-
camera.heading = [jsOptions[@"heading"] doubleValue];
|
|
46
|
-
|
|
47
|
-
if (jsOptions[@"centerCoordinate"] != nil) {
|
|
48
|
-
camera.centerCoordinate = [MLRNUtils fromFeature:jsOptions[@"centerCoordinate"]];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
NSNumber *width = jsOptions[@"width"];
|
|
52
|
-
NSNumber *height = jsOptions[@"height"];
|
|
53
|
-
CGSize size = CGSizeMake([width doubleValue], [height doubleValue]);
|
|
54
|
-
|
|
55
|
-
MLNMapSnapshotOptions *options =
|
|
56
|
-
[[MLNMapSnapshotOptions alloc] initWithStyleURL:[NSURL URLWithString:jsOptions[@"styleURL"]]
|
|
57
|
-
camera:camera
|
|
58
|
-
size:size];
|
|
59
|
-
if (jsOptions[@"zoomLevel"] != nil) {
|
|
60
|
-
options.zoomLevel = [jsOptions[@"zoomLevel"] doubleValue];
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (jsOptions[@"bounds"] != nil) {
|
|
64
|
-
options.coordinateBounds = [MLRNUtils fromFeatureCollection:jsOptions[@"bounds"]];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return options;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
https://github.com/rnmapbox/maps/issues/2254
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|