@mapvina-com/mapvina-react-native 1.0.0
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/LICENSE.md +9 -0
- package/MapVinaReactNative.podspec +96 -0
- package/README.md +47 -0
- package/android/build.gradle +139 -0
- package/android/gradle.properties +16 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/java/io/github/mapvina/reactnative/MLRNPackage.kt +163 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/AbstractEvent.kt +20 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/AbstractEventEmitter.kt +80 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/AbstractMapFeature.kt +13 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/annotations/callout/MLRNCallout.kt +8 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/annotations/callout/MLRNCalloutManager.kt +26 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/annotations/markerview/MLRNMarkerView.kt +245 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/annotations/markerview/MLRNMarkerViewContent.kt +46 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/annotations/markerview/MLRNMarkerViewManager.kt +104 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/annotations/markerview/MarkerViewManager.kt +143 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/annotations/pointannotation/MLRNPointAnnotation.kt +449 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/annotations/pointannotation/MLRNPointAnnotationManager.kt +133 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/camera/CameraStop.kt +223 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/camera/CameraUpdateItem.kt +100 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/camera/CameraUpdateQueue.kt +58 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/camera/MLRNCamera.kt +411 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/camera/MLRNCameraManager.kt +84 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/camera/MLRNCameraModule.kt +36 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/camera/constants/CameraEasing.kt +23 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/images/MLRNImages.kt +172 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/images/MLRNImagesManager.kt +73 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/layer/MLRNLayer.kt +370 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/layer/MLRNLayerManager.kt +105 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/layer/style/MLRNStyle.kt +60 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/layer/style/MLRNStyleFactory.kt +3057 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/layer/style/MLRNStyleValue.kt +159 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/location/LocationComponentManager.kt +174 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/location/MLRNNativeUserLocation.kt +75 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/location/MLRNNativeUserLocationManager.kt +50 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/mapview/MLRNAndroidTextureMapView.kt +25 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/mapview/MLRNAndroidTextureMapViewManager.kt +25 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/mapview/MLRNMapView.kt +1514 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/mapview/MLRNMapViewManager.kt +280 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/mapview/MLRNMapViewModule.kt +202 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/mapview/helpers/CameraChangeTracker.kt +26 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/mapview/helpers/LayerSourceInfo.kt +76 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/MLRNPressableSource.kt +61 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/MLRNSource.kt +198 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/MLRNSourceManager.kt +69 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/geojsonsource/ClusterPropertyEntry.kt +8 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/geojsonsource/MLRNGeoJSONSource.kt +212 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/geojsonsource/MLRNGeoJSONSourceManager.kt +159 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/geojsonsource/MLRNGeoJSONSourceModule.kt +74 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/imagesource/MLRNImageSource.kt +58 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/imagesource/MLRNImageSourceManager.kt +38 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/tilesources/MLRNPressableTileSource.kt +20 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/tilesources/MLRNTileSource.kt +20 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/tilesources/MLRNTileSourceManager.kt +66 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/tilesources/TileSourceInterface.kt +50 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/tilesources/rasterdemsource/MLRNRasterDEMSource.kt +28 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/tilesources/rasterdemsource/MLRNRasterDEMSourceManager.kt +34 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/tilesources/rastersource/MLRNRasterSource.kt +23 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/tilesources/rastersource/MLRNRasterSourceManager.kt +26 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/tilesources/vectorsource/MLRNVectorSource.kt +37 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/tilesources/vectorsource/MLRNVectorSourceManager.kt +17 -0
- package/android/src/main/java/io/github/mapvina/reactnative/components/sources/tilesources/vectorsource/MLRNVectorSourceModule.kt +44 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/AbstractEvent.java +59 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/EventEmitter.java +45 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/IEvent.java +14 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/MapChangeEvent.kt +16 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/MapClickEvent.java +51 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/MapPressEvent.kt +30 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/MapPressEventWithFeatures.kt +21 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/OfflineEvent.java +25 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/PointAnnotationClickEvent.java +40 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/PointAnnotationDragEvent.java +49 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/PointAnnotationEvent.kt +32 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/constants/EventKeys.java +22 -0
- package/android/src/main/java/io/github/mapvina/reactnative/events/constants/EventTypes.java +27 -0
- package/android/src/main/java/io/github/mapvina/reactnative/location/LocationManager.kt +167 -0
- package/android/src/main/java/io/github/mapvina/reactnative/location/TrackUserLocationMode.kt +39 -0
- package/android/src/main/java/io/github/mapvina/reactnative/location/TrackUserLocationState.kt +15 -0
- package/android/src/main/java/io/github/mapvina/reactnative/location/UserLocation.kt +42 -0
- package/android/src/main/java/io/github/mapvina/reactnative/location/engine/DefaultLocationEngineProvider.kt +18 -0
- package/android/src/main/java/io/github/mapvina/reactnative/location/engine/LocationEngineProvidable.kt +8 -0
- package/android/src/main/java/io/github/mapvina/reactnative/modules/MLRNLocationModule.kt +179 -0
- package/android/src/main/java/io/github/mapvina/reactnative/modules/MLRNLogModule.kt +141 -0
- package/android/src/main/java/io/github/mapvina/reactnative/modules/MLRNNetworkModule.kt +25 -0
- package/android/src/main/java/io/github/mapvina/reactnative/modules/MLRNOfflineModule.kt +661 -0
- package/android/src/main/java/io/github/mapvina/reactnative/modules/MLRNStaticMapModule.kt +121 -0
- package/android/src/main/java/io/github/mapvina/reactnative/modules/MLRNTransformRequestModule.kt +144 -0
- package/android/src/main/java/io/github/mapvina/reactnative/modules/TransformRequestInterceptor.kt +184 -0
- package/android/src/main/java/io/github/mapvina/reactnative/utils/BitmapUtils.java +125 -0
- package/android/src/main/java/io/github/mapvina/reactnative/utils/ConvertUtils.kt +225 -0
- package/android/src/main/java/io/github/mapvina/reactnative/utils/DownloadMapImageTask.java +155 -0
- package/android/src/main/java/io/github/mapvina/reactnative/utils/DownloadedImage.java +6 -0
- package/android/src/main/java/io/github/mapvina/reactnative/utils/ExpressionParser.kt +67 -0
- package/android/src/main/java/io/github/mapvina/reactnative/utils/GeoJSONUtils.kt +368 -0
- package/android/src/main/java/io/github/mapvina/reactnative/utils/GeoViewport.java +37 -0
- package/android/src/main/java/io/github/mapvina/reactnative/utils/ImageEntry.kt +14 -0
- package/android/src/main/java/io/github/mapvina/reactnative/utils/ReactTagResolver.kt +91 -0
- package/android/src/main/java/io/github/mapvina/reactnative/utils/ResourceUtils.java +26 -0
- package/android/src/main/java/io/github/mapvina/reactnative/utils/SphericalMercator.java +68 -0
- package/android/src/main/location-engine-default/io/github/mapvina/reactnative/location/engine/LocationEngineProvider.kt +8 -0
- package/android/src/main/location-engine-google/io/github/mapvina/reactnative/location/engine/GoogleLocationEngineImpl.kt +142 -0
- package/android/src/main/location-engine-google/io/github/mapvina/reactnative/location/engine/GoogleLocationEngineProvider.kt +29 -0
- package/android/src/main/location-engine-google/io/github/mapvina/reactnative/location/engine/LocationEngineProvider.kt +8 -0
- package/android/src/main/res/drawable/empty.xml +5 -0
- package/android/src/main/res/drawable/empty_drawable.png +0 -0
- package/android/src/main/res/drawable-xxhdpi/default_marker.png +0 -0
- package/app.plugin.js +1 -0
- package/ios/components/ViewManager.h +8 -0
- package/ios/components/ViewManager.m +49 -0
- package/ios/components/annotations/callout/MLRNCallout.h +7 -0
- package/ios/components/annotations/callout/MLRNCallout.m +67 -0
- package/ios/components/annotations/callout/MLRNCalloutComponentView.h +10 -0
- package/ios/components/annotations/callout/MLRNCalloutComponentView.mm +85 -0
- package/ios/components/annotations/point-annotation/MLRNPointAnnotation.h +45 -0
- package/ios/components/annotations/point-annotation/MLRNPointAnnotation.m +319 -0
- package/ios/components/annotations/point-annotation/MLRNPointAnnotationComponentView.h +10 -0
- package/ios/components/annotations/point-annotation/MLRNPointAnnotationComponentView.mm +327 -0
- package/ios/components/camera/CameraEasing.h +8 -0
- package/ios/components/camera/CameraStop.h +22 -0
- package/ios/components/camera/CameraStop.m +75 -0
- package/ios/components/camera/CameraUpdateItem.h +11 -0
- package/ios/components/camera/CameraUpdateItem.m +167 -0
- package/ios/components/camera/CameraUpdateQueue.h +13 -0
- package/ios/components/camera/CameraUpdateQueue.m +62 -0
- package/ios/components/camera/MLRNCamera.h +26 -0
- package/ios/components/camera/MLRNCamera.m +195 -0
- package/ios/components/camera/MLRNCameraComponentView.h +10 -0
- package/ios/components/camera/MLRNCameraComponentView.mm +201 -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 +101 -0
- package/ios/components/images/MLRNImageLoader.h +27 -0
- package/ios/components/images/MLRNImageLoader.m +85 -0
- package/ios/components/images/MLRNImageQueue.h +15 -0
- package/ios/components/images/MLRNImageQueue.m +48 -0
- package/ios/components/images/MLRNImageQueueOperation.h +11 -0
- package/ios/components/images/MLRNImageQueueOperation.m +138 -0
- package/ios/components/images/MLRNImages.h +26 -0
- package/ios/components/images/MLRNImages.m +189 -0
- package/ios/components/images/MLRNImagesComponentView.h +9 -0
- package/ios/components/images/MLRNImagesComponentView.mm +104 -0
- package/ios/components/images/MLRNImagesModule.h +6 -0
- package/ios/components/images/MLRNImagesModule.mm +23 -0
- package/ios/components/layer/MLRNLayer.h +54 -0
- package/ios/components/layer/MLRNLayer.m +348 -0
- package/ios/components/layer/MLRNLayerComponentView.h +9 -0
- package/ios/components/layer/MLRNLayerComponentView.mm +136 -0
- package/ios/components/layer/style/MLRNStyle.h +224 -0
- package/ios/components/layer/style/MLRNStyle.m +1627 -0
- package/ios/components/layer/style/MLRNStyleValue.h +20 -0
- package/ios/components/layer/style/MLRNStyleValue.m +172 -0
- package/ios/components/map-view/MLRNMapTouchEvent.h +18 -0
- package/ios/components/map-view/MLRNMapTouchEvent.m +78 -0
- package/ios/components/map-view/MLRNMapView.h +119 -0
- package/ios/components/map-view/MLRNMapView.m +905 -0
- package/ios/components/map-view/MLRNMapViewComponentView.h +13 -0
- package/ios/components/map-view/MLRNMapViewComponentView.mm +430 -0
- package/ios/components/map-view/MLRNMapViewManager.h +70 -0
- package/ios/components/map-view/MLRNMapViewManager.m +152 -0
- package/ios/components/map-view/MLRNMapViewModule.h +4 -0
- package/ios/components/map-view/MLRNMapViewModule.mm +248 -0
- package/ios/components/sources/MLRNSource.h +28 -0
- package/ios/components/sources/MLRNSource.m +129 -0
- package/ios/components/sources/geojson-source/MLRNGeoJSONSource.h +32 -0
- package/ios/components/sources/geojson-source/MLRNGeoJSONSource.m +146 -0
- package/ios/components/sources/geojson-source/MLRNGeoJSONSourceComponentView.h +9 -0
- package/ios/components/sources/geojson-source/MLRNGeoJSONSourceComponentView.mm +168 -0
- package/ios/components/sources/geojson-source/MLRNGeoJSONSourceModule.h +4 -0
- package/ios/components/sources/geojson-source/MLRNGeoJSONSourceModule.mm +136 -0
- package/ios/components/sources/image-source/MLRNImageSource.h +8 -0
- package/ios/components/sources/image-source/MLRNImageSource.m +41 -0
- package/ios/components/sources/image-source/MLRNImageSourceComponentView.h +9 -0
- package/ios/components/sources/image-source/MLRNImageSourceComponentView.mm +95 -0
- package/ios/components/sources/tile-sources/MLRNTileSource.h +18 -0
- package/ios/components/sources/tile-sources/MLRNTileSource.m +26 -0
- package/ios/components/sources/tile-sources/raster-dem-source/MLRNRasterDEMSource.h +10 -0
- package/ios/components/sources/tile-sources/raster-dem-source/MLRNRasterDEMSource.m +39 -0
- package/ios/components/sources/tile-sources/raster-dem-source/MLRNRasterDEMSourceComponentView.h +9 -0
- package/ios/components/sources/tile-sources/raster-dem-source/MLRNRasterDEMSourceComponentView.mm +131 -0
- package/ios/components/sources/tile-sources/raster-source/MLRNRasterSource.h +9 -0
- package/ios/components/sources/tile-sources/raster-source/MLRNRasterSource.m +31 -0
- package/ios/components/sources/tile-sources/raster-source/MLRNRasterSourceComponentView.h +9 -0
- package/ios/components/sources/tile-sources/raster-source/MLRNRasterSourceComponentView.mm +129 -0
- package/ios/components/sources/tile-sources/vector-source/MLRNVectorSource.h +11 -0
- package/ios/components/sources/tile-sources/vector-source/MLRNVectorSource.m +23 -0
- package/ios/components/sources/tile-sources/vector-source/MLRNVectorSourceComponentView.h +9 -0
- package/ios/components/sources/tile-sources/vector-source/MLRNVectorSourceComponentView.mm +162 -0
- package/ios/components/sources/tile-sources/vector-source/MLRNVectorSourceModule.h +4 -0
- package/ios/components/sources/tile-sources/vector-source/MLRNVectorSourceModule.mm +65 -0
- package/ios/components/user-location/MLRNNativeUserLocation.h +11 -0
- package/ios/components/user-location/MLRNNativeUserLocation.m +38 -0
- package/ios/components/user-location/MLRNNativeUserLocationComponentView.h +10 -0
- package/ios/components/user-location/MLRNNativeUserLocationComponentView.mm +51 -0
- package/ios/components/user-location/MLRNUserLocation.h +15 -0
- package/ios/components/user-location/MLRNUserLocation.m +36 -0
- package/ios/modules/location/MLRNLocation.h +10 -0
- package/ios/modules/location/MLRNLocation.m +26 -0
- package/ios/modules/location/MLRNLocationManager.h +20 -0
- package/ios/modules/location/MLRNLocationManager.m +167 -0
- package/ios/modules/location/MLRNLocationManagerDelegate.h +10 -0
- package/ios/modules/location/MLRNLocationModule.h +7 -0
- package/ios/modules/location/MLRNLocationModule.mm +67 -0
- package/ios/modules/logging/MLRNLogModule.h +10 -0
- package/ios/modules/logging/MLRNLogModule.mm +39 -0
- package/ios/modules/logging/MLRNLogging.h +27 -0
- package/ios/modules/logging/MLRNLogging.m +102 -0
- package/ios/modules/network/MLRNNetworkModule.h +8 -0
- package/ios/modules/network/MLRNNetworkModule.mm +18 -0
- package/ios/modules/offline/MLRNOfflineModule.h +7 -0
- package/ios/modules/offline/MLRNOfflineModule.mm +692 -0
- package/ios/modules/static-map/MLRNStaticMapModule.h +4 -0
- package/ios/modules/static-map/MLRNStaticMapModule.mm +84 -0
- package/ios/modules/transform-request/MLRNTransformRequest.h +38 -0
- package/ios/modules/transform-request/MLRNTransformRequest.m +413 -0
- package/ios/modules/transform-request/MLRNTransformRequestModule.h +9 -0
- package/ios/modules/transform-request/MLRNTransformRequestModule.mm +72 -0
- package/ios/utils/FilterParser.h +7 -0
- package/ios/utils/FilterParser.m +13 -0
- package/ios/utils/MLRNEvent.h +13 -0
- package/ios/utils/MLRNEvent.m +36 -0
- package/ios/utils/MLRNEventProtocol.h +8 -0
- package/ios/utils/MLRNEventTypes.h +12 -0
- package/ios/utils/MLRNEventTypes.m +12 -0
- package/ios/utils/MLRNFollyConvert.h +5 -0
- package/ios/utils/MLRNImageUtils.h +9 -0
- package/ios/utils/MLRNImageUtils.m +24 -0
- package/ios/utils/MLRNPropConvert.h +17 -0
- package/ios/utils/MLRNUtils.h +32 -0
- package/ios/utils/MLRNUtils.m +193 -0
- package/ios/utils/MLRNViewModuleUtils.h +35 -0
- package/ios/utils/MLRNViewModuleUtils.m +39 -0
- package/lib/commonjs/assets/heading.png +0 -0
- package/lib/commonjs/assets/heading@2x.png +0 -0
- package/lib/commonjs/assets/heading@3x.png +0 -0
- package/lib/commonjs/assets/png.d.js +2 -0
- package/lib/commonjs/assets/png.d.js.map +1 -0
- package/lib/commonjs/components/annotations/LayerAnnotation.js +59 -0
- package/lib/commonjs/components/annotations/LayerAnnotation.js.map +1 -0
- package/lib/commonjs/components/annotations/callout/Callout.js +95 -0
- package/lib/commonjs/components/annotations/callout/Callout.js.map +1 -0
- package/lib/commonjs/components/annotations/callout/CalloutNativeComponent.ts +11 -0
- package/lib/commonjs/components/annotations/marker/Marker.js +88 -0
- package/lib/commonjs/components/annotations/marker/Marker.js.map +1 -0
- package/lib/commonjs/components/annotations/marker/MarkerViewNativeComponent.ts +40 -0
- package/lib/commonjs/components/annotations/view-annotation/PointAnnotationNativeComponent.ts +59 -0
- package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js +93 -0
- package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js.map +1 -0
- package/lib/commonjs/components/camera/Camera.js +146 -0
- package/lib/commonjs/components/camera/Camera.js.map +1 -0
- package/lib/commonjs/components/camera/CameraNativeComponent.ts +65 -0
- package/lib/commonjs/components/camera/NativeCameraModule.js +11 -0
- package/lib/commonjs/components/camera/NativeCameraModule.js.map +1 -0
- package/lib/commonjs/components/images/Images.js +58 -0
- package/lib/commonjs/components/images/Images.js.map +1 -0
- package/lib/commonjs/components/images/ImagesNativeComponent.ts +27 -0
- package/lib/commonjs/components/images/NativeImagesModule.js +10 -0
- package/lib/commonjs/components/images/NativeImagesModule.js.map +1 -0
- package/lib/commonjs/components/layer/Layer.js +157 -0
- package/lib/commonjs/components/layer/Layer.js.map +1 -0
- package/lib/commonjs/components/layer/LayerNativeComponent.ts +43 -0
- package/lib/commonjs/components/map/AndroidTextureMapViewNativeComponent.ts +109 -0
- package/lib/commonjs/components/map/Map.js +117 -0
- package/lib/commonjs/components/map/Map.js.map +1 -0
- package/lib/commonjs/components/map/MapViewNativeComponent.ts +105 -0
- package/lib/commonjs/components/map/NativeMapViewModule.js +9 -0
- package/lib/commonjs/components/map/NativeMapViewModule.js.map +1 -0
- package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js +56 -0
- package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js.map +1 -0
- package/lib/commonjs/components/sources/geojson-source/GeoJSONSourceNativeComponent.ts +48 -0
- package/lib/commonjs/components/sources/geojson-source/NativeGeoJSONSourceModule.js +9 -0
- package/lib/commonjs/components/sources/geojson-source/NativeGeoJSONSourceModule.js.map +1 -0
- package/lib/commonjs/components/sources/image-source/ImageSource.js +33 -0
- package/lib/commonjs/components/sources/image-source/ImageSource.js.map +1 -0
- package/lib/commonjs/components/sources/image-source/ImageSourceNativeComponent.ts +31 -0
- package/lib/commonjs/components/sources/raster-dem-source/RasterDEMSource.js +31 -0
- package/lib/commonjs/components/sources/raster-dem-source/RasterDEMSource.js.map +1 -0
- package/lib/commonjs/components/sources/raster-dem-source/RasterDEMSourceNativeComponent.ts +25 -0
- package/lib/commonjs/components/sources/raster-source/RasterSource.js +32 -0
- package/lib/commonjs/components/sources/raster-source/RasterSource.js.map +1 -0
- package/lib/commonjs/components/sources/raster-source/RasterSourceNativeComponent.ts +25 -0
- package/lib/commonjs/components/sources/vector-source/NativeVectorSourceModule.js +9 -0
- package/lib/commonjs/components/sources/vector-source/NativeVectorSourceModule.js.map +1 -0
- package/lib/commonjs/components/sources/vector-source/VectorSource.js +47 -0
- package/lib/commonjs/components/sources/vector-source/VectorSource.js.map +1 -0
- package/lib/commonjs/components/sources/vector-source/VectorSourceNativeComponent.ts +45 -0
- package/lib/commonjs/components/user-location/NativeUserLocation.js +16 -0
- package/lib/commonjs/components/user-location/NativeUserLocation.js.map +1 -0
- package/lib/commonjs/components/user-location/UserLocation.js +52 -0
- package/lib/commonjs/components/user-location/UserLocation.js.map +1 -0
- package/lib/commonjs/components/user-location/UserLocationNativeComponent.ts +19 -0
- package/lib/commonjs/components/user-location/UserLocationPuck.js +63 -0
- package/lib/commonjs/components/user-location/UserLocationPuck.js.map +1 -0
- package/lib/commonjs/components/user-location/UserLocationPuckHeading.js +31 -0
- package/lib/commonjs/components/user-location/UserLocationPuckHeading.js.map +1 -0
- package/lib/commonjs/hooks/useCurrentPosition.js +34 -0
- package/lib/commonjs/hooks/useCurrentPosition.js.map +1 -0
- package/lib/commonjs/hooks/useFrozenId.js +16 -0
- package/lib/commonjs/hooks/useFrozenId.js.map +1 -0
- package/lib/commonjs/hooks/useNativeBridge.js +84 -0
- package/lib/commonjs/hooks/useNativeBridge.js.map +1 -0
- package/lib/commonjs/index.js +174 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/modules/location/LocationManager.js +98 -0
- package/lib/commonjs/modules/location/LocationManager.js.map +1 -0
- package/lib/commonjs/modules/location/NativeLocationModule.js +9 -0
- package/lib/commonjs/modules/location/NativeLocationModule.js.map +1 -0
- package/lib/commonjs/modules/log/LogManager.js +100 -0
- package/lib/commonjs/modules/log/LogManager.js.map +1 -0
- package/lib/commonjs/modules/log/NativeLogModule.js +9 -0
- package/lib/commonjs/modules/log/NativeLogModule.js.map +1 -0
- package/lib/commonjs/modules/network/NativeNetworkModule.js +9 -0
- package/lib/commonjs/modules/network/NativeNetworkModule.js.map +1 -0
- package/lib/commonjs/modules/network/NetworkManager.js +34 -0
- package/lib/commonjs/modules/network/NetworkManager.js.map +1 -0
- package/lib/commonjs/modules/offline/NativeOfflineModule.js +9 -0
- package/lib/commonjs/modules/offline/NativeOfflineModule.js.map +1 -0
- package/lib/commonjs/modules/offline/OfflineManager.js +351 -0
- package/lib/commonjs/modules/offline/OfflineManager.js.map +1 -0
- package/lib/commonjs/modules/offline/OfflinePack.js +30 -0
- package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -0
- package/lib/commonjs/modules/static-map/NativeStaticMapModule.js +9 -0
- package/lib/commonjs/modules/static-map/NativeStaticMapModule.js.map +1 -0
- package/lib/commonjs/modules/static-map/StaticMapManager.js +57 -0
- package/lib/commonjs/modules/static-map/StaticMapManager.js.map +1 -0
- package/lib/commonjs/modules/transform-request/NativeTransformRequestModule.js +9 -0
- package/lib/commonjs/modules/transform-request/NativeTransformRequestModule.js.map +1 -0
- package/lib/commonjs/modules/transform-request/TransformRequestManager.js +233 -0
- package/lib/commonjs/modules/transform-request/TransformRequestManager.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/plugin/MapVinaPluginProps.js +2 -0
- package/lib/commonjs/plugin/MapVinaPluginProps.js.map +1 -0
- package/lib/commonjs/plugin/android.js +39 -0
- package/lib/commonjs/plugin/android.js.map +1 -0
- package/lib/commonjs/plugin/ios.js +91 -0
- package/lib/commonjs/plugin/ios.js.map +1 -0
- package/lib/commonjs/types/Anchor.js +67 -0
- package/lib/commonjs/types/Anchor.js.map +1 -0
- package/lib/commonjs/types/BaseProps.js +2 -0
- package/lib/commonjs/types/BaseProps.js.map +1 -0
- package/lib/commonjs/types/LngLat.js +2 -0
- package/lib/commonjs/types/LngLat.js.map +1 -0
- package/lib/commonjs/types/LngLatBounds.js +2 -0
- package/lib/commonjs/types/LngLatBounds.js.map +1 -0
- package/lib/commonjs/types/MapVinaRNStyles.js +6 -0
- package/lib/commonjs/types/MapVinaRNStyles.js.map +1 -0
- package/lib/commonjs/types/PixelPoint.js +2 -0
- package/lib/commonjs/types/PixelPoint.js.map +1 -0
- package/lib/commonjs/types/PixelPointBounds.js +2 -0
- package/lib/commonjs/types/PixelPointBounds.js.map +1 -0
- package/lib/commonjs/types/PressEvent.js +6 -0
- package/lib/commonjs/types/PressEvent.js.map +1 -0
- package/lib/commonjs/types/PressEventWithFeatures.js +6 -0
- package/lib/commonjs/types/PressEventWithFeatures.js.map +1 -0
- package/lib/commonjs/types/PressableSourceProps.js +6 -0
- package/lib/commonjs/types/PressableSourceProps.js.map +1 -0
- package/lib/commonjs/types/ViewPadding.js +2 -0
- package/lib/commonjs/types/ViewPadding.js.map +1 -0
- package/lib/commonjs/types/codegen/UnsafeMixed.js +2 -0
- package/lib/commonjs/types/codegen/UnsafeMixed.js.map +1 -0
- package/lib/commonjs/utils/BridgeValue.js +59 -0
- package/lib/commonjs/utils/BridgeValue.js.map +1 -0
- package/lib/commonjs/utils/StyleValue.js +38 -0
- package/lib/commonjs/utils/StyleValue.js.map +1 -0
- package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js +96 -0
- package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js.map +1 -0
- package/lib/commonjs/utils/animated/Animated.js +30 -0
- package/lib/commonjs/utils/animated/Animated.js.map +1 -0
- package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js +91 -0
- package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js.map +1 -0
- package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js +32 -0
- package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -0
- package/lib/commonjs/utils/animated/AnimatedGeoJSON.js +67 -0
- package/lib/commonjs/utils/animated/AnimatedGeoJSON.js.map +1 -0
- package/lib/commonjs/utils/animated/AnimatedPoint.js +114 -0
- package/lib/commonjs/utils/animated/AnimatedPoint.js.map +1 -0
- package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js +120 -0
- package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -0
- package/lib/commonjs/utils/convertStyleSpec.js +58 -0
- package/lib/commonjs/utils/convertStyleSpec.js.map +1 -0
- package/lib/commonjs/utils/findNodeHandle.js +16 -0
- package/lib/commonjs/utils/findNodeHandle.js.map +1 -0
- package/lib/commonjs/utils/getNativeFilter.js +16 -0
- package/lib/commonjs/utils/getNativeFilter.js.map +1 -0
- package/lib/commonjs/utils/getStylePropertyType.js +255 -0
- package/lib/commonjs/utils/getStylePropertyType.js.map +1 -0
- package/lib/commonjs/utils/index.js +68 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/module/assets/heading.png +0 -0
- package/lib/module/assets/heading@2x.png +0 -0
- package/lib/module/assets/heading@3x.png +0 -0
- package/lib/module/assets/png.d.js +2 -0
- package/lib/module/assets/png.d.js.map +1 -0
- package/lib/module/components/annotations/LayerAnnotation.js +54 -0
- package/lib/module/components/annotations/LayerAnnotation.js.map +1 -0
- package/lib/module/components/annotations/callout/Callout.js +89 -0
- package/lib/module/components/annotations/callout/Callout.js.map +1 -0
- package/lib/module/components/annotations/callout/CalloutNativeComponent.ts +11 -0
- package/lib/module/components/annotations/marker/Marker.js +82 -0
- package/lib/module/components/annotations/marker/Marker.js.map +1 -0
- package/lib/module/components/annotations/marker/MarkerViewNativeComponent.ts +40 -0
- package/lib/module/components/annotations/view-annotation/PointAnnotationNativeComponent.ts +59 -0
- package/lib/module/components/annotations/view-annotation/ViewAnnotation.js +87 -0
- package/lib/module/components/annotations/view-annotation/ViewAnnotation.js.map +1 -0
- package/lib/module/components/camera/Camera.js +141 -0
- package/lib/module/components/camera/Camera.js.map +1 -0
- package/lib/module/components/camera/CameraNativeComponent.ts +65 -0
- package/lib/module/components/camera/NativeCameraModule.js +10 -0
- package/lib/module/components/camera/NativeCameraModule.js.map +1 -0
- package/lib/module/components/images/Images.js +52 -0
- package/lib/module/components/images/Images.js.map +1 -0
- package/lib/module/components/images/ImagesNativeComponent.ts +27 -0
- package/lib/module/components/images/NativeImagesModule.js +7 -0
- package/lib/module/components/images/NativeImagesModule.js.map +1 -0
- package/lib/module/components/layer/Layer.js +151 -0
- package/lib/module/components/layer/Layer.js.map +1 -0
- package/lib/module/components/layer/LayerNativeComponent.ts +43 -0
- package/lib/module/components/map/AndroidTextureMapViewNativeComponent.ts +109 -0
- package/lib/module/components/map/Map.js +112 -0
- package/lib/module/components/map/Map.js.map +1 -0
- package/lib/module/components/map/MapViewNativeComponent.ts +105 -0
- package/lib/module/components/map/NativeMapViewModule.js +5 -0
- package/lib/module/components/map/NativeMapViewModule.js.map +1 -0
- package/lib/module/components/sources/geojson-source/GeoJSONSource.js +51 -0
- package/lib/module/components/sources/geojson-source/GeoJSONSource.js.map +1 -0
- package/lib/module/components/sources/geojson-source/GeoJSONSourceNativeComponent.ts +48 -0
- package/lib/module/components/sources/geojson-source/NativeGeoJSONSourceModule.js +5 -0
- package/lib/module/components/sources/geojson-source/NativeGeoJSONSourceModule.js.map +1 -0
- package/lib/module/components/sources/image-source/ImageSource.js +28 -0
- package/lib/module/components/sources/image-source/ImageSource.js.map +1 -0
- package/lib/module/components/sources/image-source/ImageSourceNativeComponent.ts +31 -0
- package/lib/module/components/sources/raster-dem-source/RasterDEMSource.js +26 -0
- package/lib/module/components/sources/raster-dem-source/RasterDEMSource.js.map +1 -0
- package/lib/module/components/sources/raster-dem-source/RasterDEMSourceNativeComponent.ts +25 -0
- package/lib/module/components/sources/raster-source/RasterSource.js +27 -0
- package/lib/module/components/sources/raster-source/RasterSource.js.map +1 -0
- package/lib/module/components/sources/raster-source/RasterSourceNativeComponent.ts +25 -0
- package/lib/module/components/sources/vector-source/NativeVectorSourceModule.js +5 -0
- package/lib/module/components/sources/vector-source/NativeVectorSourceModule.js.map +1 -0
- package/lib/module/components/sources/vector-source/VectorSource.js +42 -0
- package/lib/module/components/sources/vector-source/VectorSource.js.map +1 -0
- package/lib/module/components/sources/vector-source/VectorSourceNativeComponent.ts +45 -0
- package/lib/module/components/user-location/NativeUserLocation.js +10 -0
- package/lib/module/components/user-location/NativeUserLocation.js.map +1 -0
- package/lib/module/components/user-location/UserLocation.js +47 -0
- package/lib/module/components/user-location/UserLocation.js.map +1 -0
- package/lib/module/components/user-location/UserLocationNativeComponent.ts +19 -0
- package/lib/module/components/user-location/UserLocationPuck.js +59 -0
- package/lib/module/components/user-location/UserLocationPuck.js.map +1 -0
- package/lib/module/components/user-location/UserLocationPuckHeading.js +27 -0
- package/lib/module/components/user-location/UserLocationPuckHeading.js.map +1 -0
- package/lib/module/hooks/useCurrentPosition.js +30 -0
- package/lib/module/hooks/useCurrentPosition.js.map +1 -0
- package/lib/module/hooks/useFrozenId.js +12 -0
- package/lib/module/hooks/useFrozenId.js.map +1 -0
- package/lib/module/hooks/useNativeBridge.js +79 -0
- package/lib/module/hooks/useNativeBridge.js.map +1 -0
- package/lib/module/index.js +27 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/modules/location/LocationManager.js +94 -0
- package/lib/module/modules/location/LocationManager.js.map +1 -0
- package/lib/module/modules/location/NativeLocationModule.js +5 -0
- package/lib/module/modules/location/NativeLocationModule.js.map +1 -0
- package/lib/module/modules/log/LogManager.js +97 -0
- package/lib/module/modules/log/LogManager.js.map +1 -0
- package/lib/module/modules/log/NativeLogModule.js +5 -0
- package/lib/module/modules/log/NativeLogModule.js.map +1 -0
- package/lib/module/modules/network/NativeNetworkModule.js +5 -0
- package/lib/module/modules/network/NativeNetworkModule.js.map +1 -0
- package/lib/module/modules/network/NetworkManager.js +30 -0
- package/lib/module/modules/network/NetworkManager.js.map +1 -0
- package/lib/module/modules/offline/NativeOfflineModule.js +5 -0
- package/lib/module/modules/offline/NativeOfflineModule.js.map +1 -0
- package/lib/module/modules/offline/OfflineManager.js +348 -0
- package/lib/module/modules/offline/OfflineManager.js.map +1 -0
- package/lib/module/modules/offline/OfflinePack.js +24 -0
- package/lib/module/modules/offline/OfflinePack.js.map +1 -0
- package/lib/module/modules/static-map/NativeStaticMapModule.js +5 -0
- package/lib/module/modules/static-map/NativeStaticMapModule.js.map +1 -0
- package/lib/module/modules/static-map/StaticMapManager.js +53 -0
- package/lib/module/modules/static-map/StaticMapManager.js.map +1 -0
- package/lib/module/modules/transform-request/NativeTransformRequestModule.js +5 -0
- package/lib/module/modules/transform-request/NativeTransformRequestModule.js.map +1 -0
- package/lib/module/modules/transform-request/TransformRequestManager.js +230 -0
- package/lib/module/modules/transform-request/TransformRequestManager.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/plugin/MapVinaPluginProps.js +2 -0
- package/lib/module/plugin/MapVinaPluginProps.js.map +1 -0
- package/lib/module/plugin/android.js +32 -0
- package/lib/module/plugin/android.js.map +1 -0
- package/lib/module/plugin/ios.js +83 -0
- package/lib/module/plugin/ios.js.map +1 -0
- package/lib/module/types/Anchor.js +63 -0
- package/lib/module/types/Anchor.js.map +1 -0
- package/lib/module/types/BaseProps.js +2 -0
- package/lib/module/types/BaseProps.js.map +1 -0
- package/lib/module/types/LngLat.js +2 -0
- package/lib/module/types/LngLat.js.map +1 -0
- package/lib/module/types/LngLatBounds.js +2 -0
- package/lib/module/types/LngLatBounds.js.map +1 -0
- package/lib/module/types/MapVinaRNStyles.js +4 -0
- package/lib/module/types/MapVinaRNStyles.js.map +1 -0
- package/lib/module/types/PixelPoint.js +2 -0
- package/lib/module/types/PixelPoint.js.map +1 -0
- package/lib/module/types/PixelPointBounds.js +2 -0
- package/lib/module/types/PixelPointBounds.js.map +1 -0
- package/lib/module/types/PressEvent.js +4 -0
- package/lib/module/types/PressEvent.js.map +1 -0
- package/lib/module/types/PressEventWithFeatures.js +4 -0
- package/lib/module/types/PressEventWithFeatures.js.map +1 -0
- package/lib/module/types/PressableSourceProps.js +4 -0
- package/lib/module/types/PressableSourceProps.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/BridgeValue.js +54 -0
- package/lib/module/utils/BridgeValue.js.map +1 -0
- package/lib/module/utils/StyleValue.js +34 -0
- package/lib/module/utils/StyleValue.js.map +1 -0
- package/lib/module/utils/animated/AbstractAnimatedCoordinates.js +91 -0
- package/lib/module/utils/animated/AbstractAnimatedCoordinates.js.map +1 -0
- package/lib/module/utils/animated/Animated.js +26 -0
- package/lib/module/utils/animated/Animated.js.map +1 -0
- package/lib/module/utils/animated/AnimatedCoordinatesArray.js +86 -0
- package/lib/module/utils/animated/AnimatedCoordinatesArray.js.map +1 -0
- package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js +27 -0
- package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -0
- package/lib/module/utils/animated/AnimatedGeoJSON.js +62 -0
- package/lib/module/utils/animated/AnimatedGeoJSON.js.map +1 -0
- package/lib/module/utils/animated/AnimatedPoint.js +109 -0
- package/lib/module/utils/animated/AnimatedPoint.js.map +1 -0
- package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js +115 -0
- package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -0
- package/lib/module/utils/convertStyleSpec.js +53 -0
- package/lib/module/utils/convertStyleSpec.js.map +1 -0
- package/lib/module/utils/findNodeHandle.js +11 -0
- package/lib/module/utils/findNodeHandle.js.map +1 -0
- package/lib/module/utils/getNativeFilter.js +12 -0
- package/lib/module/utils/getNativeFilter.js.map +1 -0
- package/lib/module/utils/getStylePropertyType.js +251 -0
- package/lib/module/utils/getStylePropertyType.js.map +1 -0
- package/lib/module/utils/index.js +55 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/typescript/commonjs/components/annotations/LayerAnnotation.d.ts +20 -0
- package/lib/typescript/commonjs/components/annotations/LayerAnnotation.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/annotations/callout/Callout.d.ts +35 -0
- package/lib/typescript/commonjs/components/annotations/callout/Callout.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/annotations/callout/CalloutNativeComponent.d.ts +6 -0
- package/lib/typescript/commonjs/components/annotations/callout/CalloutNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/annotations/marker/Marker.d.ts +79 -0
- package/lib/typescript/commonjs/components/annotations/marker/Marker.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/annotations/marker/MarkerViewNativeComponent.d.ts +31 -0
- package/lib/typescript/commonjs/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts +44 -0
- package/lib/typescript/commonjs/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/annotations/view-annotation/ViewAnnotation.d.ts +119 -0
- package/lib/typescript/commonjs/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/camera/Camera.d.ts +217 -0
- package/lib/typescript/commonjs/components/camera/Camera.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/camera/CameraNativeComponent.d.ts +37 -0
- package/lib/typescript/commonjs/components/camera/CameraNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/camera/NativeCameraModule.d.ts +26 -0
- package/lib/typescript/commonjs/components/camera/NativeCameraModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/images/Images.d.ts +69 -0
- package/lib/typescript/commonjs/components/images/Images.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/images/ImagesNativeComponent.d.ts +17 -0
- package/lib/typescript/commonjs/components/images/ImagesNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/images/NativeImagesModule.d.ts +6 -0
- package/lib/typescript/commonjs/components/images/NativeImagesModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/layer/Layer.d.ts +172 -0
- package/lib/typescript/commonjs/components/layer/Layer.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/layer/LayerNativeComponent.d.ts +19 -0
- package/lib/typescript/commonjs/components/layer/LayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/map/AndroidTextureMapViewNativeComponent.d.ts +79 -0
- package/lib/typescript/commonjs/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/map/Map.d.ts +448 -0
- package/lib/typescript/commonjs/components/map/Map.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/map/MapViewNativeComponent.d.ts +79 -0
- package/lib/typescript/commonjs/components/map/MapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/map/NativeMapViewModule.d.ts +31 -0
- package/lib/typescript/commonjs/components/map/NativeMapViewModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSource.d.ts +135 -0
- package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts +35 -0
- package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts +10 -0
- package/lib/typescript/commonjs/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/sources/image-source/ImageSource.d.ts +32 -0
- package/lib/typescript/commonjs/components/sources/image-source/ImageSource.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/sources/image-source/ImageSourceNativeComponent.d.ts +21 -0
- package/lib/typescript/commonjs/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/sources/raster-dem-source/RasterDEMSource.d.ts +58 -0
- package/lib/typescript/commonjs/components/sources/raster-dem-source/RasterDEMSource.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/sources/raster-dem-source/RasterDEMSourceNativeComponent.d.ts +15 -0
- package/lib/typescript/commonjs/components/sources/raster-dem-source/RasterDEMSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/sources/raster-source/RasterSource.d.ts +59 -0
- package/lib/typescript/commonjs/components/sources/raster-source/RasterSource.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/sources/raster-source/RasterSourceNativeComponent.d.ts +15 -0
- package/lib/typescript/commonjs/components/sources/raster-source/RasterSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/sources/vector-source/NativeVectorSourceModule.d.ts +7 -0
- package/lib/typescript/commonjs/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/sources/vector-source/VectorSource.d.ts +75 -0
- package/lib/typescript/commonjs/components/sources/vector-source/VectorSource.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/sources/vector-source/VectorSourceNativeComponent.d.ts +32 -0
- package/lib/typescript/commonjs/components/sources/vector-source/VectorSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/user-location/NativeUserLocation.d.ts +27 -0
- package/lib/typescript/commonjs/components/user-location/NativeUserLocation.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/user-location/UserLocation.d.ts +31 -0
- package/lib/typescript/commonjs/components/user-location/UserLocation.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/user-location/UserLocationNativeComponent.d.ts +8 -0
- package/lib/typescript/commonjs/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/user-location/UserLocationPuck.d.ts +10 -0
- package/lib/typescript/commonjs/components/user-location/UserLocationPuck.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/user-location/UserLocationPuckHeading.d.ts +9 -0
- package/lib/typescript/commonjs/components/user-location/UserLocationPuckHeading.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useCurrentPosition.d.ts +18 -0
- package/lib/typescript/commonjs/hooks/useCurrentPosition.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useFrozenId.d.ts +2 -0
- package/lib/typescript/commonjs/hooks/useFrozenId.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useNativeBridge.d.ts +21 -0
- package/lib/typescript/commonjs/hooks/useNativeBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +36 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/location/LocationManager.d.ts +62 -0
- package/lib/typescript/commonjs/modules/location/LocationManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/location/NativeLocationModule.d.ts +25 -0
- package/lib/typescript/commonjs/modules/location/NativeLocationModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/log/LogManager.d.ts +46 -0
- package/lib/typescript/commonjs/modules/log/LogManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/log/NativeLogModule.d.ts +13 -0
- package/lib/typescript/commonjs/modules/log/NativeLogModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/network/NativeNetworkModule.d.ts +7 -0
- package/lib/typescript/commonjs/modules/network/NativeNetworkModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/network/NetworkManager.d.ts +24 -0
- package/lib/typescript/commonjs/modules/network/NetworkManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/offline/NativeOfflineModule.d.ts +50 -0
- package/lib/typescript/commonjs/modules/offline/NativeOfflineModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/offline/OfflineManager.d.ts +238 -0
- package/lib/typescript/commonjs/modules/offline/OfflineManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/offline/OfflinePack.d.ts +25 -0
- package/lib/typescript/commonjs/modules/offline/OfflinePack.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/static-map/NativeStaticMapModule.d.ts +19 -0
- package/lib/typescript/commonjs/modules/static-map/NativeStaticMapModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/static-map/StaticMapManager.d.ts +105 -0
- package/lib/typescript/commonjs/modules/static-map/StaticMapManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/transform-request/NativeTransformRequestModule.d.ts +15 -0
- package/lib/typescript/commonjs/modules/transform-request/NativeTransformRequestModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts +213 -0
- package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/plugin/MapVinaPluginProps.d.ts +78 -0
- package/lib/typescript/commonjs/plugin/MapVinaPluginProps.d.ts.map +1 -0
- package/lib/typescript/commonjs/plugin/android.d.ts +17 -0
- package/lib/typescript/commonjs/plugin/android.d.ts.map +1 -0
- package/lib/typescript/commonjs/plugin/ios.d.ts +15 -0
- package/lib/typescript/commonjs/plugin/ios.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/Anchor.d.ts +16 -0
- package/lib/typescript/commonjs/types/Anchor.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/BaseProps.d.ts +7 -0
- package/lib/typescript/commonjs/types/BaseProps.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/LngLat.d.ts +5 -0
- package/lib/typescript/commonjs/types/LngLat.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/LngLatBounds.d.ts +13 -0
- package/lib/typescript/commonjs/types/LngLatBounds.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/MapVinaRNStyles.d.ts +1169 -0
- package/lib/typescript/commonjs/types/MapVinaRNStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/PixelPoint.d.ts +5 -0
- package/lib/typescript/commonjs/types/PixelPoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/PixelPointBounds.d.ts +10 -0
- package/lib/typescript/commonjs/types/PixelPointBounds.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/PressEvent.d.ts +16 -0
- package/lib/typescript/commonjs/types/PressEvent.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/PressEventWithFeatures.d.ts +8 -0
- package/lib/typescript/commonjs/types/PressEventWithFeatures.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/PressableSourceProps.d.ts +19 -0
- package/lib/typescript/commonjs/types/PressableSourceProps.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/ViewPadding.d.ts +10 -0
- package/lib/typescript/commonjs/types/ViewPadding.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/codegen/UnsafeMixed.d.ts +10 -0
- package/lib/typescript/commonjs/types/codegen/UnsafeMixed.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/BridgeValue.d.ts +29 -0
- package/lib/typescript/commonjs/utils/BridgeValue.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/StyleValue.d.ts +10 -0
- package/lib/typescript/commonjs/utils/StyleValue.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/AbstractAnimatedCoordinates.d.ts +42 -0
- package/lib/typescript/commonjs/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/Animated.d.ts +21 -0
- package/lib/typescript/commonjs/utils/animated/Animated.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedCoordinatesArray.d.ts +40 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +13 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedGeoJSON.d.ts +31 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedGeoJSON.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedPoint.d.ts +32 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedPoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedRouteCoordinatesArray.d.ts +62 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/convertStyleSpec.d.ts +16 -0
- package/lib/typescript/commonjs/utils/convertStyleSpec.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/findNodeHandle.d.ts +3 -0
- package/lib/typescript/commonjs/utils/findNodeHandle.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/getNativeFilter.d.ts +3 -0
- package/lib/typescript/commonjs/utils/getNativeFilter.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/getStylePropertyType.d.ts +35 -0
- package/lib/typescript/commonjs/utils/getStylePropertyType.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/index.d.ts +18 -0
- package/lib/typescript/commonjs/utils/index.d.ts.map +1 -0
- package/lib/typescript/module/components/annotations/LayerAnnotation.d.ts +20 -0
- package/lib/typescript/module/components/annotations/LayerAnnotation.d.ts.map +1 -0
- package/lib/typescript/module/components/annotations/callout/Callout.d.ts +35 -0
- package/lib/typescript/module/components/annotations/callout/Callout.d.ts.map +1 -0
- package/lib/typescript/module/components/annotations/callout/CalloutNativeComponent.d.ts +6 -0
- package/lib/typescript/module/components/annotations/callout/CalloutNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/annotations/marker/Marker.d.ts +79 -0
- package/lib/typescript/module/components/annotations/marker/Marker.d.ts.map +1 -0
- package/lib/typescript/module/components/annotations/marker/MarkerViewNativeComponent.d.ts +31 -0
- package/lib/typescript/module/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts +44 -0
- package/lib/typescript/module/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/annotations/view-annotation/ViewAnnotation.d.ts +119 -0
- package/lib/typescript/module/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -0
- package/lib/typescript/module/components/camera/Camera.d.ts +217 -0
- package/lib/typescript/module/components/camera/Camera.d.ts.map +1 -0
- package/lib/typescript/module/components/camera/CameraNativeComponent.d.ts +37 -0
- package/lib/typescript/module/components/camera/CameraNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/camera/NativeCameraModule.d.ts +26 -0
- package/lib/typescript/module/components/camera/NativeCameraModule.d.ts.map +1 -0
- package/lib/typescript/module/components/images/Images.d.ts +69 -0
- package/lib/typescript/module/components/images/Images.d.ts.map +1 -0
- package/lib/typescript/module/components/images/ImagesNativeComponent.d.ts +17 -0
- package/lib/typescript/module/components/images/ImagesNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/images/NativeImagesModule.d.ts +6 -0
- package/lib/typescript/module/components/images/NativeImagesModule.d.ts.map +1 -0
- package/lib/typescript/module/components/layer/Layer.d.ts +172 -0
- package/lib/typescript/module/components/layer/Layer.d.ts.map +1 -0
- package/lib/typescript/module/components/layer/LayerNativeComponent.d.ts +19 -0
- package/lib/typescript/module/components/layer/LayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/map/AndroidTextureMapViewNativeComponent.d.ts +79 -0
- package/lib/typescript/module/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/map/Map.d.ts +448 -0
- package/lib/typescript/module/components/map/Map.d.ts.map +1 -0
- package/lib/typescript/module/components/map/MapViewNativeComponent.d.ts +79 -0
- package/lib/typescript/module/components/map/MapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/map/NativeMapViewModule.d.ts +31 -0
- package/lib/typescript/module/components/map/NativeMapViewModule.d.ts.map +1 -0
- package/lib/typescript/module/components/sources/geojson-source/GeoJSONSource.d.ts +135 -0
- package/lib/typescript/module/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -0
- package/lib/typescript/module/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts +35 -0
- package/lib/typescript/module/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts +10 -0
- package/lib/typescript/module/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts.map +1 -0
- package/lib/typescript/module/components/sources/image-source/ImageSource.d.ts +32 -0
- package/lib/typescript/module/components/sources/image-source/ImageSource.d.ts.map +1 -0
- package/lib/typescript/module/components/sources/image-source/ImageSourceNativeComponent.d.ts +21 -0
- package/lib/typescript/module/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/sources/raster-dem-source/RasterDEMSource.d.ts +58 -0
- package/lib/typescript/module/components/sources/raster-dem-source/RasterDEMSource.d.ts.map +1 -0
- package/lib/typescript/module/components/sources/raster-dem-source/RasterDEMSourceNativeComponent.d.ts +15 -0
- package/lib/typescript/module/components/sources/raster-dem-source/RasterDEMSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/sources/raster-source/RasterSource.d.ts +59 -0
- package/lib/typescript/module/components/sources/raster-source/RasterSource.d.ts.map +1 -0
- package/lib/typescript/module/components/sources/raster-source/RasterSourceNativeComponent.d.ts +15 -0
- package/lib/typescript/module/components/sources/raster-source/RasterSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/sources/vector-source/NativeVectorSourceModule.d.ts +7 -0
- package/lib/typescript/module/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +1 -0
- package/lib/typescript/module/components/sources/vector-source/VectorSource.d.ts +75 -0
- package/lib/typescript/module/components/sources/vector-source/VectorSource.d.ts.map +1 -0
- package/lib/typescript/module/components/sources/vector-source/VectorSourceNativeComponent.d.ts +32 -0
- package/lib/typescript/module/components/sources/vector-source/VectorSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/user-location/NativeUserLocation.d.ts +27 -0
- package/lib/typescript/module/components/user-location/NativeUserLocation.d.ts.map +1 -0
- package/lib/typescript/module/components/user-location/UserLocation.d.ts +31 -0
- package/lib/typescript/module/components/user-location/UserLocation.d.ts.map +1 -0
- package/lib/typescript/module/components/user-location/UserLocationNativeComponent.d.ts +8 -0
- package/lib/typescript/module/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/user-location/UserLocationPuck.d.ts +10 -0
- package/lib/typescript/module/components/user-location/UserLocationPuck.d.ts.map +1 -0
- package/lib/typescript/module/components/user-location/UserLocationPuckHeading.d.ts +9 -0
- package/lib/typescript/module/components/user-location/UserLocationPuckHeading.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useCurrentPosition.d.ts +18 -0
- package/lib/typescript/module/hooks/useCurrentPosition.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useFrozenId.d.ts +2 -0
- package/lib/typescript/module/hooks/useFrozenId.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useNativeBridge.d.ts +21 -0
- package/lib/typescript/module/hooks/useNativeBridge.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +36 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/modules/location/LocationManager.d.ts +62 -0
- package/lib/typescript/module/modules/location/LocationManager.d.ts.map +1 -0
- package/lib/typescript/module/modules/location/NativeLocationModule.d.ts +25 -0
- package/lib/typescript/module/modules/location/NativeLocationModule.d.ts.map +1 -0
- package/lib/typescript/module/modules/log/LogManager.d.ts +46 -0
- package/lib/typescript/module/modules/log/LogManager.d.ts.map +1 -0
- package/lib/typescript/module/modules/log/NativeLogModule.d.ts +13 -0
- package/lib/typescript/module/modules/log/NativeLogModule.d.ts.map +1 -0
- package/lib/typescript/module/modules/network/NativeNetworkModule.d.ts +7 -0
- package/lib/typescript/module/modules/network/NativeNetworkModule.d.ts.map +1 -0
- package/lib/typescript/module/modules/network/NetworkManager.d.ts +24 -0
- package/lib/typescript/module/modules/network/NetworkManager.d.ts.map +1 -0
- package/lib/typescript/module/modules/offline/NativeOfflineModule.d.ts +50 -0
- package/lib/typescript/module/modules/offline/NativeOfflineModule.d.ts.map +1 -0
- package/lib/typescript/module/modules/offline/OfflineManager.d.ts +238 -0
- package/lib/typescript/module/modules/offline/OfflineManager.d.ts.map +1 -0
- package/lib/typescript/module/modules/offline/OfflinePack.d.ts +25 -0
- package/lib/typescript/module/modules/offline/OfflinePack.d.ts.map +1 -0
- package/lib/typescript/module/modules/static-map/NativeStaticMapModule.d.ts +19 -0
- package/lib/typescript/module/modules/static-map/NativeStaticMapModule.d.ts.map +1 -0
- package/lib/typescript/module/modules/static-map/StaticMapManager.d.ts +105 -0
- package/lib/typescript/module/modules/static-map/StaticMapManager.d.ts.map +1 -0
- package/lib/typescript/module/modules/transform-request/NativeTransformRequestModule.d.ts +15 -0
- package/lib/typescript/module/modules/transform-request/NativeTransformRequestModule.d.ts.map +1 -0
- package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts +213 -0
- package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/plugin/MapVinaPluginProps.d.ts +78 -0
- package/lib/typescript/module/plugin/MapVinaPluginProps.d.ts.map +1 -0
- package/lib/typescript/module/plugin/android.d.ts +17 -0
- package/lib/typescript/module/plugin/android.d.ts.map +1 -0
- package/lib/typescript/module/plugin/ios.d.ts +15 -0
- package/lib/typescript/module/plugin/ios.d.ts.map +1 -0
- package/lib/typescript/module/types/Anchor.d.ts +16 -0
- package/lib/typescript/module/types/Anchor.d.ts.map +1 -0
- package/lib/typescript/module/types/BaseProps.d.ts +7 -0
- package/lib/typescript/module/types/BaseProps.d.ts.map +1 -0
- package/lib/typescript/module/types/LngLat.d.ts +5 -0
- package/lib/typescript/module/types/LngLat.d.ts.map +1 -0
- package/lib/typescript/module/types/LngLatBounds.d.ts +13 -0
- package/lib/typescript/module/types/LngLatBounds.d.ts.map +1 -0
- package/lib/typescript/module/types/MapVinaRNStyles.d.ts +1169 -0
- package/lib/typescript/module/types/MapVinaRNStyles.d.ts.map +1 -0
- package/lib/typescript/module/types/PixelPoint.d.ts +5 -0
- package/lib/typescript/module/types/PixelPoint.d.ts.map +1 -0
- package/lib/typescript/module/types/PixelPointBounds.d.ts +10 -0
- package/lib/typescript/module/types/PixelPointBounds.d.ts.map +1 -0
- package/lib/typescript/module/types/PressEvent.d.ts +16 -0
- package/lib/typescript/module/types/PressEvent.d.ts.map +1 -0
- package/lib/typescript/module/types/PressEventWithFeatures.d.ts +8 -0
- package/lib/typescript/module/types/PressEventWithFeatures.d.ts.map +1 -0
- package/lib/typescript/module/types/PressableSourceProps.d.ts +19 -0
- package/lib/typescript/module/types/PressableSourceProps.d.ts.map +1 -0
- package/lib/typescript/module/types/ViewPadding.d.ts +10 -0
- package/lib/typescript/module/types/ViewPadding.d.ts.map +1 -0
- package/lib/typescript/module/types/codegen/UnsafeMixed.d.ts +10 -0
- package/lib/typescript/module/types/codegen/UnsafeMixed.d.ts.map +1 -0
- package/lib/typescript/module/utils/BridgeValue.d.ts +29 -0
- package/lib/typescript/module/utils/BridgeValue.d.ts.map +1 -0
- package/lib/typescript/module/utils/StyleValue.d.ts +10 -0
- package/lib/typescript/module/utils/StyleValue.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/AbstractAnimatedCoordinates.d.ts +42 -0
- package/lib/typescript/module/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/Animated.d.ts +21 -0
- package/lib/typescript/module/utils/animated/Animated.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/AnimatedCoordinatesArray.d.ts +40 -0
- package/lib/typescript/module/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +13 -0
- package/lib/typescript/module/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/AnimatedGeoJSON.d.ts +31 -0
- package/lib/typescript/module/utils/animated/AnimatedGeoJSON.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/AnimatedPoint.d.ts +32 -0
- package/lib/typescript/module/utils/animated/AnimatedPoint.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/AnimatedRouteCoordinatesArray.d.ts +62 -0
- package/lib/typescript/module/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
- package/lib/typescript/module/utils/convertStyleSpec.d.ts +16 -0
- package/lib/typescript/module/utils/convertStyleSpec.d.ts.map +1 -0
- package/lib/typescript/module/utils/findNodeHandle.d.ts +3 -0
- package/lib/typescript/module/utils/findNodeHandle.d.ts.map +1 -0
- package/lib/typescript/module/utils/getNativeFilter.d.ts +3 -0
- package/lib/typescript/module/utils/getNativeFilter.d.ts.map +1 -0
- package/lib/typescript/module/utils/getStylePropertyType.d.ts +35 -0
- package/lib/typescript/module/utils/getStylePropertyType.d.ts.map +1 -0
- package/lib/typescript/module/utils/index.d.ts +18 -0
- package/lib/typescript/module/utils/index.d.ts.map +1 -0
- package/package.json +191 -0
- package/src/assets/heading.png +0 -0
- package/src/assets/heading@2x.png +0 -0
- package/src/assets/heading@3x.png +0 -0
- package/src/assets/png.d.ts +4 -0
- package/src/components/annotations/LayerAnnotation.tsx +74 -0
- package/src/components/annotations/callout/Callout.tsx +146 -0
- package/src/components/annotations/callout/CalloutNativeComponent.ts +11 -0
- package/src/components/annotations/marker/Marker.tsx +176 -0
- package/src/components/annotations/marker/MarkerViewNativeComponent.ts +40 -0
- package/src/components/annotations/view-annotation/PointAnnotationNativeComponent.ts +59 -0
- package/src/components/annotations/view-annotation/ViewAnnotation.tsx +239 -0
- package/src/components/camera/Camera.tsx +344 -0
- package/src/components/camera/CameraNativeComponent.ts +65 -0
- package/src/components/camera/NativeCameraModule.ts +38 -0
- package/src/components/images/Images.tsx +111 -0
- package/src/components/images/ImagesNativeComponent.ts +27 -0
- package/src/components/images/NativeImagesModule.ts +11 -0
- package/src/components/layer/Layer.tsx +278 -0
- package/src/components/layer/LayerNativeComponent.ts +43 -0
- package/src/components/map/AndroidTextureMapViewNativeComponent.ts +109 -0
- package/src/components/map/Map.tsx +697 -0
- package/src/components/map/MapViewNativeComponent.ts +105 -0
- package/src/components/map/NativeMapViewModule.ts +78 -0
- package/src/components/sources/geojson-source/GeoJSONSource.tsx +245 -0
- package/src/components/sources/geojson-source/GeoJSONSourceNativeComponent.ts +48 -0
- package/src/components/sources/geojson-source/NativeGeoJSONSourceModule.ts +33 -0
- package/src/components/sources/image-source/ImageSource.tsx +58 -0
- package/src/components/sources/image-source/ImageSourceNativeComponent.ts +31 -0
- package/src/components/sources/raster-dem-source/RasterDEMSource.tsx +83 -0
- package/src/components/sources/raster-dem-source/RasterDEMSourceNativeComponent.ts +25 -0
- package/src/components/sources/raster-source/RasterSource.tsx +82 -0
- package/src/components/sources/raster-source/RasterSourceNativeComponent.ts +25 -0
- package/src/components/sources/vector-source/NativeVectorSourceModule.ts +15 -0
- package/src/components/sources/vector-source/VectorSource.tsx +137 -0
- package/src/components/sources/vector-source/VectorSourceNativeComponent.ts +45 -0
- package/src/components/user-location/NativeUserLocation.tsx +31 -0
- package/src/components/user-location/UserLocation.tsx +98 -0
- package/src/components/user-location/UserLocationNativeComponent.ts +19 -0
- package/src/components/user-location/UserLocationPuck.tsx +83 -0
- package/src/components/user-location/UserLocationPuckHeading.tsx +34 -0
- package/src/hooks/useCurrentPosition.ts +53 -0
- package/src/hooks/useFrozenId.ts +13 -0
- package/src/hooks/useNativeBridge.ts +128 -0
- package/src/index.ts +119 -0
- package/src/modules/location/LocationManager.ts +174 -0
- package/src/modules/location/NativeLocationModule.ts +33 -0
- package/src/modules/log/LogManager.ts +115 -0
- package/src/modules/log/NativeLogModule.ts +16 -0
- package/src/modules/network/NativeNetworkModule.ts +8 -0
- package/src/modules/network/NetworkManager.ts +28 -0
- package/src/modules/offline/NativeOfflineModule.ts +63 -0
- package/src/modules/offline/OfflineManager.ts +428 -0
- package/src/modules/offline/OfflinePack.ts +44 -0
- package/src/modules/static-map/NativeStaticMapModule.ts +26 -0
- package/src/modules/static-map/StaticMapManager.ts +127 -0
- package/src/modules/transform-request/NativeTransformRequestModule.ts +41 -0
- package/src/modules/transform-request/TransformRequestManager.ts +304 -0
- package/src/plugin/MapVinaPluginProps.ts +84 -0
- package/src/plugin/android.ts +68 -0
- package/src/plugin/ios.ts +114 -0
- package/src/types/Anchor.ts +43 -0
- package/src/types/BaseProps.ts +6 -0
- package/src/types/LngLat.ts +4 -0
- package/src/types/LngLatBounds.ts +12 -0
- package/src/types/MapVinaRNStyles.ts +1335 -0
- package/src/types/PixelPoint.ts +4 -0
- package/src/types/PixelPointBounds.ts +9 -0
- package/src/types/PressEvent.ts +17 -0
- package/src/types/PressEventWithFeatures.ts +8 -0
- package/src/types/PressableSourceProps.ts +21 -0
- package/src/types/ViewPadding.ts +9 -0
- package/src/types/codegen/UnsafeMixed.ts +9 -0
- package/src/utils/BridgeValue.ts +90 -0
- package/src/utils/StyleValue.ts +52 -0
- package/src/utils/animated/AbstractAnimatedCoordinates.ts +145 -0
- package/src/utils/animated/Animated.ts +33 -0
- package/src/utils/animated/AnimatedCoordinatesArray.ts +114 -0
- package/src/utils/animated/AnimatedExtractCoordinateFromArray.ts +37 -0
- package/src/utils/animated/AnimatedGeoJSON.ts +90 -0
- package/src/utils/animated/AnimatedPoint.ts +153 -0
- package/src/utils/animated/AnimatedRouteCoordinatesArray.ts +155 -0
- package/src/utils/convertStyleSpec.ts +61 -0
- package/src/utils/findNodeHandle.ts +14 -0
- package/src/utils/getNativeFilter.ts +15 -0
- package/src/utils/getStylePropertyType.ts +268 -0
- package/src/utils/index.ts +105 -0
|
@@ -0,0 +1,905 @@
|
|
|
1
|
+
#import "MLRNMapView.h"
|
|
2
|
+
|
|
3
|
+
#import "CameraUpdateQueue.h"
|
|
4
|
+
#import "MLRNGeoJSONSource.h"
|
|
5
|
+
#import "MLRNImageUtils.h"
|
|
6
|
+
#import "MLRNImages.h"
|
|
7
|
+
#import "MLRNLogging.h"
|
|
8
|
+
#import "MLRNMapTouchEvent.h"
|
|
9
|
+
#import "MLRNNativeUserLocation.h"
|
|
10
|
+
#import "MLRNStyle.h"
|
|
11
|
+
#import "MLRNUserLocation.h"
|
|
12
|
+
#import "MLRNUtils.h"
|
|
13
|
+
|
|
14
|
+
@implementation MLRNMapView {
|
|
15
|
+
BOOL _pendingInitialLayout;
|
|
16
|
+
CGPoint _lastTapPoint;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static double const DEG2RAD = M_PI / 180;
|
|
20
|
+
static double const LAT_MAX = 85.051128779806604;
|
|
21
|
+
static double const TILE_SIZE = 256;
|
|
22
|
+
static double const EARTH_RADIUS_M = 6378137;
|
|
23
|
+
static double const M2PI = M_PI * 2;
|
|
24
|
+
|
|
25
|
+
- (instancetype)initWithFrame:(CGRect)frame {
|
|
26
|
+
if (self = [super initWithFrame:frame]) {
|
|
27
|
+
self.delegate = self;
|
|
28
|
+
|
|
29
|
+
_pendingInitialLayout = YES;
|
|
30
|
+
_lastTapPoint = CGPointZero;
|
|
31
|
+
_annotationSelected = NO;
|
|
32
|
+
_reactTouchZoomEnabled = YES;
|
|
33
|
+
_reactDoubleTapZoomEnabled = YES;
|
|
34
|
+
_reactDoubleTapHoldZoomEnabled = YES;
|
|
35
|
+
_cameraUpdateQueue = [[CameraUpdateQueue alloc] init];
|
|
36
|
+
_sources = [[NSMutableArray alloc] init];
|
|
37
|
+
_images = [[NSMutableArray alloc] init];
|
|
38
|
+
_layers = [[NSMutableArray alloc] init];
|
|
39
|
+
_pointAnnotations = [[NSMutableArray alloc] init];
|
|
40
|
+
_reactSubviews = [[NSMutableArray alloc] init];
|
|
41
|
+
_layerWaiters = [[NSMutableDictionary alloc] init];
|
|
42
|
+
_styleWaiters = [[NSMutableArray alloc] init];
|
|
43
|
+
_logging = [[MLRNLogging alloc] init];
|
|
44
|
+
|
|
45
|
+
// Apply JS defaults
|
|
46
|
+
_reactCompassEnabled = NO;
|
|
47
|
+
_reactCompassHiddenFacingNorth = YES;
|
|
48
|
+
[self _applyCompassVisibility];
|
|
49
|
+
|
|
50
|
+
// Setup map gesture recognizers
|
|
51
|
+
UITapGestureRecognizer *tap =
|
|
52
|
+
[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapMap:)];
|
|
53
|
+
|
|
54
|
+
UILongPressGestureRecognizer *longPress =
|
|
55
|
+
[[UILongPressGestureRecognizer alloc] initWithTarget:self
|
|
56
|
+
action:@selector(didLongPressMap:)];
|
|
57
|
+
|
|
58
|
+
// This allows the internal annotation gestures to take precedence over the map tap gesture
|
|
59
|
+
for (int i = 0; i < self.gestureRecognizers.count; i++) {
|
|
60
|
+
UIGestureRecognizer *gestureRecognizer = self.gestureRecognizers[i];
|
|
61
|
+
|
|
62
|
+
if ([gestureRecognizer isKindOfClass:[UITapGestureRecognizer class]]) {
|
|
63
|
+
[tap requireGestureRecognizerToFail:gestureRecognizer];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[self addGestureRecognizer:tap];
|
|
68
|
+
[self addGestureRecognizer:longPress];
|
|
69
|
+
}
|
|
70
|
+
return self;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
- (void)layoutSubviews {
|
|
74
|
+
[super layoutSubviews];
|
|
75
|
+
if (_pendingInitialLayout) {
|
|
76
|
+
_pendingInitialLayout = NO;
|
|
77
|
+
|
|
78
|
+
[_reactCamera initialLayout];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
- (void)invalidate {
|
|
83
|
+
if (_reactSubviews.count == 0) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
for (int i = 0; i < _reactSubviews.count; i++) {
|
|
87
|
+
[self removeFromMap:_reactSubviews[i]];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
- (void)layerAdded:(MLNStyleLayer *)layer {
|
|
92
|
+
NSString *layerId = layer.identifier;
|
|
93
|
+
NSMutableArray *waiters = [_layerWaiters valueForKey:layerId];
|
|
94
|
+
if (waiters) {
|
|
95
|
+
for (FoundLayerBlock foundLayerBlock in waiters) {
|
|
96
|
+
foundLayerBlock(layer);
|
|
97
|
+
}
|
|
98
|
+
[_layerWaiters removeObjectForKey:layerId];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
- (void)waitForLayerWithId:(nonnull NSString *)layerId
|
|
103
|
+
then:(void (^)(MLNStyleLayer *layer))foundLayer {
|
|
104
|
+
if (self.style) {
|
|
105
|
+
MLNStyleLayer *layer = [self.style layerWithIdentifier:layerId];
|
|
106
|
+
if (layer) {
|
|
107
|
+
foundLayer(layer);
|
|
108
|
+
} else {
|
|
109
|
+
NSMutableArray *existingWaiters = [_layerWaiters valueForKey:layerId];
|
|
110
|
+
|
|
111
|
+
NSMutableArray *waiters = existingWaiters;
|
|
112
|
+
if (waiters == nil) {
|
|
113
|
+
waiters = [[NSMutableArray alloc] init];
|
|
114
|
+
}
|
|
115
|
+
[waiters addObject:foundLayer];
|
|
116
|
+
if (!existingWaiters) {
|
|
117
|
+
[_layerWaiters setObject:waiters forKey:layerId];
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
- (void)getStyle:(void (^)(MLNStyle *style))onStyleLoaded {
|
|
124
|
+
if (self.style) {
|
|
125
|
+
onStyleLoaded(self.style);
|
|
126
|
+
} else {
|
|
127
|
+
[_styleWaiters addObject:onStyleLoaded];
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
- (void)notifyStyleLoaded {
|
|
132
|
+
if (!self.style) return;
|
|
133
|
+
for (StyleLoadedBlock styleLoadedBlock in self.styleWaiters) {
|
|
134
|
+
styleLoadedBlock(self.style);
|
|
135
|
+
}
|
|
136
|
+
[self.styleWaiters removeAllObjects];
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
- (void)addToMap:(UIView *)subview {
|
|
140
|
+
if ([subview isKindOfClass:[MLRNSource class]]) {
|
|
141
|
+
MLRNSource *source = (MLRNSource *)subview;
|
|
142
|
+
source.map = self;
|
|
143
|
+
[_sources addObject:(MLRNSource *)subview];
|
|
144
|
+
} else if ([subview isKindOfClass:[MLRNNativeUserLocation class]]) {
|
|
145
|
+
MLRNNativeUserLocation *nativeUserLocation = (MLRNNativeUserLocation *)subview;
|
|
146
|
+
nativeUserLocation.map = self;
|
|
147
|
+
} else if ([subview isKindOfClass:[MLRNPointAnnotation class]]) {
|
|
148
|
+
MLRNPointAnnotation *pointAnnotation = (MLRNPointAnnotation *)subview;
|
|
149
|
+
pointAnnotation.map = self;
|
|
150
|
+
[_pointAnnotations addObject:pointAnnotation];
|
|
151
|
+
} else if ([subview isKindOfClass:[MLRNCamera class]]) {
|
|
152
|
+
MLRNCamera *camera = (MLRNCamera *)subview;
|
|
153
|
+
camera.map = self;
|
|
154
|
+
} else if ([subview isKindOfClass:[MLRNImages class]]) {
|
|
155
|
+
MLRNImages *images = (MLRNImages *)subview;
|
|
156
|
+
images.map = self;
|
|
157
|
+
[_images addObject:images];
|
|
158
|
+
} else if ([subview isKindOfClass:[MLRNLayer class]]) {
|
|
159
|
+
MLRNLayer *layer = (MLRNLayer *)subview;
|
|
160
|
+
layer.map = self;
|
|
161
|
+
[_layers addObject:layer];
|
|
162
|
+
} else {
|
|
163
|
+
NSArray<UIView *> *childSubviews = [subview subviews];
|
|
164
|
+
|
|
165
|
+
for (int i = 0; i < childSubviews.count; i++) {
|
|
166
|
+
[self addToMap:childSubviews[i]];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
- (void)removeFromMap:(UIView *)subview {
|
|
172
|
+
if ([subview isKindOfClass:[MLRNSource class]]) {
|
|
173
|
+
MLRNSource *source = (MLRNSource *)subview;
|
|
174
|
+
source.map = nil;
|
|
175
|
+
[_sources removeObject:source];
|
|
176
|
+
} else if ([subview isKindOfClass:[MLRNPointAnnotation class]]) {
|
|
177
|
+
MLRNPointAnnotation *pointAnnotation = (MLRNPointAnnotation *)subview;
|
|
178
|
+
pointAnnotation.map = nil;
|
|
179
|
+
[_pointAnnotations removeObject:pointAnnotation];
|
|
180
|
+
} else if ([subview isKindOfClass:[MLRNCamera class]]) {
|
|
181
|
+
MLRNCamera *camera = (MLRNCamera *)subview;
|
|
182
|
+
camera.map = nil;
|
|
183
|
+
} else if ([subview isKindOfClass:[MLRNImages class]]) {
|
|
184
|
+
MLRNImages *images = (MLRNImages *)subview;
|
|
185
|
+
images.map = nil;
|
|
186
|
+
[_images removeObject:images];
|
|
187
|
+
} else if ([subview isKindOfClass:[MLRNLayer class]]) {
|
|
188
|
+
MLRNLayer *layer = (MLRNLayer *)subview;
|
|
189
|
+
layer.map = nil;
|
|
190
|
+
[_layers removeObject:layer];
|
|
191
|
+
} else if ([subview isKindOfClass:[MLRNNativeUserLocation class]]) {
|
|
192
|
+
MLRNNativeUserLocation *nativeUserLocation = (MLRNNativeUserLocation *)subview;
|
|
193
|
+
nativeUserLocation.map = nil;
|
|
194
|
+
} else {
|
|
195
|
+
NSArray<UIView *> *childSubViews = [subview subviews];
|
|
196
|
+
|
|
197
|
+
for (int i = 0; i < childSubViews.count; i++) {
|
|
198
|
+
[self removeFromMap:childSubViews[i]];
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if ([_layerWaiters count] > 0) {
|
|
202
|
+
RCTLogWarn(@"The following layers were waited on but never added to the map: %@",
|
|
203
|
+
[_layerWaiters allKeys]);
|
|
204
|
+
[_layerWaiters removeAllObjects];
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
- (void)setSourceVisibility:(BOOL)visible
|
|
209
|
+
sourceId:(NSString *)sourceId
|
|
210
|
+
sourceLayerId:(NSString *)sourceLayerId {
|
|
211
|
+
__weak __typeof__(self) weakSelf = self;
|
|
212
|
+
[self getStyle:^(MLNStyle *style) {
|
|
213
|
+
__strong __typeof__(self) strongSelf = weakSelf;
|
|
214
|
+
for (MLNStyleLayer *layer in strongSelf.style.layers) {
|
|
215
|
+
if ([layer isKindOfClass:[MLNForegroundStyleLayer class]]) {
|
|
216
|
+
MLNForegroundStyleLayer *foregroundLayer = (MLNForegroundStyleLayer *)layer;
|
|
217
|
+
if (![foregroundLayer.sourceIdentifier isEqualToString:sourceId]) continue;
|
|
218
|
+
if (sourceLayerId == nil || sourceLayerId.length == 0) {
|
|
219
|
+
layer.visible = visible;
|
|
220
|
+
} else if ([layer isKindOfClass:[MLNVectorStyleLayer class]]) {
|
|
221
|
+
MLNVectorStyleLayer *vectorLayer = (MLNVectorStyleLayer *)layer;
|
|
222
|
+
if ([vectorLayer.sourceLayerIdentifier isEqualToString:sourceLayerId]) {
|
|
223
|
+
layer.visible = visible;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}];
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
#pragma clang diagnostic push
|
|
232
|
+
#pragma clang diagnostic ignored "-Wobjc-missing-super-calls"
|
|
233
|
+
- (void)insertReactSubview:(UIView *)subview atIndex:(NSInteger)atIndex {
|
|
234
|
+
[self addToMap:subview];
|
|
235
|
+
[_reactSubviews insertObject:(UIView *)subview atIndex:(NSUInteger)atIndex];
|
|
236
|
+
}
|
|
237
|
+
#pragma clang diagnostic pop
|
|
238
|
+
|
|
239
|
+
#pragma clang diagnostic push
|
|
240
|
+
#pragma clang diagnostic ignored "-Wobjc-missing-super-calls"
|
|
241
|
+
- (void)removeReactSubview:(UIView *)subview {
|
|
242
|
+
// similarly, when the children are being removed we have to do the appropriate
|
|
243
|
+
// underlying mapview action here.
|
|
244
|
+
[self removeFromMap:subview];
|
|
245
|
+
[_reactSubviews removeObject:(UIView *)subview];
|
|
246
|
+
[(UIView *)subview removeFromSuperview];
|
|
247
|
+
}
|
|
248
|
+
#pragma clang diagnostic pop
|
|
249
|
+
|
|
250
|
+
#pragma clang diagnostic push
|
|
251
|
+
#pragma clang diagnostic ignored "-Wobjc-missing-super-calls"
|
|
252
|
+
- (NSArray<UIView *> *)reactSubviews {
|
|
253
|
+
return _reactSubviews;
|
|
254
|
+
}
|
|
255
|
+
#pragma clang diagnostic pop
|
|
256
|
+
|
|
257
|
+
// MARK: - UIGestureRecognizers
|
|
258
|
+
|
|
259
|
+
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
|
260
|
+
[super touchesBegan:touches withEvent:event];
|
|
261
|
+
_annotationSelected = NO;
|
|
262
|
+
UITouch *touch = touches.anyObject;
|
|
263
|
+
if (touch != nil) {
|
|
264
|
+
_lastTapPoint = [touch locationInView:self];
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
- (void)handleTapAtPoint:(CGPoint)screenPoint {
|
|
269
|
+
NSArray<MLRNSource *> *touchableSources = [self getAllTouchableSources];
|
|
270
|
+
|
|
271
|
+
NSMutableDictionary<NSString *, NSArray<id<MLNFeature>> *> *hits =
|
|
272
|
+
[[NSMutableDictionary alloc] init];
|
|
273
|
+
NSMutableArray<MLRNSource *> *hitTouchableSources = [[NSMutableArray alloc] init];
|
|
274
|
+
for (MLRNSource *touchableSource in touchableSources) {
|
|
275
|
+
NSDictionary<NSString *, NSNumber *> *hitbox = touchableSource.hitbox;
|
|
276
|
+
float halfWidth = [hitbox[@"width"] floatValue] / 2.f;
|
|
277
|
+
float halfHeight = [hitbox[@"height"] floatValue] / 2.f;
|
|
278
|
+
|
|
279
|
+
CGFloat top = screenPoint.y - halfHeight;
|
|
280
|
+
CGFloat left = screenPoint.x - halfWidth;
|
|
281
|
+
CGRect hitboxRect =
|
|
282
|
+
CGRectMake(left, top, [hitbox[@"width"] floatValue], [hitbox[@"height"] floatValue]);
|
|
283
|
+
|
|
284
|
+
NSArray<id<MLNFeature>> *features =
|
|
285
|
+
[self visibleFeaturesInRect:hitboxRect
|
|
286
|
+
inStyleLayersWithIdentifiers:[NSSet setWithArray:[touchableSource getLayerIDs]]
|
|
287
|
+
predicate:nil];
|
|
288
|
+
|
|
289
|
+
if (features.count > 0) {
|
|
290
|
+
hits[touchableSource.id] = features;
|
|
291
|
+
[hitTouchableSources addObject:touchableSource];
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (hits.count > 0) {
|
|
296
|
+
MLRNSource *source = [self getTouchableSourceWithHighestZIndex:hitTouchableSources];
|
|
297
|
+
if (source != nil && source.hasPressListener) {
|
|
298
|
+
NSArray *geoJSONDicts = [MLRNUtils featuresToJSON:hits[source.id]];
|
|
299
|
+
|
|
300
|
+
CLLocationCoordinate2D coordinate = [self convertPoint:screenPoint toCoordinateFromView:self];
|
|
301
|
+
|
|
302
|
+
source.onPress(@{
|
|
303
|
+
@"lngLat" : @[
|
|
304
|
+
[NSNumber numberWithDouble:coordinate.longitude],
|
|
305
|
+
[NSNumber numberWithDouble:coordinate.latitude]
|
|
306
|
+
],
|
|
307
|
+
@"point" : @[
|
|
308
|
+
[NSNumber numberWithDouble:screenPoint.x], [NSNumber numberWithDouble:screenPoint.y]
|
|
309
|
+
],
|
|
310
|
+
@"features" : geoJSONDicts,
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
if (self.reactOnPress != nil) {
|
|
318
|
+
MLRNMapTouchEvent *event = [MLRNMapTouchEvent makeTapEvent:self withPoint:screenPoint];
|
|
319
|
+
self.reactOnPress(event.toJSON);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
- (void)didTapMap:(UITapGestureRecognizer *)recognizer {
|
|
324
|
+
CGPoint screenPoint = [recognizer locationInView:self];
|
|
325
|
+
[self handleTapAtPoint:screenPoint];
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
- (void)didLongPressMap:(UILongPressGestureRecognizer *)recognizer {
|
|
329
|
+
MLRNMapView *mapView = (MLRNMapView *)recognizer.view;
|
|
330
|
+
|
|
331
|
+
if (mapView == nil || mapView.reactOnPress == nil ||
|
|
332
|
+
recognizer.state != UIGestureRecognizerStateBegan) {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
MLRNMapTouchEvent *event =
|
|
337
|
+
[MLRNMapTouchEvent makeLongPressEvent:mapView withPoint:[recognizer locationInView:mapView]];
|
|
338
|
+
self.reactOnLongPress(event.toJSON);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// MARK: - Prop Setters
|
|
342
|
+
|
|
343
|
+
- (void)setReactMapStyle:(NSString *)reactMapStyle {
|
|
344
|
+
_reactMapStyle = reactMapStyle;
|
|
345
|
+
[self _removeAllSourcesFromMap];
|
|
346
|
+
|
|
347
|
+
self.styleURL = [MLRNUtils styleURLFromMapStyle:_reactMapStyle];
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
- (void)setReactLight:(NSDictionary *)reactLight {
|
|
351
|
+
_reactLight = reactLight;
|
|
352
|
+
[self _applyLight];
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
- (void)_applyLight {
|
|
356
|
+
if (_reactLight == nil || self.style == nil) {
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
MLNLight *light = [[MLNLight alloc] init];
|
|
361
|
+
MLRNStyle *style = [[MLRNStyle alloc] init];
|
|
362
|
+
[style lightLayer:light
|
|
363
|
+
withReactStyle:_reactLight
|
|
364
|
+
isValid:^BOOL {
|
|
365
|
+
return self.style != nil;
|
|
366
|
+
}];
|
|
367
|
+
self.style.light = light;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
- (void)setReactContentInset:(NSArray<NSNumber *> *)reactContentInset {
|
|
371
|
+
NSNumber *top = [reactContentInset valueForKey:@"top"];
|
|
372
|
+
NSNumber *right = [reactContentInset valueForKey:@"right"];
|
|
373
|
+
NSNumber *bottom = [reactContentInset valueForKey:@"bottom"];
|
|
374
|
+
NSNumber *left = [reactContentInset valueForKey:@"left"];
|
|
375
|
+
|
|
376
|
+
self.contentInset =
|
|
377
|
+
UIEdgeInsetsMake(top.floatValue, left.floatValue, bottom.floatValue, right.floatValue);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
- (void)setReactPreferredFramesPerSecond:(NSInteger)reactPreferredFramesPerSecond {
|
|
381
|
+
if (reactPreferredFramesPerSecond == -1) {
|
|
382
|
+
self.preferredFramesPerSecond = MLNMapViewPreferredFramesPerSecondDefault;
|
|
383
|
+
} else {
|
|
384
|
+
self.preferredFramesPerSecond = reactPreferredFramesPerSecond;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
- (void)setReactScrollEnabled:(BOOL)reactScrollEnabled {
|
|
389
|
+
_reactScrollEnabled = reactScrollEnabled;
|
|
390
|
+
self.scrollEnabled = _reactScrollEnabled;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
- (void)setReactTouchZoomEnabled:(BOOL)reactTouchZoomEnabled {
|
|
394
|
+
_reactTouchZoomEnabled = reactTouchZoomEnabled;
|
|
395
|
+
[self _applyZoomSettings];
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
- (void)setReactDoubleTapZoomEnabled:(BOOL)reactDoubleTapZoomEnabled {
|
|
399
|
+
_reactDoubleTapZoomEnabled = reactDoubleTapZoomEnabled;
|
|
400
|
+
[self _applyZoomSettings];
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
- (void)setReactDoubleTapHoldZoomEnabled:(BOOL)reactDoubleTapHoldZoomEnabled {
|
|
404
|
+
_reactDoubleTapHoldZoomEnabled = reactDoubleTapHoldZoomEnabled;
|
|
405
|
+
[self _applyZoomSettings];
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
- (void)_applyZoomSettings {
|
|
409
|
+
self.zoomEnabled =
|
|
410
|
+
_reactTouchZoomEnabled || _reactDoubleTapZoomEnabled || _reactDoubleTapHoldZoomEnabled;
|
|
411
|
+
|
|
412
|
+
if (self.zoomEnabled) {
|
|
413
|
+
for (UIGestureRecognizer *gestureRecognizer in self.gestureRecognizers) {
|
|
414
|
+
if ([gestureRecognizer isKindOfClass:[UIPinchGestureRecognizer class]]) {
|
|
415
|
+
gestureRecognizer.enabled = _reactTouchZoomEnabled;
|
|
416
|
+
} else if ([gestureRecognizer isKindOfClass:[UITapGestureRecognizer class]]) {
|
|
417
|
+
UITapGestureRecognizer *tapGestureRecognizer = (UITapGestureRecognizer *)gestureRecognizer;
|
|
418
|
+
|
|
419
|
+
if (tapGestureRecognizer.numberOfTapsRequired == 2) {
|
|
420
|
+
gestureRecognizer.enabled = _reactDoubleTapZoomEnabled;
|
|
421
|
+
}
|
|
422
|
+
} else if ([gestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]]) {
|
|
423
|
+
UILongPressGestureRecognizer *longPressGestureRecognizer =
|
|
424
|
+
(UILongPressGestureRecognizer *)gestureRecognizer;
|
|
425
|
+
|
|
426
|
+
if (longPressGestureRecognizer.minimumPressDuration == 0) {
|
|
427
|
+
gestureRecognizer.enabled = _reactDoubleTapHoldZoomEnabled;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
- (void)setReactRotateEnabled:(BOOL)reactRotateEnabled {
|
|
435
|
+
_reactRotateEnabled = reactRotateEnabled;
|
|
436
|
+
self.rotateEnabled = _reactRotateEnabled;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
- (void)setReactPitchEnabled:(BOOL)reactPitchEnabled {
|
|
440
|
+
_reactPitchEnabled = reactPitchEnabled;
|
|
441
|
+
self.pitchEnabled = _reactPitchEnabled;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
- (void)setReactAttributionEnabled:(BOOL)reactAttributionEnabled {
|
|
445
|
+
_reactAttributionEnabled = reactAttributionEnabled;
|
|
446
|
+
self.attributionButton.hidden = !_reactAttributionEnabled;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
- (void)setReactAttributionPosition:(NSDictionary<NSString *, NSNumber *> *)position {
|
|
450
|
+
__weak typeof(self) weakSelf = self;
|
|
451
|
+
[self setOrnamentPosition:position
|
|
452
|
+
defaultPosition:MLNOrnamentPositionBottomRight
|
|
453
|
+
setPosition:^(MLNOrnamentPosition ornamentPosition) {
|
|
454
|
+
__strong typeof(weakSelf) strongSelf = weakSelf;
|
|
455
|
+
if (!strongSelf) return;
|
|
456
|
+
[strongSelf setAttributionButtonPosition:ornamentPosition];
|
|
457
|
+
}
|
|
458
|
+
setMargins:^(CGPoint point) {
|
|
459
|
+
__strong typeof(weakSelf) strongSelf = weakSelf;
|
|
460
|
+
if (!strongSelf) return;
|
|
461
|
+
[strongSelf setAttributionButtonMargins:point];
|
|
462
|
+
}];
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
- (void)setReactLogoEnabled:(BOOL)reactLogoEnabled {
|
|
466
|
+
_reactLogoEnabled = reactLogoEnabled;
|
|
467
|
+
self.logoView.hidden = !_reactLogoEnabled;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
- (void)setReactLogoPosition:(NSDictionary<NSString *, NSNumber *> *)position {
|
|
471
|
+
__weak typeof(self) weakSelf = self;
|
|
472
|
+
[self setOrnamentPosition:position
|
|
473
|
+
defaultPosition:MLNOrnamentPositionBottomLeft
|
|
474
|
+
setPosition:^(MLNOrnamentPosition ornamentPosition) {
|
|
475
|
+
__strong typeof(weakSelf) strongSelf = weakSelf;
|
|
476
|
+
if (!strongSelf) return;
|
|
477
|
+
[strongSelf setLogoViewPosition:ornamentPosition];
|
|
478
|
+
}
|
|
479
|
+
setMargins:^(CGPoint point) {
|
|
480
|
+
__strong typeof(weakSelf) strongSelf = weakSelf;
|
|
481
|
+
if (!strongSelf) return;
|
|
482
|
+
[strongSelf setLogoViewMargins:point];
|
|
483
|
+
}];
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
- (void)_applyCompassVisibility {
|
|
487
|
+
self.compassView.compassVisibility =
|
|
488
|
+
!_reactCompassEnabled ? MLNOrnamentVisibilityHidden
|
|
489
|
+
: (_reactCompassHiddenFacingNorth ? MLNOrnamentVisibilityAdaptive
|
|
490
|
+
: MLNOrnamentVisibilityVisible);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
- (void)setReactCompassEnabled:(BOOL)reactCompassEnabled {
|
|
494
|
+
_reactCompassEnabled = reactCompassEnabled;
|
|
495
|
+
[self _applyCompassVisibility];
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
- (void)setReactCompassPosition:(NSDictionary<NSString *, NSNumber *> *)position {
|
|
499
|
+
__weak typeof(self) weakSelf = self;
|
|
500
|
+
[self setOrnamentPosition:position
|
|
501
|
+
defaultPosition:MLNOrnamentPositionTopRight
|
|
502
|
+
setPosition:^(MLNOrnamentPosition ornamentPosition) {
|
|
503
|
+
__strong typeof(weakSelf) strongSelf = weakSelf;
|
|
504
|
+
if (!strongSelf) return;
|
|
505
|
+
[strongSelf setCompassViewPosition:ornamentPosition];
|
|
506
|
+
}
|
|
507
|
+
setMargins:^(CGPoint point) {
|
|
508
|
+
__strong typeof(weakSelf) strongSelf = weakSelf;
|
|
509
|
+
if (!strongSelf) return;
|
|
510
|
+
[strongSelf setCompassViewMargins:point];
|
|
511
|
+
}];
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
- (void)setReactCompassHiddenFacingNorth:(BOOL)reactCompassHiddenFacingNorth {
|
|
515
|
+
_reactCompassHiddenFacingNorth = reactCompassHiddenFacingNorth;
|
|
516
|
+
[self _applyCompassVisibility];
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
- (void)setReactScaleBarEnabled:(BOOL)reactScaleBarEnabled {
|
|
520
|
+
_reactScaleBarEnabled = reactScaleBarEnabled;
|
|
521
|
+
[self _applyScaleBar];
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
- (void)_applyScaleBar {
|
|
525
|
+
// Scale bar needs the style to be loaded to calculate its dimensions
|
|
526
|
+
if (self.style == nil) {
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
self.showsScale = _reactScaleBarEnabled;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
- (void)setReactScaleBarPosition:(NSDictionary<NSString *, NSNumber *> *)position {
|
|
533
|
+
__weak typeof(self) weakSelf = self;
|
|
534
|
+
[self setOrnamentPosition:position
|
|
535
|
+
defaultPosition:MLNOrnamentPositionTopLeft
|
|
536
|
+
setPosition:^(MLNOrnamentPosition ornamentPosition) {
|
|
537
|
+
__strong typeof(weakSelf) strongSelf = weakSelf;
|
|
538
|
+
if (!strongSelf) return;
|
|
539
|
+
[strongSelf setScaleBarPosition:ornamentPosition];
|
|
540
|
+
}
|
|
541
|
+
setMargins:^(CGPoint point) {
|
|
542
|
+
__strong typeof(weakSelf) strongSelf = weakSelf;
|
|
543
|
+
if (!strongSelf) return;
|
|
544
|
+
[strongSelf setScaleBarMargins:point];
|
|
545
|
+
}];
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
- (void)setReactShowUserLocation:(BOOL)reactShowUserLocation {
|
|
549
|
+
self.showsUserLocation = reactShowUserLocation;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
// MARK: - Methods
|
|
553
|
+
|
|
554
|
+
- (NSString *)takeSnap:(BOOL)writeToDisk {
|
|
555
|
+
UIGraphicsBeginImageContextWithOptions(self.bounds.size, YES, 0);
|
|
556
|
+
[self drawViewHierarchyInRect:self.bounds afterScreenUpdates:YES];
|
|
557
|
+
UIImage *snapshot = UIGraphicsGetImageFromCurrentImageContext();
|
|
558
|
+
UIGraphicsEndImageContext();
|
|
559
|
+
return writeToDisk ? [MLRNImageUtils createTempFile:snapshot]
|
|
560
|
+
: [MLRNImageUtils createBase64:snapshot];
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
- (CLLocationDistance)getMetersPerPixelAtLatitude:(double)latitude withZoom:(double)zoomLevel {
|
|
564
|
+
double constrainedZoom =
|
|
565
|
+
[[MLRNUtils clamp:[NSNumber numberWithDouble:zoomLevel]
|
|
566
|
+
min:[NSNumber numberWithDouble:self.minimumZoomLevel]
|
|
567
|
+
max:[NSNumber numberWithDouble:self.maximumZoomLevel]] doubleValue];
|
|
568
|
+
|
|
569
|
+
double constrainedLatitude = [[MLRNUtils clamp:[NSNumber numberWithDouble:latitude]
|
|
570
|
+
min:[NSNumber numberWithDouble:-LAT_MAX]
|
|
571
|
+
max:[NSNumber numberWithDouble:LAT_MAX]] doubleValue];
|
|
572
|
+
|
|
573
|
+
double constrainedScale = pow(2.0, constrainedZoom);
|
|
574
|
+
return cos(constrainedLatitude * DEG2RAD) * M2PI * EARTH_RADIUS_M /
|
|
575
|
+
(constrainedScale * TILE_SIZE);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
- (CLLocationDistance)altitudeFromZoom:(double)zoomLevel {
|
|
579
|
+
return [self altitudeFromZoom:zoomLevel atLatitude:self.camera.centerCoordinate.latitude];
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
- (CLLocationDistance)altitudeFromZoom:(double)zoomLevel atLatitude:(CLLocationDegrees)latitude {
|
|
583
|
+
return [self altitudeFromZoom:zoomLevel atLatitude:latitude atPitch:self.camera.pitch];
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
- (CLLocationDistance)altitudeFromZoom:(double)zoomLevel
|
|
587
|
+
atLatitude:(CLLocationDegrees)latitude
|
|
588
|
+
atPitch:(CGFloat)pitch {
|
|
589
|
+
return MLNAltitudeForZoomLevel(zoomLevel, pitch, latitude, self.frame.size);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
- (MLRNPointAnnotation *)getRCTPointAnnotation:(MLNPointAnnotation *)mlnAnnotation {
|
|
593
|
+
for (int i = 0; i < _pointAnnotations.count; i++) {
|
|
594
|
+
MLRNPointAnnotation *rctAnnotation = _pointAnnotations[i];
|
|
595
|
+
if (rctAnnotation.annotation == mlnAnnotation) {
|
|
596
|
+
return rctAnnotation;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
return nil;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
- (NSArray<MLRNSource *> *)getAllTouchableSources {
|
|
603
|
+
NSMutableArray<MLRNSource *> *touchableSources = [[NSMutableArray alloc] init];
|
|
604
|
+
|
|
605
|
+
for (MLRNSource *source in _sources) {
|
|
606
|
+
if (source.hasPressListener) {
|
|
607
|
+
[touchableSources addObject:source];
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
return touchableSources;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
- (NSArray<MLRNImages *> *)getAllImages {
|
|
615
|
+
return [_images copy];
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
- (NSArray<MLRNGeoJSONSource *> *)getAllShapeSources {
|
|
619
|
+
NSMutableArray<MLRNSource *> *shapeSources = [[NSMutableArray alloc] init];
|
|
620
|
+
|
|
621
|
+
for (MLRNSource *source in _sources) {
|
|
622
|
+
if ([source isKindOfClass:[MLRNGeoJSONSource class]]) {
|
|
623
|
+
[shapeSources addObject:(MLRNGeoJSONSource *)source];
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
return [shapeSources copy];
|
|
628
|
+
}
|
|
629
|
+
- (MLRNSource *)getTouchableSourceWithHighestZIndex:(NSArray<MLRNSource *> *)touchableSources {
|
|
630
|
+
if (touchableSources == nil || touchableSources.count == 0) {
|
|
631
|
+
return nil;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
if (touchableSources.count == 1) {
|
|
635
|
+
return touchableSources[0];
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
NSMutableDictionary<NSString *, MLRNSource *> *layerToSourceDict =
|
|
639
|
+
[[NSMutableDictionary alloc] init];
|
|
640
|
+
for (MLRNSource *touchableSource in touchableSources) {
|
|
641
|
+
NSArray<NSString *> *layerIds = [touchableSource getLayerIDs];
|
|
642
|
+
|
|
643
|
+
for (NSString *layerId in layerIds) {
|
|
644
|
+
layerToSourceDict[layerId] = touchableSource;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
NSArray<MLNStyleLayer *> *layers = self.style.layers;
|
|
649
|
+
for (int i = (int)layers.count - 1; i >= 0; i--) {
|
|
650
|
+
MLNStyleLayer *layer = layers[i];
|
|
651
|
+
|
|
652
|
+
MLRNSource *source = layerToSourceDict[layer.identifier];
|
|
653
|
+
if (source != nil) {
|
|
654
|
+
return source;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
return nil;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
- (void)_removeAllSourcesFromMap {
|
|
662
|
+
if (self.style == nil || _sources.count == 0) {
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
for (MLRNSource *source in _sources) {
|
|
666
|
+
source.map = nil;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
- (void)didChangeUserTrackingMode:(MLNUserTrackingMode)mode animated:(BOOL)animated {
|
|
671
|
+
[_reactCamera didChangeUserTrackingMode:mode animated:animated];
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
#pragma mark - MLNMapViewDelegate
|
|
675
|
+
|
|
676
|
+
- (MLNAnnotationView *)mapView:(MLNMapView *)mapView
|
|
677
|
+
viewForAnnotation:(id<MLNAnnotation>)annotation {
|
|
678
|
+
if ([annotation isKindOfClass:[MLNUserLocation class]] && mapView.userLocation != nil) {
|
|
679
|
+
MLRNMapView *reactMapView = ((MLRNMapView *)mapView);
|
|
680
|
+
if (reactMapView.useNativeUserLocationAnnotationView) {
|
|
681
|
+
return nil;
|
|
682
|
+
}
|
|
683
|
+
return [[MLRNUserLocation sharedInstance] hiddenUserAnnotation];
|
|
684
|
+
} else if ([annotation isKindOfClass:[MLRNPointAnnotation class]]) {
|
|
685
|
+
MLRNPointAnnotation *rctAnnotation = (MLRNPointAnnotation *)annotation;
|
|
686
|
+
return [rctAnnotation getAnnotationView];
|
|
687
|
+
}
|
|
688
|
+
return nil;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
- (void)mapView:(MLNMapView *)mapView
|
|
692
|
+
didChangeUserTrackingMode:(MLNUserTrackingMode)mode
|
|
693
|
+
animated:(BOOL)animated {
|
|
694
|
+
MLRNMapView *reactMapView = ((MLRNMapView *)mapView);
|
|
695
|
+
[reactMapView didChangeUserTrackingMode:mode animated:animated];
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
- (void)mapView:(MLNMapView *)mapView didSelectAnnotation:(nonnull id<MLNAnnotation>)annotation {
|
|
699
|
+
if ([annotation isKindOfClass:[MLRNPointAnnotation class]]) {
|
|
700
|
+
MLRNPointAnnotation *rctAnnotation = (MLRNPointAnnotation *)annotation;
|
|
701
|
+
|
|
702
|
+
if (rctAnnotation.reactOnSelect != nil) {
|
|
703
|
+
rctAnnotation.reactOnSelect([rctAnnotation makeEventPayload]);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
- (void)mapView:(MLNMapView *)mapView didDeselectAnnotation:(nonnull id<MLNAnnotation>)annotation {
|
|
709
|
+
if ([annotation isKindOfClass:[MLRNPointAnnotation class]]) {
|
|
710
|
+
MLRNPointAnnotation *rctAnnotation = (MLRNPointAnnotation *)annotation;
|
|
711
|
+
|
|
712
|
+
if (rctAnnotation.reactOnDeselect != nil) {
|
|
713
|
+
rctAnnotation.reactOnDeselect([rctAnnotation makeEventPayload]);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
if (_annotationSelected) {
|
|
718
|
+
_annotationSelected = NO;
|
|
719
|
+
} else {
|
|
720
|
+
[self handleTapAtPoint:_lastTapPoint];
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
- (BOOL)mapView:(MLNMapView *)mapView annotationCanShowCallout:(id<MLNAnnotation>)annotation {
|
|
725
|
+
if ([annotation isKindOfClass:[MLRNPointAnnotation class]]) {
|
|
726
|
+
MLRNPointAnnotation *rctAnnotation = (MLRNPointAnnotation *)annotation;
|
|
727
|
+
return rctAnnotation.calloutView != nil;
|
|
728
|
+
}
|
|
729
|
+
return NO;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
- (UIView<MLNCalloutView> *)mapView:(MLNMapView *)mapView
|
|
733
|
+
calloutViewForAnnotation:(id<MLNAnnotation>)annotation {
|
|
734
|
+
if ([annotation isKindOfClass:[MLRNPointAnnotation class]]) {
|
|
735
|
+
MLRNPointAnnotation *rctAnnotation = (MLRNPointAnnotation *)annotation;
|
|
736
|
+
return rctAnnotation.calloutView;
|
|
737
|
+
}
|
|
738
|
+
return nil;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
- (BOOL)mapView:(MLNMapView *)mapView
|
|
742
|
+
shouldChangeFromCamera:(MLNMapCamera *)oldCamera
|
|
743
|
+
toCamera:(MLNMapCamera *)newCamera {
|
|
744
|
+
MLRNMapView *reactMapView = ((MLRNMapView *)mapView);
|
|
745
|
+
return MLNCoordinateBoundsIsEmpty(reactMapView.maxBounds) ||
|
|
746
|
+
MLNCoordinateInCoordinateBounds(newCamera.centerCoordinate, reactMapView.maxBounds);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
- (void)mapView:(MLNMapView *)mapView
|
|
750
|
+
regionWillChangeWithReason:(MLNCameraChangeReason)reason
|
|
751
|
+
animated:(BOOL)animated {
|
|
752
|
+
((MLRNMapView *)mapView).isUserInteraction = (BOOL)(reason & ~MLNCameraChangeReasonProgrammatic);
|
|
753
|
+
NSDictionary *viewState = [self makeViewState:mapView animated:animated];
|
|
754
|
+
|
|
755
|
+
self.reactOnRegionWillChange(viewState);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
- (void)mapViewRegionIsChanging:(MLNMapView *)mapView {
|
|
759
|
+
NSDictionary *viewState = [self makeViewState:mapView animated:false];
|
|
760
|
+
|
|
761
|
+
self.reactOnRegionIsChanging(viewState);
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
- (void)mapView:(MLNMapView *)mapView
|
|
765
|
+
regionDidChangeWithReason:(MLNCameraChangeReason)reason
|
|
766
|
+
animated:(BOOL)animated {
|
|
767
|
+
if (((reason & MLNCameraChangeReasonTransitionCancelled) ==
|
|
768
|
+
MLNCameraChangeReasonTransitionCancelled) &&
|
|
769
|
+
((reason & MLNCameraChangeReasonGesturePan) != MLNCameraChangeReasonGesturePan))
|
|
770
|
+
return;
|
|
771
|
+
|
|
772
|
+
((MLRNMapView *)mapView).isUserInteraction = (BOOL)(reason & ~MLNCameraChangeReasonProgrammatic);
|
|
773
|
+
|
|
774
|
+
NSDictionary *viewState = [self makeViewState:mapView animated:animated];
|
|
775
|
+
|
|
776
|
+
self.reactOnRegionDidChange(viewState);
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
- (void)mapViewWillStartLoadingMap:(MLNMapView *)mapView {
|
|
780
|
+
self.reactOnWillStartLoadingMap(nil);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
- (void)mapViewDidFinishLoadingMap:(MLNMapView *)mapView {
|
|
784
|
+
self.reactOnDidFinishLoadingMap(nil);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
- (void)mapViewDidFailLoadingMap:(MLNMapView *)mapView withError:(NSError *)error {
|
|
788
|
+
NSLog(@"Failed loading map %@", error);
|
|
789
|
+
self.reactOnDidFailLoadingMap(nil);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
- (void)mapViewWillStartRenderingFrame:(MLNMapView *)mapView {
|
|
793
|
+
self.reactOnWillStartRenderingFrame(nil);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
- (void)mapViewDidFinishRenderingFrame:(MLNMapView *)mapView fullyRendered:(BOOL)fullyRendered {
|
|
797
|
+
if (fullyRendered) {
|
|
798
|
+
self.reactOnDidFinishRenderingFrameFully(nil);
|
|
799
|
+
} else {
|
|
800
|
+
self.reactOnDidFinishRenderingFrame(nil);
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
- (void)mapViewWillStartRenderingMap:(MLNMapView *)mapView {
|
|
805
|
+
self.reactOnWillStartRenderingMap(nil);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
- (void)mapViewDidFinishRenderingMap:(MLNMapView *)mapView fullyRendered:(BOOL)fullyRendered {
|
|
809
|
+
if (fullyRendered) {
|
|
810
|
+
self.reactOnDidFinishRenderingMapFully(nil);
|
|
811
|
+
} else {
|
|
812
|
+
self.reactOnDidFinishRenderingMap(nil);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
- (void)mapView:(MLNMapView *)mapView didFinishLoadingStyle:(MLNStyle *)style {
|
|
817
|
+
MLRNMapView *reactMapView = (MLRNMapView *)mapView;
|
|
818
|
+
|
|
819
|
+
for (int i = 0; i < reactMapView.sources.count; i++) {
|
|
820
|
+
MLRNSource *source = reactMapView.sources[i];
|
|
821
|
+
source.map = reactMapView;
|
|
822
|
+
}
|
|
823
|
+
for (int i = 0; i < reactMapView.layers.count; i++) {
|
|
824
|
+
MLRNLayer *layer = reactMapView.layers[i];
|
|
825
|
+
layer.map = reactMapView;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
[reactMapView _applyLight];
|
|
829
|
+
[reactMapView _applyScaleBar];
|
|
830
|
+
[reactMapView notifyStyleLoaded];
|
|
831
|
+
|
|
832
|
+
self.reactOnDidFinishLoadingStyle(nil);
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
- (UIImage *)mapView:(MLNMapView *)mapView didFailToLoadImage:(NSString *)imageName {
|
|
836
|
+
MLRNMapView *reactMapView = ((MLRNMapView *)mapView);
|
|
837
|
+
NSArray<MLRNImages *> *allImages = [reactMapView getAllImages];
|
|
838
|
+
for (MLRNImages *images in allImages) {
|
|
839
|
+
if ([images addMissingImageToStyle:imageName]) {
|
|
840
|
+
// The image was added inside addMissingImageToStyle so we can return nil
|
|
841
|
+
return nil;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
for (MLRNImages *images in allImages) {
|
|
846
|
+
[images sendImageMissingEvent:imageName];
|
|
847
|
+
}
|
|
848
|
+
return nil;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
// MARK: - Helper Functions
|
|
852
|
+
|
|
853
|
+
- (void)setOrnamentPosition:(NSDictionary<NSString *, NSNumber *> *)position
|
|
854
|
+
defaultPosition:(MLNOrnamentPosition)defaultPosition
|
|
855
|
+
setPosition:(void (^)(MLNOrnamentPosition))setViewPosition
|
|
856
|
+
setMargins:(void (^)(CGPoint))setViewMargins {
|
|
857
|
+
NSNumber *topNumber = [position valueForKey:@"top"];
|
|
858
|
+
NSNumber *rightNumber = [position valueForKey:@"right"];
|
|
859
|
+
NSNumber *bottomNumber = [position valueForKey:@"bottom"];
|
|
860
|
+
NSNumber *leftNumber = [position valueForKey:@"left"];
|
|
861
|
+
|
|
862
|
+
NSInteger top = [topNumber integerValue];
|
|
863
|
+
NSInteger right = [rightNumber integerValue];
|
|
864
|
+
NSInteger bottom = [bottomNumber integerValue];
|
|
865
|
+
NSInteger left = [leftNumber integerValue];
|
|
866
|
+
|
|
867
|
+
if (left != -1 && top != -1) {
|
|
868
|
+
setViewPosition(MLNOrnamentPositionTopLeft);
|
|
869
|
+
setViewMargins(CGPointMake(left, top));
|
|
870
|
+
} else if (right != -1 && top != -1) {
|
|
871
|
+
setViewPosition(MLNOrnamentPositionTopRight);
|
|
872
|
+
setViewMargins(CGPointMake(right, top));
|
|
873
|
+
} else if (bottom != -1 && right != -1) {
|
|
874
|
+
setViewPosition(MLNOrnamentPositionBottomRight);
|
|
875
|
+
setViewMargins(CGPointMake(right, bottom));
|
|
876
|
+
} else if (bottom != -1 && left != -1) {
|
|
877
|
+
setViewPosition(MLNOrnamentPositionBottomLeft);
|
|
878
|
+
setViewMargins(CGPointMake(left, bottom));
|
|
879
|
+
} else {
|
|
880
|
+
setViewPosition(defaultPosition);
|
|
881
|
+
// Equals MLNOrnamentDefaultPositionOffset in MLNMapView.mm
|
|
882
|
+
setViewMargins(CGPointMake(8, 8));
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
- (NSDictionary *)makeViewState:(MLNMapView *)mapView animated:(BOOL)animated {
|
|
887
|
+
MLRNMapView *rctMapView = (MLRNMapView *)mapView;
|
|
888
|
+
|
|
889
|
+
NSDictionary *viewState = @{
|
|
890
|
+
@"center" : @[
|
|
891
|
+
[NSNumber numberWithDouble:mapView.centerCoordinate.longitude],
|
|
892
|
+
[NSNumber numberWithDouble:mapView.centerCoordinate.latitude]
|
|
893
|
+
],
|
|
894
|
+
@"zoom" : [NSNumber numberWithDouble:mapView.zoomLevel],
|
|
895
|
+
@"pitch" : [NSNumber numberWithDouble:mapView.camera.pitch],
|
|
896
|
+
@"bearing" : [NSNumber numberWithDouble:mapView.camera.heading],
|
|
897
|
+
@"bounds" : [MLRNUtils fromCoordinateBounds:mapView.visibleCoordinateBounds],
|
|
898
|
+
@"animated" : [NSNumber numberWithBool:animated],
|
|
899
|
+
@"userInteraction" : @(rctMapView.isUserInteraction),
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
return viewState;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
@end
|