@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,1514 @@
|
|
|
1
|
+
package io.github.mapvina.reactnative.components.mapview
|
|
2
|
+
|
|
3
|
+
import android.annotation.SuppressLint
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import android.graphics.BitmapFactory
|
|
6
|
+
import android.graphics.PointF
|
|
7
|
+
import android.graphics.RectF
|
|
8
|
+
import android.os.Handler
|
|
9
|
+
import android.os.Looper
|
|
10
|
+
import android.util.AttributeSet
|
|
11
|
+
import android.view.Gravity
|
|
12
|
+
import android.view.MotionEvent
|
|
13
|
+
import android.view.View
|
|
14
|
+
import android.view.ViewGroup
|
|
15
|
+
import android.widget.FrameLayout
|
|
16
|
+
import androidx.core.graphics.Insets
|
|
17
|
+
import androidx.core.view.ViewCompat
|
|
18
|
+
import androidx.core.view.WindowInsetsCompat
|
|
19
|
+
import com.facebook.react.bridge.Arguments
|
|
20
|
+
import com.facebook.react.bridge.LifecycleEventListener
|
|
21
|
+
import com.facebook.react.bridge.ReactContext
|
|
22
|
+
import com.facebook.react.bridge.ReadableArray
|
|
23
|
+
import com.facebook.react.bridge.ReadableMap
|
|
24
|
+
import com.facebook.react.bridge.WritableArray
|
|
25
|
+
import com.facebook.react.bridge.WritableMap
|
|
26
|
+
import com.facebook.react.uimanager.UIManagerHelper
|
|
27
|
+
import com.facebook.react.uimanager.events.EventDispatcher
|
|
28
|
+
import io.github.mapvina.android.camera.CameraPosition
|
|
29
|
+
import io.github.mapvina.android.camera.CameraUpdate
|
|
30
|
+
import io.github.mapvina.android.geometry.LatLng
|
|
31
|
+
import io.github.mapvina.android.gestures.MoveGestureDetector
|
|
32
|
+
import io.github.mapvina.android.log.Logger
|
|
33
|
+
import io.github.mapvina.android.maps.AttributionDialogManager
|
|
34
|
+
import io.github.mapvina.android.maps.MapVinaMap
|
|
35
|
+
import io.github.mapvina.android.maps.MapVinaMapOptions
|
|
36
|
+
import io.github.mapvina.android.maps.MapView
|
|
37
|
+
import io.github.mapvina.android.maps.OnMapReadyCallback
|
|
38
|
+
import io.github.mapvina.android.maps.Style
|
|
39
|
+
import io.github.mapvina.android.maps.Style.OnStyleLoaded
|
|
40
|
+
import io.github.mapvina.android.plugins.annotation.OnSymbolDragListener
|
|
41
|
+
import io.github.mapvina.android.plugins.annotation.Symbol
|
|
42
|
+
import io.github.mapvina.android.plugins.annotation.SymbolManager
|
|
43
|
+
import io.github.mapvina.android.style.expressions.Expression
|
|
44
|
+
import io.github.mapvina.android.style.layers.Layer
|
|
45
|
+
import io.github.mapvina.android.style.layers.Property
|
|
46
|
+
import io.github.mapvina.android.style.layers.PropertyFactory
|
|
47
|
+
import io.github.mapvina.geojson.Feature
|
|
48
|
+
import io.github.mapvina.reactnative.R
|
|
49
|
+
import io.github.mapvina.reactnative.components.AbstractMapFeature
|
|
50
|
+
import io.github.mapvina.reactnative.components.annotations.markerview.MLRNMarkerView
|
|
51
|
+
import io.github.mapvina.reactnative.components.annotations.markerview.MarkerViewManager
|
|
52
|
+
import io.github.mapvina.reactnative.components.annotations.pointannotation.MLRNPointAnnotation
|
|
53
|
+
import io.github.mapvina.reactnative.components.camera.MLRNCamera
|
|
54
|
+
import io.github.mapvina.reactnative.components.images.MLRNImages
|
|
55
|
+
import io.github.mapvina.reactnative.components.layer.MLRNLayer
|
|
56
|
+
import io.github.mapvina.reactnative.components.layer.style.MLRNStyle
|
|
57
|
+
import io.github.mapvina.reactnative.components.layer.style.MLRNStyleFactory
|
|
58
|
+
import io.github.mapvina.reactnative.components.location.LocationComponentManager
|
|
59
|
+
import io.github.mapvina.reactnative.components.location.MLRNNativeUserLocation
|
|
60
|
+
import io.github.mapvina.reactnative.components.mapview.helpers.CameraChangeTracker
|
|
61
|
+
import io.github.mapvina.reactnative.components.mapview.helpers.LayerSourceInfo
|
|
62
|
+
import io.github.mapvina.reactnative.components.sources.MLRNPressableSource
|
|
63
|
+
import io.github.mapvina.reactnative.components.sources.MLRNSource
|
|
64
|
+
import io.github.mapvina.reactnative.events.MapChangeEvent
|
|
65
|
+
import io.github.mapvina.reactnative.events.MapPressEvent
|
|
66
|
+
import io.github.mapvina.reactnative.utils.BitmapUtils
|
|
67
|
+
import io.github.mapvina.reactnative.utils.ConvertUtils
|
|
68
|
+
import io.github.mapvina.reactnative.utils.GeoJSONUtils
|
|
69
|
+
import kotlin.math.roundToInt
|
|
70
|
+
|
|
71
|
+
sealed class MapChild {
|
|
72
|
+
data class FeatureChild(
|
|
73
|
+
val feature: AbstractMapFeature,
|
|
74
|
+
) : MapChild()
|
|
75
|
+
|
|
76
|
+
data class ViewChild(
|
|
77
|
+
val view: View,
|
|
78
|
+
) : MapChild()
|
|
79
|
+
|
|
80
|
+
fun toView(): View? =
|
|
81
|
+
when (this) {
|
|
82
|
+
is FeatureChild -> feature
|
|
83
|
+
is ViewChild -> view
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
open class MLRNMapView(
|
|
88
|
+
context: Context,
|
|
89
|
+
options: MapVinaMapOptions?,
|
|
90
|
+
) : MapView(
|
|
91
|
+
context,
|
|
92
|
+
options,
|
|
93
|
+
),
|
|
94
|
+
OnMapReadyCallback,
|
|
95
|
+
MapVinaMap.OnMapClickListener,
|
|
96
|
+
MapVinaMap.OnMapLongClickListener,
|
|
97
|
+
MapView.OnCameraDidChangeListener,
|
|
98
|
+
MapView.OnWillStartLoadingMapListener,
|
|
99
|
+
MapView.OnDidFailLoadingMapListener,
|
|
100
|
+
MapView.OnDidFinishLoadingMapListener,
|
|
101
|
+
MapView.OnWillStartRenderingFrameListener,
|
|
102
|
+
MapView.OnWillStartRenderingMapListener,
|
|
103
|
+
MapView.OnDidFinishRenderingFrameListener,
|
|
104
|
+
MapView.OnDidFinishRenderingMapListener,
|
|
105
|
+
MapView.OnDidFinishLoadingStyleListener,
|
|
106
|
+
MapView.OnStyleImageMissingListener {
|
|
107
|
+
constructor(context: Context) : this(context, options = null)
|
|
108
|
+
|
|
109
|
+
@Suppress("UNUSED_PARAMETER")
|
|
110
|
+
constructor(context: Context, attrs: AttributeSet?) : this(context, options = null)
|
|
111
|
+
|
|
112
|
+
@Suppress("UNUSED_PARAMETER")
|
|
113
|
+
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : this(
|
|
114
|
+
context,
|
|
115
|
+
options = null,
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
private val handler: Handler
|
|
119
|
+
private var lifeCycleListener: LifecycleEventListener? = null
|
|
120
|
+
private var paused = false
|
|
121
|
+
private var destroyed = false
|
|
122
|
+
|
|
123
|
+
private var camera: MLRNCamera? = null
|
|
124
|
+
private val children: MutableList<MapChild>
|
|
125
|
+
private var queuedChildren: MutableList<MapChild>?
|
|
126
|
+
private val pointAnnotations: MutableMap<String, MLRNPointAnnotation>
|
|
127
|
+
private val sources: MutableMap<String, MLRNSource<*>>
|
|
128
|
+
private val images: MutableList<MLRNImages>
|
|
129
|
+
|
|
130
|
+
private val cameraChangeTracker = CameraChangeTracker()
|
|
131
|
+
|
|
132
|
+
var mapVinaMap: MapVinaMap? = null
|
|
133
|
+
private set
|
|
134
|
+
|
|
135
|
+
private var mapStyle: String? = null
|
|
136
|
+
private var insets: ReadableArray? = null
|
|
137
|
+
private var preferredFramesPerSecond: Int? = null
|
|
138
|
+
|
|
139
|
+
private var scrollEnabled: Boolean? = null
|
|
140
|
+
private var touchZoomEnabled: Boolean? = null
|
|
141
|
+
private var doubleTapZoomEnabled: Boolean? = null
|
|
142
|
+
private var doubleTapHoldZoomEnabled: Boolean? = null
|
|
143
|
+
private var rotateEnabled: Boolean? = null
|
|
144
|
+
private var pitchEnabled: Boolean? = null
|
|
145
|
+
|
|
146
|
+
var tintColor: Int? = null
|
|
147
|
+
|
|
148
|
+
private var attributionEnabled: Boolean? = null
|
|
149
|
+
private var attributionGravity: Int? = null
|
|
150
|
+
private var attributionMargin: IntArray? = null
|
|
151
|
+
|
|
152
|
+
private var logoEnabled: Boolean? = null
|
|
153
|
+
private var logoGravity: Int? = null
|
|
154
|
+
private var logoMargins: IntArray? = null
|
|
155
|
+
|
|
156
|
+
private var compassEnabled: Boolean? = null
|
|
157
|
+
private var compassGravity: Int? = null
|
|
158
|
+
private var compassMargins: IntArray? = null
|
|
159
|
+
private var compassHiddenFacingNorth: Boolean? = null
|
|
160
|
+
|
|
161
|
+
private var windowInsets: WindowInsetsCompat? = null
|
|
162
|
+
|
|
163
|
+
private var symbolManager: SymbolManager? = null
|
|
164
|
+
|
|
165
|
+
private var markerViewManager: MarkerViewManager? = null
|
|
166
|
+
private var offscreenAnnotationViewContainer: ViewGroup? = null
|
|
167
|
+
|
|
168
|
+
val locationComponentManager: LocationComponentManager by lazy {
|
|
169
|
+
LocationComponentManager(this, context)
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
val eventDispatcher: EventDispatcher?
|
|
173
|
+
get() {
|
|
174
|
+
val reactContext = context as ReactContext
|
|
175
|
+
|
|
176
|
+
return UIManagerHelper.getEventDispatcherForReactTag(reactContext, id)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
val surfaceId: Int
|
|
180
|
+
get() {
|
|
181
|
+
val reactContext = context as ReactContext
|
|
182
|
+
|
|
183
|
+
return UIManagerHelper.getSurfaceId(reactContext)
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
override fun onResume() {
|
|
187
|
+
super.onResume()
|
|
188
|
+
paused = false
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
override fun onPause() {
|
|
192
|
+
super.onPause()
|
|
193
|
+
paused = true
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
override fun onDestroy() {
|
|
197
|
+
super.onDestroy()
|
|
198
|
+
destroyed = true
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
override fun onAttachedToWindow() {
|
|
202
|
+
super.onAttachedToWindow()
|
|
203
|
+
ViewCompat.setOnApplyWindowInsetsListener(this) { _, insets ->
|
|
204
|
+
windowInsets = insets
|
|
205
|
+
updateUISettings()
|
|
206
|
+
insets
|
|
207
|
+
}
|
|
208
|
+
ViewCompat.requestApplyInsets(this)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
override fun onDetachedFromWindow() {
|
|
212
|
+
super.onDetachedFromWindow()
|
|
213
|
+
ViewCompat.setOnApplyWindowInsetsListener(this, null)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
fun addFeature(
|
|
217
|
+
childView: View?,
|
|
218
|
+
childPosition: Int,
|
|
219
|
+
) {
|
|
220
|
+
val child: MapChild? =
|
|
221
|
+
when (childView) {
|
|
222
|
+
is MLRNCamera -> {
|
|
223
|
+
camera = childView
|
|
224
|
+
MapChild.FeatureChild(childView)
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
is MLRNSource<*> -> {
|
|
228
|
+
sources[childView.getID()] = childView
|
|
229
|
+
MapChild.FeatureChild(childView)
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
is MLRNPointAnnotation -> {
|
|
233
|
+
pointAnnotations[childView.mapVinaId!!] = childView
|
|
234
|
+
MapChild.FeatureChild(childView)
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
is MLRNImages -> {
|
|
238
|
+
images.add(childView)
|
|
239
|
+
MapChild.FeatureChild(childView)
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
is MLRNNativeUserLocation, is MLRNMarkerView, is MLRNLayer -> {
|
|
243
|
+
MapChild.FeatureChild(childView)
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
is ViewGroup -> {
|
|
247
|
+
MapChild.ViewChild(childView)
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
else -> {
|
|
251
|
+
null
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (child != null) {
|
|
256
|
+
if (queuedChildren == null) {
|
|
257
|
+
when (child) {
|
|
258
|
+
is MapChild.FeatureChild -> {
|
|
259
|
+
child.feature.addToMap(this)
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
is MapChild.ViewChild -> {
|
|
263
|
+
addView(child.view)
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
children.add(childPosition, child)
|
|
268
|
+
} else {
|
|
269
|
+
queuedChildren!!.add(childPosition, child)
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
fun removeFeature(childPosition: Int) {
|
|
275
|
+
val child = children()[childPosition]
|
|
276
|
+
|
|
277
|
+
when (child) {
|
|
278
|
+
is MapChild.FeatureChild -> {
|
|
279
|
+
when (child.feature) {
|
|
280
|
+
is MLRNSource<*> -> {
|
|
281
|
+
sources.remove(child.feature.getID())
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
is MLRNPointAnnotation -> {
|
|
285
|
+
child.feature.mapVinaId?.let { pointAnnotations.remove(it) }
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
is MLRNImages -> {
|
|
289
|
+
images.remove(child.feature)
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
child.feature.removeFromMap(this)
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
is MapChild.ViewChild -> {
|
|
297
|
+
removeView(child.view)
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
children().remove(child)
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
private fun children() = queuedChildren?.takeIf { it.isNotEmpty() } ?: children
|
|
305
|
+
|
|
306
|
+
val featureCount: Int get() = children().size
|
|
307
|
+
|
|
308
|
+
fun getFeatureAt(i: Int): MapChild = children()[i]
|
|
309
|
+
|
|
310
|
+
@Synchronized
|
|
311
|
+
fun dispose() {
|
|
312
|
+
if (destroyed) {
|
|
313
|
+
return
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
if (!layerWaiters.isEmpty()) {
|
|
317
|
+
layerWaiters.clear()
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
val reactContext = context as ReactContext
|
|
321
|
+
reactContext.removeLifecycleEventListener(lifeCycleListener)
|
|
322
|
+
|
|
323
|
+
if (!paused) {
|
|
324
|
+
onPause()
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
onStop()
|
|
328
|
+
onDestroy()
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
val cameraPosition: CameraPosition
|
|
332
|
+
get() = mapVinaMap!!.cameraPosition
|
|
333
|
+
|
|
334
|
+
fun moveCamera(
|
|
335
|
+
cameraUpdate: CameraUpdate,
|
|
336
|
+
callback: MapVinaMap.CancelableCallback?,
|
|
337
|
+
) {
|
|
338
|
+
mapVinaMap!!.moveCamera(cameraUpdate, callback)
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
fun getPointAnnotationByAnnotationId(annotationId: Long): MLRNPointAnnotation? =
|
|
342
|
+
pointAnnotations.values.find {
|
|
343
|
+
it.annotationId == annotationId
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
fun getSymbolManager(): SymbolManager = symbolManager!!
|
|
347
|
+
|
|
348
|
+
interface FoundLayerCallback {
|
|
349
|
+
fun found(layer: Layer?)
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
private val layerWaiters: MutableMap<String?, MutableList<FoundLayerCallback>> =
|
|
353
|
+
HashMap<String?, MutableList<FoundLayerCallback>>()
|
|
354
|
+
|
|
355
|
+
init {
|
|
356
|
+
onCreate(null)
|
|
357
|
+
onStart()
|
|
358
|
+
onResume()
|
|
359
|
+
getMapAsync(this)
|
|
360
|
+
|
|
361
|
+
sources = HashMap()
|
|
362
|
+
images = ArrayList()
|
|
363
|
+
pointAnnotations = HashMap()
|
|
364
|
+
children = ArrayList()
|
|
365
|
+
queuedChildren = ArrayList()
|
|
366
|
+
|
|
367
|
+
handler = Handler(Looper.getMainLooper())
|
|
368
|
+
|
|
369
|
+
setLifecycleListeners()
|
|
370
|
+
|
|
371
|
+
addOnCameraDidChangeListener(this)
|
|
372
|
+
addOnDidFailLoadingMapListener(this)
|
|
373
|
+
addOnDidFinishLoadingMapListener(this)
|
|
374
|
+
addOnStyleImageMissingListener(this)
|
|
375
|
+
|
|
376
|
+
addOnWillStartRenderingFrameListener(this)
|
|
377
|
+
addOnDidFinishRenderingFrameListener(this)
|
|
378
|
+
addOnWillStartRenderingMapListener(this)
|
|
379
|
+
addOnDidFinishRenderingMapListener(this)
|
|
380
|
+
addOnDidFinishLoadingStyleListener(this)
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
fun layerAdded(layer: Layer) {
|
|
384
|
+
val layerId = layer.getId()
|
|
385
|
+
|
|
386
|
+
val callbacks = layerWaiters[layerId]
|
|
387
|
+
if (callbacks != null) {
|
|
388
|
+
for (callback in callbacks) {
|
|
389
|
+
callback.found(layer)
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
layerWaiters.remove(layerId)
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
fun waitForLayer(
|
|
396
|
+
layerID: String,
|
|
397
|
+
callback: FoundLayerCallback,
|
|
398
|
+
) {
|
|
399
|
+
val layer = mapVinaMap!!.style!!.getLayer(layerID)
|
|
400
|
+
if (layer != null) {
|
|
401
|
+
callback.found(layer)
|
|
402
|
+
} else {
|
|
403
|
+
val waiters = layerWaiters.computeIfAbsent(layerID) { _: String? -> ArrayList() }
|
|
404
|
+
waiters.add(callback)
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
override fun onMapReady(mapVinaMap: MapVinaMap) {
|
|
409
|
+
this.mapVinaMap = mapVinaMap
|
|
410
|
+
|
|
411
|
+
val uiSettings = mapVinaMap.uiSettings
|
|
412
|
+
if (attributionGravity == null) attributionGravity = Gravity.END or Gravity.BOTTOM
|
|
413
|
+
if (attributionMargin == null) {
|
|
414
|
+
attributionMargin =
|
|
415
|
+
intArrayOf(
|
|
416
|
+
0,
|
|
417
|
+
0,
|
|
418
|
+
(4 * displayDensity).roundToInt(),
|
|
419
|
+
(4 * displayDensity).roundToInt(),
|
|
420
|
+
)
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
if (logoGravity == null) logoGravity = uiSettings.logoGravity
|
|
424
|
+
if (logoMargins == null) {
|
|
425
|
+
logoMargins =
|
|
426
|
+
intArrayOf(
|
|
427
|
+
uiSettings.logoMarginLeft,
|
|
428
|
+
uiSettings.logoMarginTop,
|
|
429
|
+
uiSettings.logoMarginRight,
|
|
430
|
+
uiSettings.logoMarginBottom,
|
|
431
|
+
)
|
|
432
|
+
}
|
|
433
|
+
if (compassGravity == null) compassGravity = uiSettings.compassGravity
|
|
434
|
+
if (compassMargins == null) {
|
|
435
|
+
compassMargins =
|
|
436
|
+
intArrayOf(
|
|
437
|
+
uiSettings.compassMarginLeft,
|
|
438
|
+
uiSettings.compassMarginTop,
|
|
439
|
+
uiSettings.compassMarginRight,
|
|
440
|
+
uiSettings.compassMarginBottom,
|
|
441
|
+
)
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
mapStyle?.let { style ->
|
|
445
|
+
mapVinaMap.setStyle(
|
|
446
|
+
if (ConvertUtils.isJSONValid(style)) {
|
|
447
|
+
Style.Builder().fromJson(style)
|
|
448
|
+
} else {
|
|
449
|
+
Style
|
|
450
|
+
.Builder()
|
|
451
|
+
.fromUri(style)
|
|
452
|
+
},
|
|
453
|
+
)
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
reflow()
|
|
457
|
+
|
|
458
|
+
mapVinaMap.getStyle { style ->
|
|
459
|
+
createSymbolManager(style)
|
|
460
|
+
setUpImage(style)
|
|
461
|
+
addQueuedFeatures()
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
updatePreferredFramesPerSecond()
|
|
465
|
+
updateInsets()
|
|
466
|
+
updateUISettings()
|
|
467
|
+
|
|
468
|
+
mapVinaMap.addOnCameraMoveStartedListener { reason ->
|
|
469
|
+
cameraChangeTracker.setReason(reason)
|
|
470
|
+
handleMapChangedEvent("onRegionWillChange", true)
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
mapVinaMap.addOnCameraMoveListener {
|
|
474
|
+
handleMapChangedEvent("onRegionIsChanging", true)
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
mapVinaMap.addOnMoveListener(
|
|
478
|
+
object : MapVinaMap.OnMoveListener {
|
|
479
|
+
override fun onMoveBegin(detector: MoveGestureDetector) {
|
|
480
|
+
cameraChangeTracker.setReason(CameraChangeTracker.USER_GESTURE)
|
|
481
|
+
handleMapChangedEvent("onRegionWillChange", true)
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
override fun onMove(detector: MoveGestureDetector) {
|
|
485
|
+
// Handled by mapVinaMap.addOnCameraMoveListener
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
override fun onMoveEnd(detector: MoveGestureDetector) {
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
mapVinaMap.addOnCameraIdleListener { sendRegionDidChangeEvent() }
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
fun reflow() {
|
|
497
|
+
handler.post {
|
|
498
|
+
measure(
|
|
499
|
+
MeasureSpec.makeMeasureSpec(measuredWidth, MeasureSpec.EXACTLY),
|
|
500
|
+
MeasureSpec.makeMeasureSpec(measuredHeight, MeasureSpec.EXACTLY),
|
|
501
|
+
)
|
|
502
|
+
layout(left, top, right, bottom)
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
fun createSymbolManager(style: Style) {
|
|
507
|
+
symbolManager = SymbolManager(this, this.mapVinaMap!!, style)
|
|
508
|
+
symbolManager!!.setIconAllowOverlap(true)
|
|
509
|
+
symbolManager!!.addClickListener { symbol ->
|
|
510
|
+
onPointAnnotationClick(symbol)
|
|
511
|
+
true
|
|
512
|
+
}
|
|
513
|
+
symbolManager!!.addDragListener(
|
|
514
|
+
object : OnSymbolDragListener {
|
|
515
|
+
override fun onAnnotationDragStarted(symbol: Symbol) {
|
|
516
|
+
val selectedPointAnnotationID = symbol.id
|
|
517
|
+
val annotation = getPointAnnotationByAnnotationId(selectedPointAnnotationID)
|
|
518
|
+
annotation?.onDragStart()
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
override fun onAnnotationDrag(symbol: Symbol) {
|
|
522
|
+
val annotation = getPointAnnotationByAnnotationId(symbol.id)
|
|
523
|
+
annotation?.onDrag()
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
override fun onAnnotationDragFinished(symbol: Symbol) {
|
|
527
|
+
val annotation = getPointAnnotationByAnnotationId(symbol.id)
|
|
528
|
+
annotation?.onDragEnd()
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
)
|
|
532
|
+
mapVinaMap!!.addOnMapClickListener(this)
|
|
533
|
+
mapVinaMap!!.addOnMapLongClickListener(this)
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
fun addQueuedFeatures() {
|
|
537
|
+
queuedChildren?.let {
|
|
538
|
+
for (i in it.indices) {
|
|
539
|
+
val child = it[i]
|
|
540
|
+
|
|
541
|
+
when (child) {
|
|
542
|
+
is MapChild.FeatureChild -> {
|
|
543
|
+
child.feature.addToMap(this)
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
is MapChild.ViewChild -> {
|
|
547
|
+
addView(child.view)
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
children.add(child)
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
queuedChildren = null
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
@SuppressLint("ClickableViewAccessibility")
|
|
559
|
+
override fun onTouchEvent(ev: MotionEvent?): Boolean {
|
|
560
|
+
val result = super.onTouchEvent(ev)
|
|
561
|
+
|
|
562
|
+
if (result && scrollEnabled == true) {
|
|
563
|
+
requestDisallowInterceptTouchEvent(true)
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
return result
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
override fun onLayout(
|
|
570
|
+
changed: Boolean,
|
|
571
|
+
left: Int,
|
|
572
|
+
top: Int,
|
|
573
|
+
right: Int,
|
|
574
|
+
bottom: Int,
|
|
575
|
+
) {
|
|
576
|
+
if (!paused) {
|
|
577
|
+
if (markerViewManager != null) {
|
|
578
|
+
markerViewManager!!.removeViews()
|
|
579
|
+
}
|
|
580
|
+
super.onLayout(changed, left, top, right, bottom)
|
|
581
|
+
if (markerViewManager != null) {
|
|
582
|
+
markerViewManager!!.restoreViews()
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
if (changed) {
|
|
587
|
+
handler.post {
|
|
588
|
+
updateUISettings()
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
override fun onMapClick(latLng: LatLng): Boolean {
|
|
594
|
+
pointAnnotations.values.find { it.selected }?.let { deselectAnnotation(it) }
|
|
595
|
+
|
|
596
|
+
val screenPoint = mapVinaMap!!.projection.toScreenLocation(latLng)
|
|
597
|
+
|
|
598
|
+
if (markerViewManager != null) {
|
|
599
|
+
val hitMarker = markerViewManager!!.findMarkerAtPoint(screenPoint)
|
|
600
|
+
if (hitMarker != null) {
|
|
601
|
+
val pressPoint = PointF(screenPoint.x / displayDensity, screenPoint.y / displayDensity)
|
|
602
|
+
hitMarker.markerView.onPress(latLng, pressPoint)
|
|
603
|
+
return true
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
val hits: MutableMap<String, MutableList<Feature>?> = HashMap()
|
|
608
|
+
val hitPressableSources: MutableList<MLRNPressableSource<*>> = ArrayList()
|
|
609
|
+
for (pressableSource in this.pressableSources) {
|
|
610
|
+
val hitbox = pressableSource.hitbox ?: continue
|
|
611
|
+
|
|
612
|
+
val pointWithHitbox =
|
|
613
|
+
RectF(
|
|
614
|
+
screenPoint.x - (hitbox.left * displayDensity),
|
|
615
|
+
screenPoint.y - (hitbox.top * displayDensity),
|
|
616
|
+
screenPoint.x + (hitbox.right * displayDensity),
|
|
617
|
+
screenPoint.y + (hitbox.bottom * displayDensity),
|
|
618
|
+
)
|
|
619
|
+
|
|
620
|
+
val features =
|
|
621
|
+
mapVinaMap!!.queryRenderedFeatures(pointWithHitbox, *pressableSource.getLayerIDs())
|
|
622
|
+
if (features.isNotEmpty()) {
|
|
623
|
+
hits[pressableSource.getID()] = features
|
|
624
|
+
hitPressableSources.add(pressableSource)
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
screenPoint.x /= this.displayDensity
|
|
629
|
+
screenPoint.y /= this.displayDensity
|
|
630
|
+
|
|
631
|
+
if (hits.isNotEmpty()) {
|
|
632
|
+
val source = getPressableSourceWithHighestZIndex(hitPressableSources)
|
|
633
|
+
if (source != null && source.hasOnPress) {
|
|
634
|
+
hits[source.getID()]?.let {
|
|
635
|
+
source.onPress(it, latLng, screenPoint)
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
return true
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
val event = MapPressEvent(surfaceId, id, "onPress", latLng, screenPoint)
|
|
643
|
+
eventDispatcher?.dispatchEvent(event)
|
|
644
|
+
|
|
645
|
+
return false
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
override fun onMapLongClick(latLng: LatLng): Boolean {
|
|
649
|
+
val screenPoint = mapVinaMap!!.projection.toScreenLocation(latLng)
|
|
650
|
+
|
|
651
|
+
if (markerViewManager?.isPointInsideMarker(screenPoint) == true) {
|
|
652
|
+
return true
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
screenPoint.x /= this.displayDensity
|
|
656
|
+
screenPoint.y /= this.displayDensity
|
|
657
|
+
|
|
658
|
+
val event = MapPressEvent(surfaceId, id, "onLongPress", latLng, screenPoint)
|
|
659
|
+
eventDispatcher?.dispatchEvent(event)
|
|
660
|
+
|
|
661
|
+
return false
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
fun onPointAnnotationClick(nextSymbol: Symbol) {
|
|
665
|
+
val nextSelectedPointAnnotation =
|
|
666
|
+
getPointAnnotationByAnnotationId(nextSymbol.id) ?: return
|
|
667
|
+
|
|
668
|
+
nextSelectedPointAnnotation.onPress()
|
|
669
|
+
|
|
670
|
+
if (!nextSelectedPointAnnotation.selected) {
|
|
671
|
+
selectAnnotation(nextSelectedPointAnnotation)
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
fun selectAnnotation(nextSelectedPointAnnotation: MLRNPointAnnotation) {
|
|
676
|
+
pointAnnotations.values
|
|
677
|
+
.filter { it.selected && it !== nextSelectedPointAnnotation }
|
|
678
|
+
.forEach { it.onDeselect() }
|
|
679
|
+
|
|
680
|
+
nextSelectedPointAnnotation.onSelect()
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
fun deselectAnnotation(annotation: MLRNPointAnnotation) {
|
|
684
|
+
annotation.onDeselect()
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
override fun onCameraDidChange(animated: Boolean) {
|
|
688
|
+
cameraChangeTracker.isAnimating = animated
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
override fun onWillStartLoadingMap() {
|
|
692
|
+
handleMapChangedEvent("onWillStartLoadingMap")
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
override fun onDidFinishLoadingMap() {
|
|
696
|
+
handleMapChangedEvent("onDidFinishLoadingMap")
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
override fun onDidFailLoadingMap(errorMessage: String?) {
|
|
700
|
+
handleMapChangedEvent("onDidFailLoadingMap")
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
override fun onWillStartRenderingFrame() {
|
|
704
|
+
markerViewManager?.updateMarkers()
|
|
705
|
+
handleMapChangedEvent("onWillStartRenderingFrame")
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
override fun onDidFinishRenderingFrame(
|
|
709
|
+
fully: Boolean,
|
|
710
|
+
frameEncodingTime: Double,
|
|
711
|
+
frameRenderingTime: Double,
|
|
712
|
+
) {
|
|
713
|
+
if (fully) {
|
|
714
|
+
handleMapChangedEvent("onDidFinishRenderingFrameFully")
|
|
715
|
+
} else {
|
|
716
|
+
handleMapChangedEvent("onDidFinishRenderingFrame")
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
override fun onWillStartRenderingMap() {
|
|
721
|
+
handleMapChangedEvent("onWillStartRenderingMap")
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
override fun onDidFinishRenderingMap(fully: Boolean) {
|
|
725
|
+
if (fully) {
|
|
726
|
+
handleMapChangedEvent("onDidFinishRenderingMapFully")
|
|
727
|
+
} else {
|
|
728
|
+
handleMapChangedEvent("onDidFinishRenderingMap")
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
override fun onDidFinishLoadingStyle() {
|
|
733
|
+
handleMapChangedEvent("onDidFinishLoadingStyle")
|
|
734
|
+
applyLight()
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
override fun onStyleImageMissing(id: String) {
|
|
738
|
+
for (images in images) {
|
|
739
|
+
if (images.addMissingImageToStyle(id, this.mapVinaMap!!)) {
|
|
740
|
+
return
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
for (images in images) {
|
|
745
|
+
images.sendImageMissingEvent(id)
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
private val displayDensity: Float
|
|
750
|
+
get() = context.resources.displayMetrics.density
|
|
751
|
+
|
|
752
|
+
fun setReactMapStyle(value: String?) {
|
|
753
|
+
if (value != null) {
|
|
754
|
+
mapStyle = value
|
|
755
|
+
|
|
756
|
+
mapVinaMap?.let { map ->
|
|
757
|
+
removeAllSourcesFromMap()
|
|
758
|
+
|
|
759
|
+
mapStyle?.let { style ->
|
|
760
|
+
map.setStyle(
|
|
761
|
+
if (ConvertUtils.isJSONValid(style)) {
|
|
762
|
+
Style.Builder().fromJson(style)
|
|
763
|
+
} else {
|
|
764
|
+
Style
|
|
765
|
+
.Builder()
|
|
766
|
+
.fromUri(style)
|
|
767
|
+
},
|
|
768
|
+
) {
|
|
769
|
+
addAllSourcesToMap()
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
private var reactLight: ReadableMap? = null
|
|
777
|
+
|
|
778
|
+
fun setReactLight(value: ReadableMap?) {
|
|
779
|
+
reactLight = value
|
|
780
|
+
applyLight()
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
private fun applyLight() {
|
|
784
|
+
val reactLightProps = reactLight
|
|
785
|
+
val map = mapVinaMap
|
|
786
|
+
val style = map?.style
|
|
787
|
+
|
|
788
|
+
if (style != null && reactLightProps != null) {
|
|
789
|
+
val light = style.light
|
|
790
|
+
if (light != null) {
|
|
791
|
+
MLRNStyleFactory.setLightLayerStyle(light, MLRNStyle(context, reactLightProps, map))
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
fun setReactContentInset(value: ReadableMap?) {
|
|
797
|
+
if (value != null) {
|
|
798
|
+
val arr = Arguments.createArray()
|
|
799
|
+
arr.pushDouble(if (value.hasKey("top")) value.getDouble("top") else 0.0)
|
|
800
|
+
arr.pushDouble(if (value.hasKey("right")) value.getDouble("right") else 0.0)
|
|
801
|
+
arr.pushDouble(if (value.hasKey("bottom")) value.getDouble("bottom") else 0.0)
|
|
802
|
+
arr.pushDouble(if (value.hasKey("left")) value.getDouble("left") else 0.0)
|
|
803
|
+
insets = arr
|
|
804
|
+
} else {
|
|
805
|
+
insets = null
|
|
806
|
+
}
|
|
807
|
+
updateInsets()
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
fun setReactPreferredFramesPerSecond(preferredFramesPerSecond: Int?) {
|
|
811
|
+
this.preferredFramesPerSecond = preferredFramesPerSecond
|
|
812
|
+
updatePreferredFramesPerSecond()
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
fun setReactScrollEnabled(scrollEnabled: Boolean) {
|
|
816
|
+
this.scrollEnabled = scrollEnabled
|
|
817
|
+
updateUISettings()
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
fun setReactTouchZoomEnabled(enabled: Boolean) {
|
|
821
|
+
touchZoomEnabled = enabled
|
|
822
|
+
updateUISettings()
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
fun setReactDoubleTapZoomEnabled(enabled: Boolean) {
|
|
826
|
+
doubleTapZoomEnabled = enabled
|
|
827
|
+
updateUISettings()
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
fun setReactDoubleTapHoldZoomEnabled(enabled: Boolean) {
|
|
831
|
+
doubleTapHoldZoomEnabled = enabled
|
|
832
|
+
updateUISettings()
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
fun setReactRotateEnabled(rotateEnabled: Boolean) {
|
|
836
|
+
this.rotateEnabled = rotateEnabled
|
|
837
|
+
updateUISettings()
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
fun setReactPitchEnabled(pitchEnabled: Boolean) {
|
|
841
|
+
this.pitchEnabled = pitchEnabled
|
|
842
|
+
updateUISettings()
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
fun setReactTintColor(value: Int?) {
|
|
846
|
+
tintColor = value
|
|
847
|
+
updateUISettings()
|
|
848
|
+
if (mapVinaMap?.style != null) {
|
|
849
|
+
locationComponentManager.update(mapVinaMap!!.style!!)
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
private fun setOrnamentPosition(
|
|
854
|
+
position: ReadableMap?,
|
|
855
|
+
defaultGravityKey: (MapVinaMapOptions) -> Int,
|
|
856
|
+
defaultMarginsKey: (MapVinaMapOptions) -> IntArray,
|
|
857
|
+
setGravity: (Int) -> Unit,
|
|
858
|
+
setMargins: (IntArray) -> Unit,
|
|
859
|
+
) {
|
|
860
|
+
if (position == null) {
|
|
861
|
+
val defaults = MapVinaMapOptions.createFromAttributes(context)
|
|
862
|
+
setGravity(defaultGravityKey(defaults))
|
|
863
|
+
setMargins(defaultMarginsKey(defaults).copyOf(4))
|
|
864
|
+
} else {
|
|
865
|
+
var gravity = Gravity.NO_GRAVITY
|
|
866
|
+
if (position.hasKey("left")) gravity = gravity or Gravity.START
|
|
867
|
+
if (position.hasKey("right")) gravity = gravity or Gravity.END
|
|
868
|
+
if (position.hasKey("top")) gravity = gravity or Gravity.TOP
|
|
869
|
+
if (position.hasKey("bottom")) gravity = gravity or Gravity.BOTTOM
|
|
870
|
+
val margins =
|
|
871
|
+
intArrayOf(
|
|
872
|
+
if (position.hasKey("left")) (displayDensity * position.getInt("left")).roundToInt() else 0,
|
|
873
|
+
if (position.hasKey("top")) (displayDensity * position.getInt("top")).roundToInt() else 0,
|
|
874
|
+
if (position.hasKey("right")) (displayDensity * position.getInt("right")).roundToInt() else 0,
|
|
875
|
+
if (position.hasKey("bottom")) (displayDensity * position.getInt("bottom")).roundToInt() else 0,
|
|
876
|
+
)
|
|
877
|
+
setGravity(gravity)
|
|
878
|
+
setMargins(margins)
|
|
879
|
+
}
|
|
880
|
+
updateUISettings()
|
|
881
|
+
reflow()
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
fun setReactAttribution(value: Boolean) {
|
|
885
|
+
attributionEnabled = value
|
|
886
|
+
updateUISettings()
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
fun setReactAttributionPosition(position: ReadableMap?) {
|
|
890
|
+
setOrnamentPosition(
|
|
891
|
+
position,
|
|
892
|
+
{ it.attributionGravity },
|
|
893
|
+
{ it.attributionMargins },
|
|
894
|
+
{ attributionGravity = it },
|
|
895
|
+
{ attributionMargin = it },
|
|
896
|
+
)
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
fun setReactLogo(value: Boolean) {
|
|
900
|
+
logoEnabled = value
|
|
901
|
+
updateUISettings()
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
fun setReactLogoPosition(position: ReadableMap?) {
|
|
905
|
+
setOrnamentPosition(
|
|
906
|
+
position,
|
|
907
|
+
{ it.logoGravity },
|
|
908
|
+
{ it.logoMargins },
|
|
909
|
+
{ logoGravity = it },
|
|
910
|
+
{ logoMargins = it },
|
|
911
|
+
)
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
fun setReactCompass(value: Boolean) {
|
|
915
|
+
compassEnabled = value
|
|
916
|
+
updateUISettings()
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
fun setReactCompassPosition(position: ReadableMap?) {
|
|
920
|
+
setOrnamentPosition(
|
|
921
|
+
position,
|
|
922
|
+
{ it.compassGravity },
|
|
923
|
+
{ it.compassMargins },
|
|
924
|
+
{ compassGravity = it },
|
|
925
|
+
{ compassMargins = it },
|
|
926
|
+
)
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
fun setReactCompassHiddenFacingNorth(value: Boolean) {
|
|
930
|
+
compassHiddenFacingNorth = value
|
|
931
|
+
updateUISettings()
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
fun getCenter(): WritableArray {
|
|
936
|
+
val cameraPosition = mapVinaMap!!.cameraPosition
|
|
937
|
+
val center = cameraPosition.target!!
|
|
938
|
+
|
|
939
|
+
return GeoJSONUtils.fromLatLng(center)
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
fun getZoom(): Double {
|
|
943
|
+
val cameraPosition = mapVinaMap!!.cameraPosition
|
|
944
|
+
|
|
945
|
+
return cameraPosition.zoom
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
fun getBearing(): Double {
|
|
949
|
+
val cameraPosition = mapVinaMap!!.cameraPosition
|
|
950
|
+
|
|
951
|
+
// Convert -0.0 to 0.0
|
|
952
|
+
return cameraPosition.bearing + 0.0
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
fun getPitch(): Double {
|
|
956
|
+
val cameraPosition = mapVinaMap!!.cameraPosition
|
|
957
|
+
|
|
958
|
+
return cameraPosition.tilt
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
fun getBounds(): WritableArray {
|
|
962
|
+
val visibleRegion = mapVinaMap!!.projection.visibleRegion
|
|
963
|
+
return GeoJSONUtils.fromLatLngBounds(visibleRegion.latLngBounds)
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
fun getViewState(): WritableMap {
|
|
967
|
+
val payload = Arguments.createMap()
|
|
968
|
+
payload.putArray("center", getCenter())
|
|
969
|
+
payload.putDouble("zoom", getZoom())
|
|
970
|
+
payload.putDouble("bearing", getBearing())
|
|
971
|
+
payload.putDouble("pitch", getPitch())
|
|
972
|
+
payload.putArray("bounds", getBounds())
|
|
973
|
+
|
|
974
|
+
return payload
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
fun queryRenderedFeaturesWithPoint(
|
|
978
|
+
point: PointF,
|
|
979
|
+
layers: ReadableArray?,
|
|
980
|
+
filter: Expression?,
|
|
981
|
+
): WritableArray {
|
|
982
|
+
val screenPoint = PointF(point.x * displayDensity, point.y * displayDensity)
|
|
983
|
+
|
|
984
|
+
val features =
|
|
985
|
+
mapVinaMap!!.queryRenderedFeatures(
|
|
986
|
+
screenPoint,
|
|
987
|
+
filter,
|
|
988
|
+
*(layers?.let { Array(layers.size()) { layers.getString(it) } } ?: emptyArray()),
|
|
989
|
+
)
|
|
990
|
+
|
|
991
|
+
return GeoJSONUtils.fromFeatureList(features)
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
fun queryRenderedFeaturesWithRect(
|
|
995
|
+
rect: RectF?,
|
|
996
|
+
layers: ReadableArray?,
|
|
997
|
+
filter: Expression?,
|
|
998
|
+
): WritableArray {
|
|
999
|
+
val screenRect =
|
|
1000
|
+
if (rect == null) {
|
|
1001
|
+
val width = this.width.toFloat()
|
|
1002
|
+
val height = this.height.toFloat()
|
|
1003
|
+
RectF(0f, 0f, width, height)
|
|
1004
|
+
} else {
|
|
1005
|
+
RectF(
|
|
1006
|
+
rect.left * this.displayDensity,
|
|
1007
|
+
rect.top * this.displayDensity,
|
|
1008
|
+
rect.right * this.displayDensity,
|
|
1009
|
+
rect.bottom * this.displayDensity,
|
|
1010
|
+
)
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
val features =
|
|
1014
|
+
mapVinaMap!!.queryRenderedFeatures(
|
|
1015
|
+
screenRect,
|
|
1016
|
+
filter,
|
|
1017
|
+
*(layers?.let { Array(layers.size()) { layers.getString(it) } } ?: emptyArray()),
|
|
1018
|
+
)
|
|
1019
|
+
|
|
1020
|
+
return GeoJSONUtils.fromFeatureList(features)
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
fun project(mapCoordinate: LatLng): WritableArray {
|
|
1024
|
+
val pointInView = mapVinaMap!!.projection.toScreenLocation(mapCoordinate)
|
|
1025
|
+
pointInView.x /= displayDensity
|
|
1026
|
+
pointInView.y /= displayDensity
|
|
1027
|
+
val payload: WritableArray = Arguments.createArray()
|
|
1028
|
+
|
|
1029
|
+
payload.pushDouble(pointInView.x.toDouble())
|
|
1030
|
+
payload.pushDouble(pointInView.y.toDouble())
|
|
1031
|
+
|
|
1032
|
+
return payload
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
fun unproject(pointInView: PointF): WritableArray {
|
|
1036
|
+
pointInView.x *= displayDensity
|
|
1037
|
+
pointInView.y *= displayDensity
|
|
1038
|
+
|
|
1039
|
+
val latLng = mapVinaMap!!.projection.fromScreenLocation(pointInView)
|
|
1040
|
+
|
|
1041
|
+
return GeoJSONUtils.fromLatLng(latLng)
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
fun takeSnap(
|
|
1045
|
+
writeToDisk: Boolean,
|
|
1046
|
+
callback: (String) -> Unit,
|
|
1047
|
+
) {
|
|
1048
|
+
if (this.mapVinaMap == null) {
|
|
1049
|
+
throw Error("takeSnap should only be called after the map has rendered")
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
mapVinaMap!!.snapshot { snapshot ->
|
|
1053
|
+
val uri =
|
|
1054
|
+
if (writeToDisk) {
|
|
1055
|
+
BitmapUtils.createTempFile(context, snapshot)
|
|
1056
|
+
} else {
|
|
1057
|
+
BitmapUtils.createBase64(snapshot)
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
callback(uri)
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
fun showAttribution() {
|
|
1065
|
+
val manager = AttributionDialogManager(context, this.mapVinaMap!!)
|
|
1066
|
+
manager.onClick(this)
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
fun setSourceVisibility(
|
|
1070
|
+
visible: Boolean,
|
|
1071
|
+
sourceId: String,
|
|
1072
|
+
sourceLayerId: String?,
|
|
1073
|
+
) {
|
|
1074
|
+
if (this.mapVinaMap == null) {
|
|
1075
|
+
return
|
|
1076
|
+
}
|
|
1077
|
+
mapVinaMap!!.getStyle { style ->
|
|
1078
|
+
val layers = style.layers
|
|
1079
|
+
for (layer in layers) {
|
|
1080
|
+
val layerSourceInfo = LayerSourceInfo(layer)
|
|
1081
|
+
if (layerSourceInfo.sourceId == sourceId && (sourceLayerId == null || sourceLayerId == layerSourceInfo.sourceLayerId)) {
|
|
1082
|
+
layer.setProperties(PropertyFactory.visibility(if (visible) Property.VISIBLE else Property.NONE))
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
fun init() {
|
|
1089
|
+
// Required for rendering properly in Android Oreo
|
|
1090
|
+
viewTreeObserver.dispatchOnGlobalLayout()
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
override fun isDestroyed(): Boolean = destroyed
|
|
1094
|
+
|
|
1095
|
+
fun getStyle(onStyleLoaded: OnStyleLoaded) {
|
|
1096
|
+
if (this.mapVinaMap == null) {
|
|
1097
|
+
return
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
mapVinaMap!!.getStyle(onStyleLoaded)
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
private fun getSystemInsetsForView(): Insets {
|
|
1104
|
+
val sysInsets =
|
|
1105
|
+
windowInsets?.getInsets(
|
|
1106
|
+
WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout(),
|
|
1107
|
+
)
|
|
1108
|
+
?: return Insets.NONE
|
|
1109
|
+
if (!isAttachedToWindow || width == 0 || height == 0) return Insets.NONE
|
|
1110
|
+
|
|
1111
|
+
val location = IntArray(2)
|
|
1112
|
+
getLocationOnScreen(location)
|
|
1113
|
+
val screenWidth = rootView.width
|
|
1114
|
+
val screenHeight = rootView.height
|
|
1115
|
+
|
|
1116
|
+
return Insets.of(
|
|
1117
|
+
if (location[0] <= 0) sysInsets.left else 0,
|
|
1118
|
+
if (location[1] <= 0) sysInsets.top else 0,
|
|
1119
|
+
if (location[0] + width >= screenWidth) sysInsets.right else 0,
|
|
1120
|
+
if (location[1] + height >= screenHeight) sysInsets.bottom else 0,
|
|
1121
|
+
)
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
private fun marginsWithInsets(
|
|
1125
|
+
margins: IntArray,
|
|
1126
|
+
gravity: Int,
|
|
1127
|
+
): IntArray {
|
|
1128
|
+
val viewInsets = getSystemInsetsForView()
|
|
1129
|
+
if (viewInsets == Insets.NONE) return margins
|
|
1130
|
+
|
|
1131
|
+
val absGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection)
|
|
1132
|
+
val isLeft = (absGravity and Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.LEFT
|
|
1133
|
+
val isRight = (absGravity and Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.RIGHT
|
|
1134
|
+
val isTop = (absGravity and Gravity.VERTICAL_GRAVITY_MASK) == Gravity.TOP
|
|
1135
|
+
val isBottom = (absGravity and Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM
|
|
1136
|
+
|
|
1137
|
+
return intArrayOf(
|
|
1138
|
+
margins[0] + if (isLeft) viewInsets.left else 0,
|
|
1139
|
+
margins[1] + if (isTop) viewInsets.top else 0,
|
|
1140
|
+
margins[2] + if (isRight) viewInsets.right else 0,
|
|
1141
|
+
margins[3] + if (isBottom) viewInsets.bottom else 0,
|
|
1142
|
+
)
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
private fun updateUISettings() {
|
|
1146
|
+
if (mapVinaMap == null) {
|
|
1147
|
+
return
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
val uiSettings = mapVinaMap!!.uiSettings
|
|
1151
|
+
|
|
1152
|
+
if (scrollEnabled != null && uiSettings.isScrollGesturesEnabled != scrollEnabled) {
|
|
1153
|
+
uiSettings.isScrollGesturesEnabled = scrollEnabled!!
|
|
1154
|
+
|
|
1155
|
+
if (!scrollEnabled!!) {
|
|
1156
|
+
mapVinaMap!!.gesturesManager.moveGestureDetector.interrupt()
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
if (touchZoomEnabled != null && uiSettings.isZoomGesturesEnabled != touchZoomEnabled) {
|
|
1161
|
+
uiSettings.isZoomGesturesEnabled = touchZoomEnabled!!
|
|
1162
|
+
|
|
1163
|
+
if (!touchZoomEnabled!!) {
|
|
1164
|
+
mapVinaMap!!.gesturesManager.standardScaleGestureDetector.interrupt()
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
if (doubleTapZoomEnabled != null) {
|
|
1169
|
+
if (uiSettings.isDoubleTapGesturesEnabled != doubleTapZoomEnabled) {
|
|
1170
|
+
uiSettings.setDoubleTapGesturesEnabled(doubleTapZoomEnabled!!)
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
if (doubleTapHoldZoomEnabled != null) {
|
|
1175
|
+
if (uiSettings.isQuickZoomGesturesEnabled != doubleTapHoldZoomEnabled) {
|
|
1176
|
+
uiSettings.setQuickZoomGesturesEnabled(doubleTapHoldZoomEnabled!!)
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
if (rotateEnabled != null && uiSettings.isRotateGesturesEnabled != rotateEnabled) {
|
|
1181
|
+
uiSettings.isRotateGesturesEnabled = rotateEnabled!!
|
|
1182
|
+
|
|
1183
|
+
if (!rotateEnabled!!) {
|
|
1184
|
+
mapVinaMap!!.gesturesManager.rotateGestureDetector.interrupt()
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
if (pitchEnabled != null && uiSettings.isTiltGesturesEnabled != pitchEnabled) {
|
|
1189
|
+
uiSettings.isTiltGesturesEnabled = pitchEnabled!!
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
if (tintColor != null) {
|
|
1193
|
+
uiSettings.setAttributionTintColor(tintColor!!)
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
if (attributionEnabled != null && uiSettings.isAttributionEnabled != attributionEnabled) {
|
|
1197
|
+
uiSettings.isAttributionEnabled = attributionEnabled!!
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
if (attributionGravity != null && uiSettings.attributionGravity != attributionGravity) {
|
|
1201
|
+
uiSettings.attributionGravity = attributionGravity!!
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
if (attributionMargin != null) {
|
|
1205
|
+
val adjusted = marginsWithInsets(attributionMargin!!, attributionGravity ?: uiSettings.attributionGravity)
|
|
1206
|
+
if (uiSettings.attributionMarginLeft != adjusted[0] || uiSettings.attributionMarginTop != adjusted[1] ||
|
|
1207
|
+
uiSettings.attributionMarginRight != adjusted[2] || uiSettings.attributionMarginBottom != adjusted[3]
|
|
1208
|
+
) {
|
|
1209
|
+
uiSettings.setAttributionMargins(adjusted[0], adjusted[1], adjusted[2], adjusted[3])
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
if (logoEnabled != null && uiSettings.isLogoEnabled != logoEnabled) {
|
|
1214
|
+
uiSettings.setLogoEnabled(logoEnabled!!)
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
if (logoGravity != null && uiSettings.logoGravity != logoGravity) {
|
|
1218
|
+
uiSettings.logoGravity = logoGravity!!
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
if (logoMargins != null) {
|
|
1222
|
+
val adjusted = marginsWithInsets(logoMargins!!, logoGravity ?: uiSettings.logoGravity)
|
|
1223
|
+
if (uiSettings.logoMarginLeft != adjusted[0] || uiSettings.logoMarginTop != adjusted[1] ||
|
|
1224
|
+
uiSettings.logoMarginRight != adjusted[2] || uiSettings.logoMarginBottom != adjusted[3]
|
|
1225
|
+
) {
|
|
1226
|
+
uiSettings.setLogoMargins(adjusted[0], adjusted[1], adjusted[2], adjusted[3])
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
if (compassEnabled != null && uiSettings.isCompassEnabled != compassEnabled) {
|
|
1231
|
+
uiSettings.setCompassEnabled(compassEnabled!!)
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
if (compassGravity != null && uiSettings.compassGravity != compassGravity) {
|
|
1235
|
+
uiSettings.compassGravity = compassGravity!!
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
if (compassMargins != null) {
|
|
1239
|
+
val adjusted = marginsWithInsets(compassMargins!!, compassGravity ?: uiSettings.compassGravity)
|
|
1240
|
+
if (uiSettings.compassMarginLeft != adjusted[0] || uiSettings.compassMarginTop != adjusted[1] ||
|
|
1241
|
+
uiSettings.compassMarginRight != adjusted[2] || uiSettings.compassMarginBottom != adjusted[3]
|
|
1242
|
+
) {
|
|
1243
|
+
uiSettings.setCompassMargins(adjusted[0], adjusted[1], adjusted[2], adjusted[3])
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
if (compassHiddenFacingNorth != null) {
|
|
1247
|
+
uiSettings.setCompassFadeFacingNorth(compassHiddenFacingNorth!!)
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
private fun updatePreferredFramesPerSecond() {
|
|
1252
|
+
if (preferredFramesPerSecond == null) {
|
|
1253
|
+
return
|
|
1254
|
+
}
|
|
1255
|
+
setMaximumFps(preferredFramesPerSecond!!)
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
val contentInset: DoubleArray
|
|
1259
|
+
get() {
|
|
1260
|
+
if (insets == null) {
|
|
1261
|
+
return doubleArrayOf(0.0, 0.0, 0.0, 0.0)
|
|
1262
|
+
}
|
|
1263
|
+
var top = 0.0
|
|
1264
|
+
var right = 0.0
|
|
1265
|
+
var bottom = 0.0
|
|
1266
|
+
var left = 0.0
|
|
1267
|
+
|
|
1268
|
+
if (insets!!.size() == 4) {
|
|
1269
|
+
top = insets!!.getInt(0).toDouble()
|
|
1270
|
+
right = insets!!.getInt(1).toDouble()
|
|
1271
|
+
bottom = insets!!.getInt(2).toDouble()
|
|
1272
|
+
left = insets!!.getInt(3).toDouble()
|
|
1273
|
+
} else if (insets!!.size() == 2) {
|
|
1274
|
+
top = insets!!.getInt(0).toDouble()
|
|
1275
|
+
right = insets!!.getInt(1).toDouble()
|
|
1276
|
+
bottom = top
|
|
1277
|
+
left = right
|
|
1278
|
+
} else if (insets!!.size() == 1) {
|
|
1279
|
+
top = insets!!.getInt(0).toDouble()
|
|
1280
|
+
right = top
|
|
1281
|
+
bottom = top
|
|
1282
|
+
left = top
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
return doubleArrayOf(
|
|
1286
|
+
left * displayDensity,
|
|
1287
|
+
top * displayDensity,
|
|
1288
|
+
right * displayDensity,
|
|
1289
|
+
bottom * displayDensity,
|
|
1290
|
+
)
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
private fun updateInsets() {
|
|
1294
|
+
if (this.mapVinaMap == null || insets == null) {
|
|
1295
|
+
return
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
val padding = this.contentInset
|
|
1299
|
+
val top = padding[1]
|
|
1300
|
+
val right = padding[2]
|
|
1301
|
+
val bottom = padding[3]
|
|
1302
|
+
val left = padding[0]
|
|
1303
|
+
|
|
1304
|
+
mapVinaMap!!.setPadding(
|
|
1305
|
+
left.toInt(),
|
|
1306
|
+
top.toInt(),
|
|
1307
|
+
right.toInt(),
|
|
1308
|
+
bottom.toInt(),
|
|
1309
|
+
)
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
private fun setLifecycleListeners() {
|
|
1313
|
+
val reactContext = context as ReactContext
|
|
1314
|
+
|
|
1315
|
+
lifeCycleListener =
|
|
1316
|
+
object : LifecycleEventListener {
|
|
1317
|
+
override fun onHostResume() {
|
|
1318
|
+
onResume()
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
override fun onHostPause() {
|
|
1322
|
+
onPause()
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
override fun onHostDestroy() {
|
|
1326
|
+
dispose()
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
reactContext.addLifecycleEventListener(lifeCycleListener)
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
private fun makeViewState(isAnimated: Boolean?): WritableMap {
|
|
1334
|
+
val position = mapVinaMap!!.cameraPosition
|
|
1335
|
+
val viewState: WritableMap = Arguments.createMap()
|
|
1336
|
+
|
|
1337
|
+
if (position.target == null) {
|
|
1338
|
+
return viewState
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
viewState.putArray(
|
|
1342
|
+
"center",
|
|
1343
|
+
Arguments.createArray().apply {
|
|
1344
|
+
pushDouble(position.target!!.longitude)
|
|
1345
|
+
pushDouble(position.target!!.latitude)
|
|
1346
|
+
},
|
|
1347
|
+
)
|
|
1348
|
+
|
|
1349
|
+
viewState.putDouble("zoom", position.zoom)
|
|
1350
|
+
viewState.putDouble("bearing", position.bearing)
|
|
1351
|
+
viewState.putDouble("pitch", position.tilt)
|
|
1352
|
+
|
|
1353
|
+
try {
|
|
1354
|
+
val visibleRegion = mapVinaMap!!.projection.visibleRegion
|
|
1355
|
+
viewState.putArray(
|
|
1356
|
+
"bounds",
|
|
1357
|
+
GeoJSONUtils.fromLatLngBounds(visibleRegion.latLngBounds),
|
|
1358
|
+
)
|
|
1359
|
+
} catch (ex: Exception) {
|
|
1360
|
+
Logger.e(
|
|
1361
|
+
LOG_TAG,
|
|
1362
|
+
String.format(
|
|
1363
|
+
"An error occurred while attempting to make the region: %s",
|
|
1364
|
+
ex.message,
|
|
1365
|
+
),
|
|
1366
|
+
)
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
viewState.putBoolean(
|
|
1370
|
+
"animated",
|
|
1371
|
+
isAnimated ?: cameraChangeTracker.isAnimated,
|
|
1372
|
+
)
|
|
1373
|
+
viewState.putBoolean("userInteraction", cameraChangeTracker.isUserInteraction)
|
|
1374
|
+
|
|
1375
|
+
return viewState
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
fun sendRegionChangeEvent(isAnimated: Boolean) {
|
|
1379
|
+
val event =
|
|
1380
|
+
MapChangeEvent(
|
|
1381
|
+
surfaceId,
|
|
1382
|
+
id,
|
|
1383
|
+
"onRegionDidChange",
|
|
1384
|
+
makeViewState(isAnimated),
|
|
1385
|
+
)
|
|
1386
|
+
eventDispatcher?.dispatchEvent(event)
|
|
1387
|
+
|
|
1388
|
+
cameraChangeTracker.setReason(CameraChangeTracker.EMPTY)
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
private fun removeAllSourcesFromMap() {
|
|
1392
|
+
if (sources.isEmpty()) {
|
|
1393
|
+
return
|
|
1394
|
+
}
|
|
1395
|
+
for (key in sources.keys) {
|
|
1396
|
+
val source = sources[key]
|
|
1397
|
+
source!!.removeFromMap(this)
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
private fun addAllSourcesToMap() {
|
|
1402
|
+
if (sources.isEmpty()) {
|
|
1403
|
+
return
|
|
1404
|
+
}
|
|
1405
|
+
for (key in sources.keys) {
|
|
1406
|
+
val source = sources[key]
|
|
1407
|
+
source!!.addToMap(this)
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
private val pressableSources: MutableList<MLRNPressableSource<*>>
|
|
1412
|
+
get() {
|
|
1413
|
+
val sources: MutableList<MLRNPressableSource<*>> = ArrayList()
|
|
1414
|
+
|
|
1415
|
+
for (key in this.sources.keys) {
|
|
1416
|
+
val source = this.sources[key]
|
|
1417
|
+
if (source != null && source is MLRNPressableSource && source.hasOnPress) {
|
|
1418
|
+
sources.add(source)
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
return sources
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
private fun getPressableSourceWithHighestZIndex(sources: MutableList<MLRNPressableSource<*>>?): MLRNPressableSource<*>? {
|
|
1426
|
+
if (sources.isNullOrEmpty()) {
|
|
1427
|
+
return null
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
if (sources.size == 1) {
|
|
1431
|
+
return sources[0]
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
val layerToSourceMap: MutableMap<String?, MLRNPressableSource<*>?> = HashMap()
|
|
1435
|
+
for (source in sources) {
|
|
1436
|
+
val layerIDs = source.getLayerIDs()
|
|
1437
|
+
|
|
1438
|
+
for (layerID in layerIDs) {
|
|
1439
|
+
layerToSourceMap[layerID] = source
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
val layers = mapVinaMap!!.style!!.getLayers()
|
|
1444
|
+
for (i in layers.indices.reversed()) {
|
|
1445
|
+
val layerID = layers[i].getId()
|
|
1446
|
+
|
|
1447
|
+
if (layerToSourceMap.containsKey(layerID)) {
|
|
1448
|
+
return layerToSourceMap[layerID]
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
return null
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
fun sendRegionDidChangeEvent() {
|
|
1456
|
+
handleMapChangedEvent("onRegionDidChange", true)
|
|
1457
|
+
cameraChangeTracker.setReason(CameraChangeTracker.EMPTY)
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
private fun handleMapChangedEvent(
|
|
1461
|
+
eventName: String,
|
|
1462
|
+
withViewState: Boolean? = null,
|
|
1463
|
+
) {
|
|
1464
|
+
val event =
|
|
1465
|
+
if (withViewState == true) {
|
|
1466
|
+
MapChangeEvent(surfaceId, id, eventName, makeViewState(null))
|
|
1467
|
+
} else {
|
|
1468
|
+
MapChangeEvent(surfaceId, id, eventName)
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
eventDispatcher?.dispatchEvent(event)
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* Adds the marker image to the map for use as a SymbolLayer icon
|
|
1476
|
+
*/
|
|
1477
|
+
private fun setUpImage(loadedStyle: Style) {
|
|
1478
|
+
loadedStyle.addImage(
|
|
1479
|
+
MLRNPointAnnotation.DEFAULT_MARKER,
|
|
1480
|
+
BitmapFactory.decodeResource(
|
|
1481
|
+
this.resources,
|
|
1482
|
+
R.drawable.default_marker,
|
|
1483
|
+
),
|
|
1484
|
+
)
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
/**
|
|
1488
|
+
* PointAnnotations are rendered to a canvas, but react native Image component is
|
|
1489
|
+
* implemented on top of Fresco, and fresco will not load images when their view is
|
|
1490
|
+
* not attached to the window. So we'll have an offscreen view where we add those views
|
|
1491
|
+
* so they can rendered full to canvas.
|
|
1492
|
+
*/
|
|
1493
|
+
fun offscreenAnnotationViewContainer(): ViewGroup? {
|
|
1494
|
+
if (offscreenAnnotationViewContainer == null) {
|
|
1495
|
+
offscreenAnnotationViewContainer = FrameLayout(this.context)
|
|
1496
|
+
val flParams = LayoutParams(0, 0)
|
|
1497
|
+
flParams.setMargins(-10000, -10000, -10000, -10000)
|
|
1498
|
+
offscreenAnnotationViewContainer!!.layoutParams = flParams
|
|
1499
|
+
addView(offscreenAnnotationViewContainer)
|
|
1500
|
+
}
|
|
1501
|
+
return offscreenAnnotationViewContainer
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
fun getMarkerViewManager(map: MapVinaMap): MarkerViewManager {
|
|
1505
|
+
if (markerViewManager == null) {
|
|
1506
|
+
markerViewManager = MarkerViewManager(this, map)
|
|
1507
|
+
}
|
|
1508
|
+
return markerViewManager!!
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
companion object {
|
|
1512
|
+
const val LOG_TAG: String = "MLRNMapView"
|
|
1513
|
+
}
|
|
1514
|
+
}
|