@maplibre/maplibre-react-native 11.0.0-beta.2 → 11.0.0-beta.21
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/android/build.gradle +3 -1
- package/android/gradle.properties +1 -1
- package/android/src/main/java/org/maplibre/reactnative/MLRNPackage.kt +13 -0
- package/android/src/main/java/org/maplibre/reactnative/components/annotations/markerview/MLRNMarkerView.kt +35 -28
- package/android/src/main/java/org/maplibre/reactnative/components/annotations/markerview/MLRNMarkerViewContent.kt +9 -14
- package/android/src/main/java/org/maplibre/reactnative/components/annotations/markerview/MLRNMarkerViewManager.kt +8 -1
- package/android/src/main/java/org/maplibre/reactnative/components/annotations/markerview/MarkerViewManager.kt +20 -13
- package/android/src/main/java/org/maplibre/reactnative/components/annotations/pointannotation/MLRNPointAnnotation.kt +45 -25
- package/android/src/main/java/org/maplibre/reactnative/components/annotations/pointannotation/MLRNPointAnnotationManager.kt +2 -1
- package/android/src/main/java/org/maplibre/reactnative/components/layer/style/MLRNStyleFactory.java +1 -1
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.kt +222 -133
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.kt +18 -0
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNLogModule.kt +2 -0
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNNetworkModule.kt +0 -42
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNOfflineModule.kt +27 -4
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNTransformRequestModule.kt +144 -0
- package/android/src/main/java/org/maplibre/reactnative/modules/TransformRequestInterceptor.kt +184 -0
- package/ios/components/annotations/point-annotation/MLRNPointAnnotation.h +3 -2
- package/ios/components/annotations/point-annotation/MLRNPointAnnotation.m +26 -2
- package/ios/components/annotations/point-annotation/MLRNPointAnnotationComponentView.mm +27 -19
- package/ios/components/camera/MLRNCameraComponentView.mm +5 -4
- package/ios/components/images/MLRNImageLoader.h +27 -0
- package/ios/components/images/MLRNImageLoader.m +85 -0
- package/ios/components/images/MLRNImageQueue.h +2 -2
- package/ios/components/images/MLRNImageQueue.m +2 -2
- package/ios/components/images/MLRNImageQueueOperation.h +2 -2
- package/ios/components/images/MLRNImageQueueOperation.m +3 -3
- package/ios/components/images/MLRNImages.h +0 -3
- package/ios/components/images/MLRNImages.m +6 -6
- package/ios/components/images/MLRNImagesComponentView.mm +0 -3
- package/ios/components/images/MLRNImagesModule.h +6 -0
- package/ios/components/images/MLRNImagesModule.mm +23 -0
- package/ios/components/layer/MLRNLayer.h +0 -3
- package/ios/components/layer/MLRNLayer.m +0 -1
- package/ios/components/layer/MLRNLayerComponentView.mm +12 -11
- package/ios/components/layer/style/MLRNStyle.h +1 -3
- package/ios/components/layer/style/MLRNStyle.m +68 -71
- package/ios/components/map-view/MLRNMapView.h +5 -0
- package/ios/components/map-view/MLRNMapView.m +64 -15
- package/ios/components/map-view/MLRNMapViewComponentView.mm +19 -3
- package/ios/components/map-view/MLRNMapViewModule.mm +1 -1
- package/ios/components/sources/geojson-source/MLRNGeoJSONSource.h +0 -3
- package/ios/components/sources/image-source/MLRNImageSourceComponentView.mm +1 -1
- package/ios/components/sources/tile-sources/raster-source/MLRNRasterSourceComponentView.mm +2 -3
- package/ios/components/sources/tile-sources/vector-source/MLRNVectorSourceComponentView.mm +2 -3
- package/ios/modules/logging/MLRNLogging.h +4 -0
- package/ios/modules/logging/MLRNLogging.m +8 -0
- package/ios/modules/network/MLRNNetworkModule.mm +0 -10
- 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/MLRNUtils.h +0 -14
- package/ios/utils/MLRNUtils.m +0 -71
- package/lib/commonjs/components/annotations/marker/Marker.js +0 -5
- package/lib/commonjs/components/annotations/marker/Marker.js.map +1 -1
- package/lib/commonjs/components/annotations/marker/MarkerViewNativeComponent.ts +12 -2
- package/lib/commonjs/components/annotations/view-annotation/PointAnnotationNativeComponent.ts +5 -4
- package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js +10 -14
- package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js.map +1 -1
- package/lib/commonjs/components/camera/Camera.js +4 -3
- package/lib/commonjs/components/camera/Camera.js.map +1 -1
- package/lib/commonjs/components/images/Images.js +1 -0
- package/lib/commonjs/components/images/Images.js.map +1 -1
- 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 +17 -62
- package/lib/commonjs/components/layer/Layer.js.map +1 -1
- package/lib/commonjs/components/map/AndroidTextureMapViewNativeComponent.ts +4 -1
- package/lib/commonjs/components/map/Map.js +4 -3
- package/lib/commonjs/components/map/Map.js.map +1 -1
- package/lib/commonjs/components/map/MapViewNativeComponent.ts +3 -0
- package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js +4 -3
- package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js.map +1 -1
- package/lib/commonjs/components/sources/vector-source/VectorSource.js +4 -3
- package/lib/commonjs/components/sources/vector-source/VectorSource.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocation.js +21 -12
- package/lib/commonjs/components/user-location/UserLocation.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocationPuck.js +16 -16
- package/lib/commonjs/components/user-location/UserLocationPuck.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocationPuckHeading.js +8 -10
- package/lib/commonjs/components/user-location/UserLocationPuckHeading.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/network/NativeNetworkModule.js.map +1 -1
- package/lib/commonjs/modules/network/NetworkManager.js +1 -39
- package/lib/commonjs/modules/network/NetworkManager.js.map +1 -1
- 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 +223 -0
- package/lib/commonjs/modules/transform-request/TransformRequestManager.js.map +1 -0
- package/lib/commonjs/utils/getStylePropertyType.js +1 -1
- package/lib/module/components/annotations/marker/Marker.js +0 -5
- package/lib/module/components/annotations/marker/Marker.js.map +1 -1
- package/lib/module/components/annotations/marker/MarkerViewNativeComponent.ts +12 -2
- package/lib/module/components/annotations/view-annotation/PointAnnotationNativeComponent.ts +5 -4
- package/lib/module/components/annotations/view-annotation/ViewAnnotation.js +10 -15
- package/lib/module/components/annotations/view-annotation/ViewAnnotation.js.map +1 -1
- package/lib/module/components/camera/Camera.js +5 -4
- package/lib/module/components/camera/Camera.js.map +1 -1
- package/lib/module/components/images/Images.js +1 -0
- package/lib/module/components/images/Images.js.map +1 -1
- 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 +17 -62
- package/lib/module/components/layer/Layer.js.map +1 -1
- package/lib/module/components/map/AndroidTextureMapViewNativeComponent.ts +4 -1
- package/lib/module/components/map/Map.js +5 -4
- package/lib/module/components/map/Map.js.map +1 -1
- package/lib/module/components/map/MapViewNativeComponent.ts +3 -0
- package/lib/module/components/sources/geojson-source/GeoJSONSource.js +5 -4
- package/lib/module/components/sources/geojson-source/GeoJSONSource.js.map +1 -1
- package/lib/module/components/sources/vector-source/VectorSource.js +5 -4
- package/lib/module/components/sources/vector-source/VectorSource.js.map +1 -1
- package/lib/module/components/user-location/UserLocation.js +21 -13
- package/lib/module/components/user-location/UserLocation.js.map +1 -1
- package/lib/module/components/user-location/UserLocationPuck.js +16 -16
- package/lib/module/components/user-location/UserLocationPuck.js.map +1 -1
- package/lib/module/components/user-location/UserLocationPuckHeading.js +8 -9
- package/lib/module/components/user-location/UserLocationPuckHeading.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/network/NativeNetworkModule.js.map +1 -1
- package/lib/module/modules/network/NetworkManager.js +1 -39
- package/lib/module/modules/network/NetworkManager.js.map +1 -1
- 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 +220 -0
- package/lib/module/modules/transform-request/TransformRequestManager.js.map +1 -0
- package/lib/module/utils/getStylePropertyType.js +1 -1
- package/lib/typescript/commonjs/components/annotations/LayerAnnotation.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/annotations/callout/Callout.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/annotations/callout/CalloutNativeComponent.d.ts.map +1 -0
- package/lib/typescript/{module/src → commonjs}/components/annotations/marker/Marker.d.ts +17 -4
- package/lib/typescript/commonjs/components/annotations/marker/Marker.d.ts.map +1 -0
- package/lib/typescript/commonjs/{src/components → components}/annotations/marker/MarkerViewNativeComponent.d.ts +12 -2
- package/lib/typescript/commonjs/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/{src/components → components}/annotations/view-annotation/PointAnnotationNativeComponent.d.ts +5 -4
- package/lib/typescript/commonjs/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/{src/components → components}/annotations/view-annotation/ViewAnnotation.d.ts +23 -8
- package/lib/typescript/commonjs/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -0
- package/lib/typescript/commonjs/{src/components → components}/camera/Camera.d.ts +6 -1
- package/lib/typescript/commonjs/components/camera/Camera.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/camera/CameraNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/camera/NativeCameraModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/{src/components → components}/images/Images.d.ts +1 -0
- package/lib/typescript/commonjs/components/images/Images.d.ts.map +1 -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/{src/components → components}/layer/Layer.d.ts +23 -59
- package/lib/typescript/commonjs/components/layer/Layer.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/layer/LayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/{src/components → components}/map/AndroidTextureMapViewNativeComponent.d.ts +2 -0
- package/lib/typescript/commonjs/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/{src/components → components}/map/Map.d.ts +22 -9
- package/lib/typescript/commonjs/components/map/Map.d.ts.map +1 -0
- package/lib/typescript/{module/src → commonjs}/components/map/MapViewNativeComponent.d.ts +2 -0
- package/lib/typescript/commonjs/components/map/MapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/map/NativeMapViewModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/{src/components → components}/sources/geojson-source/GeoJSONSource.d.ts +6 -2
- 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.map +1 -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.map +1 -0
- package/lib/typescript/commonjs/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +1 -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.map +1 -0
- package/lib/typescript/commonjs/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/{src/components → components}/sources/vector-source/VectorSource.d.ts +6 -2
- 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.map +1 -0
- package/lib/typescript/commonjs/components/user-location/NativeUserLocation.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/user-location/UserLocation.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/user-location/UserLocationPuck.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/user-location/UserLocationPuckHeading.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useCurrentPosition.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useFrozenId.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useNativeBridge.d.ts.map +1 -0
- package/lib/typescript/{module/src → commonjs}/index.d.ts +4 -3
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/location/LocationManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/location/NativeLocationModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/log/LogManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/log/NativeLogModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/{src/modules → modules}/network/NativeNetworkModule.d.ts +0 -2
- 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.map +1 -0
- package/lib/typescript/commonjs/modules/offline/OfflineManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/offline/OfflinePack.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/static-map/NativeStaticMapModule.d.ts.map +1 -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 +201 -0
- package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/plugin/MapLibrePluginProps.d.ts.map +1 -0
- package/lib/typescript/commonjs/plugin/android.d.ts.map +1 -0
- package/lib/typescript/commonjs/plugin/ios.d.ts.map +1 -0
- package/lib/typescript/commonjs/plugin/withMapLibre.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/Anchor.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/BaseProps.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/LngLat.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/LngLatBounds.d.ts.map +1 -0
- package/lib/typescript/commonjs/{src/types → types}/MapLibreRNStyles.d.ts +10 -10
- package/lib/typescript/commonjs/types/MapLibreRNStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/PixelPoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/PixelPointBounds.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/PressEvent.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/PressEventWithFeatures.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/ViewPadding.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/codegen/UnsafeMixed.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/sources/PressableSourceProps.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/BridgeValue.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/StyleValue.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -0
- package/lib/typescript/{module/src → commonjs}/utils/animated/Animated.d.ts +1 -1
- package/lib/typescript/commonjs/utils/animated/Animated.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedGeoJSON.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedPoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/convertStyleSpec.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/findNodeHandle.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/getNativeFilter.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/getStylePropertyType.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/index.d.ts.map +1 -0
- package/lib/typescript/module/components/annotations/LayerAnnotation.d.ts.map +1 -0
- package/lib/typescript/module/components/annotations/callout/Callout.d.ts.map +1 -0
- package/lib/typescript/module/components/annotations/callout/CalloutNativeComponent.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → module}/components/annotations/marker/Marker.d.ts +17 -4
- package/lib/typescript/module/components/annotations/marker/Marker.d.ts.map +1 -0
- package/lib/typescript/module/{src/components → components}/annotations/marker/MarkerViewNativeComponent.d.ts +12 -2
- package/lib/typescript/module/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/{src/components → components}/annotations/view-annotation/PointAnnotationNativeComponent.d.ts +5 -4
- package/lib/typescript/module/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/{src/components → components}/annotations/view-annotation/ViewAnnotation.d.ts +23 -8
- package/lib/typescript/module/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -0
- package/lib/typescript/module/{src/components → components}/camera/Camera.d.ts +6 -1
- package/lib/typescript/module/components/camera/Camera.d.ts.map +1 -0
- package/lib/typescript/module/components/camera/CameraNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/camera/NativeCameraModule.d.ts.map +1 -0
- package/lib/typescript/module/{src/components → components}/images/Images.d.ts +1 -0
- package/lib/typescript/module/components/images/Images.d.ts.map +1 -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/{src/components → components}/layer/Layer.d.ts +23 -59
- package/lib/typescript/module/components/layer/Layer.d.ts.map +1 -0
- package/lib/typescript/module/components/layer/LayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/{src/components → components}/map/AndroidTextureMapViewNativeComponent.d.ts +2 -0
- package/lib/typescript/module/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/{src/components → components}/map/Map.d.ts +22 -9
- package/lib/typescript/module/components/map/Map.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → module}/components/map/MapViewNativeComponent.d.ts +2 -0
- package/lib/typescript/module/components/map/MapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/map/NativeMapViewModule.d.ts.map +1 -0
- package/lib/typescript/module/{src/components → components}/sources/geojson-source/GeoJSONSource.d.ts +6 -2
- 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.map +1 -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.map +1 -0
- package/lib/typescript/module/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +1 -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.map +1 -0
- package/lib/typescript/module/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +1 -0
- package/lib/typescript/module/{src/components → components}/sources/vector-source/VectorSource.d.ts +6 -2
- 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.map +1 -0
- package/lib/typescript/module/components/user-location/NativeUserLocation.d.ts.map +1 -0
- package/lib/typescript/module/components/user-location/UserLocation.d.ts.map +1 -0
- package/lib/typescript/module/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/components/user-location/UserLocationPuck.d.ts.map +1 -0
- package/lib/typescript/module/components/user-location/UserLocationPuckHeading.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useCurrentPosition.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useFrozenId.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useNativeBridge.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → module}/index.d.ts +4 -3
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/modules/location/LocationManager.d.ts.map +1 -0
- package/lib/typescript/module/modules/location/NativeLocationModule.d.ts.map +1 -0
- package/lib/typescript/module/modules/log/LogManager.d.ts.map +1 -0
- package/lib/typescript/module/modules/log/NativeLogModule.d.ts.map +1 -0
- package/lib/typescript/module/{src/modules → modules}/network/NativeNetworkModule.d.ts +0 -2
- 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.map +1 -0
- package/lib/typescript/module/modules/offline/OfflineManager.d.ts.map +1 -0
- package/lib/typescript/module/modules/offline/OfflinePack.d.ts.map +1 -0
- package/lib/typescript/module/modules/static-map/NativeStaticMapModule.d.ts.map +1 -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 +201 -0
- package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts.map +1 -0
- package/lib/typescript/module/plugin/MapLibrePluginProps.d.ts.map +1 -0
- package/lib/typescript/module/plugin/android.d.ts.map +1 -0
- package/lib/typescript/module/plugin/ios.d.ts.map +1 -0
- package/lib/typescript/module/plugin/withMapLibre.d.ts.map +1 -0
- package/lib/typescript/module/types/Anchor.d.ts.map +1 -0
- package/lib/typescript/module/types/BaseProps.d.ts.map +1 -0
- package/lib/typescript/module/types/LngLat.d.ts.map +1 -0
- package/lib/typescript/module/types/LngLatBounds.d.ts.map +1 -0
- package/lib/typescript/module/{src/types → types}/MapLibreRNStyles.d.ts +10 -10
- package/lib/typescript/module/types/MapLibreRNStyles.d.ts.map +1 -0
- package/lib/typescript/module/types/PixelPoint.d.ts.map +1 -0
- package/lib/typescript/module/types/PixelPointBounds.d.ts.map +1 -0
- package/lib/typescript/module/types/PressEvent.d.ts.map +1 -0
- package/lib/typescript/module/types/PressEventWithFeatures.d.ts.map +1 -0
- package/lib/typescript/module/types/ViewPadding.d.ts.map +1 -0
- package/lib/typescript/module/types/codegen/UnsafeMixed.d.ts.map +1 -0
- package/lib/typescript/module/types/sources/PressableSourceProps.d.ts.map +1 -0
- package/lib/typescript/module/utils/BridgeValue.d.ts.map +1 -0
- package/lib/typescript/module/utils/StyleValue.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → module}/utils/animated/Animated.d.ts +1 -1
- package/lib/typescript/module/utils/animated/Animated.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/AnimatedGeoJSON.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/AnimatedPoint.d.ts.map +1 -0
- package/lib/typescript/module/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
- package/lib/typescript/module/utils/convertStyleSpec.d.ts.map +1 -0
- package/lib/typescript/module/utils/findNodeHandle.d.ts.map +1 -0
- package/lib/typescript/module/utils/getNativeFilter.d.ts.map +1 -0
- package/lib/typescript/module/utils/getStylePropertyType.d.ts.map +1 -0
- package/lib/typescript/module/utils/index.d.ts.map +1 -0
- package/package.json +21 -43
- package/src/components/annotations/marker/Marker.tsx +24 -21
- package/src/components/annotations/marker/MarkerViewNativeComponent.ts +12 -2
- package/src/components/annotations/view-annotation/PointAnnotationNativeComponent.ts +5 -4
- package/src/components/annotations/view-annotation/ViewAnnotation.tsx +78 -77
- package/src/components/camera/Camera.tsx +70 -69
- package/src/components/images/Images.tsx +1 -0
- package/src/components/images/NativeImagesModule.ts +11 -0
- package/src/components/layer/Layer.tsx +32 -78
- package/src/components/map/AndroidTextureMapViewNativeComponent.ts +4 -1
- package/src/components/map/Map.tsx +166 -164
- package/src/components/map/MapViewNativeComponent.ts +3 -0
- package/src/components/sources/geojson-source/GeoJSONSource.tsx +65 -62
- package/src/components/sources/vector-source/VectorSource.tsx +40 -37
- package/src/components/user-location/UserLocation.tsx +30 -18
- package/src/components/user-location/UserLocationPuck.tsx +20 -20
- package/src/components/user-location/UserLocationPuckHeading.tsx +9 -10
- package/src/index.ts +16 -5
- package/src/modules/network/NativeNetworkModule.ts +0 -4
- package/src/modules/network/NetworkManager.ts +1 -47
- package/src/modules/transform-request/NativeTransformRequestModule.ts +41 -0
- package/src/modules/transform-request/TransformRequestManager.ts +292 -0
- package/src/types/MapLibreRNStyles.ts +11 -10
- package/src/utils/getStylePropertyType.ts +1 -1
- package/android/src/main/java/org/maplibre/reactnative/http/RequestHeadersInterceptor.kt +0 -65
- package/android/src/main/res/layout/annotation.xml +0 -17
- package/ios/modules/network/MLRNNetworkHTTPHeaders.h +0 -14
- package/ios/modules/network/MLRNNetworkHTTPHeaders.m +0 -97
- package/lib/typescript/commonjs/src/components/annotations/LayerAnnotation.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/annotations/callout/Callout.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/annotations/callout/CalloutNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/annotations/marker/Marker.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/annotations/view-annotation/ViewAnnotation.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/camera/Camera.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/camera/CameraNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/camera/NativeCameraModule.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/images/Images.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/images/ImagesNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/layer/Layer.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/layer/LayerNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/map/Map.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/map/MapViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/map/NativeMapViewModule.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/sources/geojson-source/GeoJSONSource.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/sources/image-source/ImageSource.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/sources/raster-source/RasterSource.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/sources/raster-source/RasterSourceNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/sources/vector-source/VectorSource.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/sources/vector-source/VectorSourceNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/user-location/NativeUserLocation.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocation.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocationNativeComponent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocationPuck.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocationPuckHeading.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useCurrentPosition.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useFrozenId.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/location/NativeLocationModule.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/log/LogManager.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/log/NativeLogModule.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/network/NativeNetworkModule.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/network/NetworkManager.d.ts +0 -56
- package/lib/typescript/commonjs/src/modules/network/NetworkManager.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/offline/NativeOfflineModule.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/offline/OfflineManager.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/static-map/NativeStaticMapModule.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/static-map/StaticMapManager.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/plugin/MapLibrePluginProps.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/plugin/android.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/plugin/ios.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/plugin/withMapLibre.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/Anchor.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/BaseProps.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/LngLat.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/LngLatBounds.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/MapLibreRNStyles.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/PixelPoint.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/PixelPointBounds.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/PressEvent.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/PressEventWithFeatures.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/ViewPadding.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/codegen/UnsafeMixed.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/sources/PressableSourceProps.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/StyleValue.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedGeoJSON.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/convertStyleSpec.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/findNodeHandle.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/getNativeFilter.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/getStylePropertyType.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/index.d.ts.map +0 -1
- package/lib/typescript/module/src/components/annotations/LayerAnnotation.d.ts.map +0 -1
- package/lib/typescript/module/src/components/annotations/callout/Callout.d.ts.map +0 -1
- package/lib/typescript/module/src/components/annotations/callout/CalloutNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/annotations/marker/Marker.d.ts.map +0 -1
- package/lib/typescript/module/src/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/annotations/view-annotation/ViewAnnotation.d.ts.map +0 -1
- package/lib/typescript/module/src/components/camera/Camera.d.ts.map +0 -1
- package/lib/typescript/module/src/components/camera/CameraNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/camera/NativeCameraModule.d.ts.map +0 -1
- package/lib/typescript/module/src/components/images/Images.d.ts.map +0 -1
- package/lib/typescript/module/src/components/images/ImagesNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/layer/Layer.d.ts.map +0 -1
- package/lib/typescript/module/src/components/layer/LayerNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/map/Map.d.ts.map +0 -1
- package/lib/typescript/module/src/components/map/MapViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/map/NativeMapViewModule.d.ts.map +0 -1
- package/lib/typescript/module/src/components/sources/geojson-source/GeoJSONSource.d.ts.map +0 -1
- package/lib/typescript/module/src/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts.map +0 -1
- package/lib/typescript/module/src/components/sources/image-source/ImageSource.d.ts.map +0 -1
- package/lib/typescript/module/src/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/sources/raster-source/RasterSource.d.ts.map +0 -1
- package/lib/typescript/module/src/components/sources/raster-source/RasterSourceNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +0 -1
- package/lib/typescript/module/src/components/sources/vector-source/VectorSource.d.ts.map +0 -1
- package/lib/typescript/module/src/components/sources/vector-source/VectorSourceNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/user-location/NativeUserLocation.d.ts.map +0 -1
- package/lib/typescript/module/src/components/user-location/UserLocation.d.ts.map +0 -1
- package/lib/typescript/module/src/components/user-location/UserLocationNativeComponent.d.ts.map +0 -1
- package/lib/typescript/module/src/components/user-location/UserLocationPuck.d.ts.map +0 -1
- package/lib/typescript/module/src/components/user-location/UserLocationPuckHeading.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useCurrentPosition.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useFrozenId.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useNativeBridge.d.ts.map +0 -1
- package/lib/typescript/module/src/index.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/location/LocationManager.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/location/NativeLocationModule.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/log/LogManager.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/log/NativeLogModule.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/network/NativeNetworkModule.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/network/NetworkManager.d.ts +0 -56
- package/lib/typescript/module/src/modules/network/NetworkManager.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/offline/NativeOfflineModule.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/offline/OfflineManager.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/static-map/NativeStaticMapModule.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/static-map/StaticMapManager.d.ts.map +0 -1
- package/lib/typescript/module/src/plugin/MapLibrePluginProps.d.ts.map +0 -1
- package/lib/typescript/module/src/plugin/android.d.ts.map +0 -1
- package/lib/typescript/module/src/plugin/ios.d.ts.map +0 -1
- package/lib/typescript/module/src/plugin/withMapLibre.d.ts.map +0 -1
- package/lib/typescript/module/src/types/Anchor.d.ts.map +0 -1
- package/lib/typescript/module/src/types/BaseProps.d.ts.map +0 -1
- package/lib/typescript/module/src/types/LngLat.d.ts.map +0 -1
- package/lib/typescript/module/src/types/LngLatBounds.d.ts.map +0 -1
- package/lib/typescript/module/src/types/MapLibreRNStyles.d.ts.map +0 -1
- package/lib/typescript/module/src/types/PixelPoint.d.ts.map +0 -1
- package/lib/typescript/module/src/types/PixelPointBounds.d.ts.map +0 -1
- package/lib/typescript/module/src/types/PressEvent.d.ts.map +0 -1
- package/lib/typescript/module/src/types/PressEventWithFeatures.d.ts.map +0 -1
- package/lib/typescript/module/src/types/ViewPadding.d.ts.map +0 -1
- package/lib/typescript/module/src/types/codegen/UnsafeMixed.d.ts.map +0 -1
- package/lib/typescript/module/src/types/sources/PressableSourceProps.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/BridgeValue.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/StyleValue.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/animated/Animated.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/animated/AnimatedGeoJSON.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/convertStyleSpec.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/findNodeHandle.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/getNativeFilter.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/getStylePropertyType.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/index.d.ts.map +0 -1
- /package/android/src/main/res/drawable-xxhdpi/{red_marker.png → default_marker.png} +0 -0
- /package/ios/{components/images → utils}/MLRNImageUtils.h +0 -0
- /package/ios/{components/images → utils}/MLRNImageUtils.m +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/annotations/LayerAnnotation.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/annotations/callout/Callout.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/annotations/callout/CalloutNativeComponent.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/camera/CameraNativeComponent.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/camera/NativeCameraModule.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/images/ImagesNativeComponent.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/layer/LayerNativeComponent.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/map/NativeMapViewModule.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/sources/geojson-source/NativeGeoJSONSourceModule.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/sources/image-source/ImageSource.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/sources/image-source/ImageSourceNativeComponent.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/sources/raster-source/RasterSource.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/sources/raster-source/RasterSourceNativeComponent.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/sources/vector-source/NativeVectorSourceModule.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/sources/vector-source/VectorSourceNativeComponent.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/user-location/NativeUserLocation.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/user-location/UserLocation.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/user-location/UserLocationNativeComponent.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/user-location/UserLocationPuck.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/components → components}/user-location/UserLocationPuckHeading.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/hooks → hooks}/useCurrentPosition.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/hooks → hooks}/useFrozenId.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/hooks → hooks}/useNativeBridge.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/modules → modules}/location/LocationManager.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/modules → modules}/location/NativeLocationModule.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/modules → modules}/log/LogManager.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/modules → modules}/log/NativeLogModule.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/modules → modules}/offline/NativeOfflineModule.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/modules → modules}/offline/OfflineManager.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/modules → modules}/offline/OfflinePack.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/modules → modules}/static-map/NativeStaticMapModule.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/modules → modules}/static-map/StaticMapManager.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/plugin → plugin}/MapLibrePluginProps.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/plugin → plugin}/android.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/plugin → plugin}/ios.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/plugin → plugin}/withMapLibre.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/types → types}/Anchor.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/types → types}/BaseProps.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/types → types}/LngLat.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/types → types}/LngLatBounds.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/types → types}/PixelPoint.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/types → types}/PixelPointBounds.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/types → types}/PressEvent.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/types → types}/PressEventWithFeatures.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/types → types}/ViewPadding.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/types → types}/codegen/UnsafeMixed.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/types → types}/sources/PressableSourceProps.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/BridgeValue.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/StyleValue.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/animated/AbstractAnimatedCoordinates.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedCoordinatesArray.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedExtractCoordinateFromArray.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedGeoJSON.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedPoint.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedRouteCoordinatesArray.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/convertStyleSpec.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/findNodeHandle.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/getNativeFilter.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/getStylePropertyType.d.ts +0 -0
- /package/lib/typescript/commonjs/{src/utils → utils}/index.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/annotations/LayerAnnotation.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/annotations/callout/Callout.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/annotations/callout/CalloutNativeComponent.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/camera/CameraNativeComponent.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/camera/NativeCameraModule.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/images/ImagesNativeComponent.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/layer/LayerNativeComponent.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/map/NativeMapViewModule.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/sources/geojson-source/NativeGeoJSONSourceModule.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/sources/image-source/ImageSource.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/sources/image-source/ImageSourceNativeComponent.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/sources/raster-source/RasterSource.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/sources/raster-source/RasterSourceNativeComponent.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/sources/vector-source/NativeVectorSourceModule.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/sources/vector-source/VectorSourceNativeComponent.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/user-location/NativeUserLocation.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/user-location/UserLocation.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/user-location/UserLocationNativeComponent.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/user-location/UserLocationPuck.d.ts +0 -0
- /package/lib/typescript/module/{src/components → components}/user-location/UserLocationPuckHeading.d.ts +0 -0
- /package/lib/typescript/module/{src/hooks → hooks}/useCurrentPosition.d.ts +0 -0
- /package/lib/typescript/module/{src/hooks → hooks}/useFrozenId.d.ts +0 -0
- /package/lib/typescript/module/{src/hooks → hooks}/useNativeBridge.d.ts +0 -0
- /package/lib/typescript/module/{src/modules → modules}/location/LocationManager.d.ts +0 -0
- /package/lib/typescript/module/{src/modules → modules}/location/NativeLocationModule.d.ts +0 -0
- /package/lib/typescript/module/{src/modules → modules}/log/LogManager.d.ts +0 -0
- /package/lib/typescript/module/{src/modules → modules}/log/NativeLogModule.d.ts +0 -0
- /package/lib/typescript/module/{src/modules → modules}/offline/NativeOfflineModule.d.ts +0 -0
- /package/lib/typescript/module/{src/modules → modules}/offline/OfflineManager.d.ts +0 -0
- /package/lib/typescript/module/{src/modules → modules}/offline/OfflinePack.d.ts +0 -0
- /package/lib/typescript/module/{src/modules → modules}/static-map/NativeStaticMapModule.d.ts +0 -0
- /package/lib/typescript/module/{src/modules → modules}/static-map/StaticMapManager.d.ts +0 -0
- /package/lib/typescript/module/{src/plugin → plugin}/MapLibrePluginProps.d.ts +0 -0
- /package/lib/typescript/module/{src/plugin → plugin}/android.d.ts +0 -0
- /package/lib/typescript/module/{src/plugin → plugin}/ios.d.ts +0 -0
- /package/lib/typescript/module/{src/plugin → plugin}/withMapLibre.d.ts +0 -0
- /package/lib/typescript/module/{src/types → types}/Anchor.d.ts +0 -0
- /package/lib/typescript/module/{src/types → types}/BaseProps.d.ts +0 -0
- /package/lib/typescript/module/{src/types → types}/LngLat.d.ts +0 -0
- /package/lib/typescript/module/{src/types → types}/LngLatBounds.d.ts +0 -0
- /package/lib/typescript/module/{src/types → types}/PixelPoint.d.ts +0 -0
- /package/lib/typescript/module/{src/types → types}/PixelPointBounds.d.ts +0 -0
- /package/lib/typescript/module/{src/types → types}/PressEvent.d.ts +0 -0
- /package/lib/typescript/module/{src/types → types}/PressEventWithFeatures.d.ts +0 -0
- /package/lib/typescript/module/{src/types → types}/ViewPadding.d.ts +0 -0
- /package/lib/typescript/module/{src/types → types}/codegen/UnsafeMixed.d.ts +0 -0
- /package/lib/typescript/module/{src/types → types}/sources/PressableSourceProps.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/BridgeValue.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/StyleValue.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/animated/AbstractAnimatedCoordinates.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/animated/AnimatedCoordinatesArray.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/animated/AnimatedExtractCoordinateFromArray.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/animated/AnimatedGeoJSON.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/animated/AnimatedPoint.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/animated/AnimatedRouteCoordinatesArray.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/convertStyleSpec.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/findNodeHandle.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/getNativeFilter.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/getStylePropertyType.d.ts +0 -0
- /package/lib/typescript/module/{src/utils → utils}/index.d.ts +0 -0
|
@@ -13,6 +13,9 @@ import android.view.MotionEvent
|
|
|
13
13
|
import android.view.View
|
|
14
14
|
import android.view.ViewGroup
|
|
15
15
|
import android.widget.FrameLayout
|
|
16
|
+
import androidx.core.graphics.Insets
|
|
17
|
+
import androidx.core.view.ViewCompat
|
|
18
|
+
import androidx.core.view.WindowInsetsCompat
|
|
16
19
|
import com.facebook.react.bridge.Arguments
|
|
17
20
|
import com.facebook.react.bridge.LifecycleEventListener
|
|
18
21
|
import com.facebook.react.bridge.ReactContext
|
|
@@ -37,6 +40,8 @@ import org.maplibre.android.maps.Style.OnStyleLoaded
|
|
|
37
40
|
import org.maplibre.android.plugins.annotation.OnSymbolDragListener
|
|
38
41
|
import org.maplibre.android.plugins.annotation.Symbol
|
|
39
42
|
import org.maplibre.android.plugins.annotation.SymbolManager
|
|
43
|
+
import org.maplibre.android.plugins.scalebar.ScaleBarOptions
|
|
44
|
+
import org.maplibre.android.plugins.scalebar.ScaleBarPlugin
|
|
40
45
|
import org.maplibre.android.style.expressions.Expression
|
|
41
46
|
import org.maplibre.android.style.layers.Layer
|
|
42
47
|
import org.maplibre.android.style.layers.Property
|
|
@@ -91,7 +96,6 @@ open class MLRNMapView(
|
|
|
91
96
|
OnMapReadyCallback,
|
|
92
97
|
MapLibreMap.OnMapClickListener,
|
|
93
98
|
MapLibreMap.OnMapLongClickListener,
|
|
94
|
-
MapView.OnCameraIsChangingListener,
|
|
95
99
|
MapView.OnCameraDidChangeListener,
|
|
96
100
|
MapView.OnWillStartLoadingMapListener,
|
|
97
101
|
MapView.OnDidFailLoadingMapListener,
|
|
@@ -154,10 +158,14 @@ open class MLRNMapView(
|
|
|
154
158
|
private var compassMargins: IntArray? = null
|
|
155
159
|
private var compassHiddenFacingNorth: Boolean? = null
|
|
156
160
|
|
|
157
|
-
private var
|
|
161
|
+
private var scaleBarEnabled: Boolean? = null
|
|
162
|
+
private var scaleBarMarginTop: Float? = null
|
|
163
|
+
private var scaleBarMarginLeft: Float? = null
|
|
164
|
+
private var scaleBarPlugin: ScaleBarPlugin? = null
|
|
165
|
+
|
|
166
|
+
private var windowInsets: WindowInsetsCompat? = null
|
|
158
167
|
|
|
159
|
-
private var
|
|
160
|
-
private var pointAnnotationClicked = false
|
|
168
|
+
private var symbolManager: SymbolManager? = null
|
|
161
169
|
|
|
162
170
|
private var markerViewManager: MarkerViewManager? = null
|
|
163
171
|
private var offscreenAnnotationViewContainer: ViewGroup? = null
|
|
@@ -195,6 +203,22 @@ open class MLRNMapView(
|
|
|
195
203
|
destroyed = true
|
|
196
204
|
}
|
|
197
205
|
|
|
206
|
+
override fun onAttachedToWindow() {
|
|
207
|
+
super.onAttachedToWindow()
|
|
208
|
+
ViewCompat.setOnApplyWindowInsetsListener(this) { _, insets ->
|
|
209
|
+
windowInsets = insets
|
|
210
|
+
updateUISettings()
|
|
211
|
+
updateScaleBar()
|
|
212
|
+
insets
|
|
213
|
+
}
|
|
214
|
+
ViewCompat.requestApplyInsets(this)
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
override fun onDetachedFromWindow() {
|
|
218
|
+
super.onDetachedFromWindow()
|
|
219
|
+
ViewCompat.setOnApplyWindowInsetsListener(this, null)
|
|
220
|
+
}
|
|
221
|
+
|
|
198
222
|
fun addFeature(
|
|
199
223
|
childView: View?,
|
|
200
224
|
childPosition: Int,
|
|
@@ -264,10 +288,6 @@ open class MLRNMapView(
|
|
|
264
288
|
}
|
|
265
289
|
|
|
266
290
|
is MLRNPointAnnotation -> {
|
|
267
|
-
if (child.feature.annotationId == activePointAnnotationAnnotationId) {
|
|
268
|
-
activePointAnnotationAnnotationId = null
|
|
269
|
-
}
|
|
270
|
-
|
|
271
291
|
child.feature.mapLibreId?.let { pointAnnotations.remove(it) }
|
|
272
292
|
}
|
|
273
293
|
|
|
@@ -324,18 +344,11 @@ open class MLRNMapView(
|
|
|
324
344
|
mapLibreMap!!.moveCamera(cameraUpdate, callback)
|
|
325
345
|
}
|
|
326
346
|
|
|
327
|
-
fun
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
if (annotation != null && markerID == annotation.annotationId) {
|
|
332
|
-
return annotation
|
|
333
|
-
}
|
|
347
|
+
fun getPointAnnotationByAnnotationId(annotationId: Long): MLRNPointAnnotation? =
|
|
348
|
+
pointAnnotations.values.find {
|
|
349
|
+
it.annotationId == annotationId
|
|
334
350
|
}
|
|
335
351
|
|
|
336
|
-
return null
|
|
337
|
-
}
|
|
338
|
-
|
|
339
352
|
fun getSymbolManager(): SymbolManager = symbolManager!!
|
|
340
353
|
|
|
341
354
|
interface FoundLayerCallback {
|
|
@@ -361,7 +374,6 @@ open class MLRNMapView(
|
|
|
361
374
|
|
|
362
375
|
setLifecycleListeners()
|
|
363
376
|
|
|
364
|
-
addOnCameraIsChangingListener(this)
|
|
365
377
|
addOnCameraDidChangeListener(this)
|
|
366
378
|
addOnDidFailLoadingMapListener(this)
|
|
367
379
|
addOnDidFinishLoadingMapListener(this)
|
|
@@ -402,6 +414,37 @@ open class MLRNMapView(
|
|
|
402
414
|
override fun onMapReady(mapLibreMap: MapLibreMap) {
|
|
403
415
|
this.mapLibreMap = mapLibreMap
|
|
404
416
|
|
|
417
|
+
val uiSettings = mapLibreMap.uiSettings
|
|
418
|
+
attributionGravity = Gravity.END or Gravity.BOTTOM
|
|
419
|
+
attributionMargin =
|
|
420
|
+
intArrayOf(
|
|
421
|
+
0,
|
|
422
|
+
0,
|
|
423
|
+
(4 * displayDensity).roundToInt(),
|
|
424
|
+
(4 * displayDensity).roundToInt(),
|
|
425
|
+
)
|
|
426
|
+
|
|
427
|
+
if (logoGravity == null) logoGravity = uiSettings.logoGravity
|
|
428
|
+
if (logoMargins == null) {
|
|
429
|
+
logoMargins =
|
|
430
|
+
intArrayOf(
|
|
431
|
+
uiSettings.logoMarginLeft,
|
|
432
|
+
uiSettings.logoMarginTop,
|
|
433
|
+
uiSettings.logoMarginRight,
|
|
434
|
+
uiSettings.logoMarginBottom,
|
|
435
|
+
)
|
|
436
|
+
}
|
|
437
|
+
if (compassGravity == null) compassGravity = uiSettings.compassGravity
|
|
438
|
+
if (compassMargins == null) {
|
|
439
|
+
compassMargins =
|
|
440
|
+
intArrayOf(
|
|
441
|
+
uiSettings.compassMarginLeft,
|
|
442
|
+
uiSettings.compassMarginTop,
|
|
443
|
+
uiSettings.compassMarginRight,
|
|
444
|
+
uiSettings.compassMarginBottom,
|
|
445
|
+
)
|
|
446
|
+
}
|
|
447
|
+
|
|
405
448
|
mapStyle?.let { style ->
|
|
406
449
|
mapLibreMap.setStyle(
|
|
407
450
|
if (ConvertUtils.isJSONValid(style)) {
|
|
@@ -425,12 +468,17 @@ open class MLRNMapView(
|
|
|
425
468
|
updatePreferredFramesPerSecond()
|
|
426
469
|
updateInsets()
|
|
427
470
|
updateUISettings()
|
|
471
|
+
updateScaleBar()
|
|
428
472
|
|
|
429
473
|
mapLibreMap.addOnCameraMoveStartedListener { reason ->
|
|
430
474
|
cameraChangeTracker.setReason(reason)
|
|
431
475
|
handleMapChangedEvent("onRegionWillChange", true)
|
|
432
476
|
}
|
|
433
477
|
|
|
478
|
+
mapLibreMap.addOnCameraMoveListener {
|
|
479
|
+
handleMapChangedEvent("onRegionIsChanging", true)
|
|
480
|
+
}
|
|
481
|
+
|
|
434
482
|
mapLibreMap.addOnMoveListener(
|
|
435
483
|
object : MapLibreMap.OnMoveListener {
|
|
436
484
|
override fun onMoveBegin(detector: MoveGestureDetector) {
|
|
@@ -439,8 +487,7 @@ open class MLRNMapView(
|
|
|
439
487
|
}
|
|
440
488
|
|
|
441
489
|
override fun onMove(detector: MoveGestureDetector) {
|
|
442
|
-
|
|
443
|
-
handleMapChangedEvent("onRegionIsChanging", true)
|
|
490
|
+
// Handled by mapLibreMap.addOnCameraMoveListener
|
|
444
491
|
}
|
|
445
492
|
|
|
446
493
|
override fun onMoveEnd(detector: MoveGestureDetector) {
|
|
@@ -465,28 +512,24 @@ open class MLRNMapView(
|
|
|
465
512
|
symbolManager = SymbolManager(this, this.mapLibreMap!!, style)
|
|
466
513
|
symbolManager!!.setIconAllowOverlap(true)
|
|
467
514
|
symbolManager!!.addClickListener { symbol ->
|
|
468
|
-
|
|
515
|
+
onPointAnnotationClick(symbol)
|
|
469
516
|
true
|
|
470
517
|
}
|
|
471
518
|
symbolManager!!.addDragListener(
|
|
472
519
|
object : OnSymbolDragListener {
|
|
473
520
|
override fun onAnnotationDragStarted(symbol: Symbol) {
|
|
474
|
-
|
|
475
|
-
val
|
|
476
|
-
val annotation = getPointAnnotationByMarkerID(selectedMarkerID)
|
|
521
|
+
val selectedPointAnnotationID = symbol.id
|
|
522
|
+
val annotation = getPointAnnotationByAnnotationId(selectedPointAnnotationID)
|
|
477
523
|
annotation?.onDragStart()
|
|
478
524
|
}
|
|
479
525
|
|
|
480
526
|
override fun onAnnotationDrag(symbol: Symbol) {
|
|
481
|
-
val
|
|
482
|
-
val annotation = getPointAnnotationByMarkerID(selectedMarkerID)
|
|
527
|
+
val annotation = getPointAnnotationByAnnotationId(symbol.id)
|
|
483
528
|
annotation?.onDrag()
|
|
484
529
|
}
|
|
485
530
|
|
|
486
531
|
override fun onAnnotationDragFinished(symbol: Symbol) {
|
|
487
|
-
|
|
488
|
-
val selectedMarkerID = symbol.id
|
|
489
|
-
val annotation = getPointAnnotationByMarkerID(selectedMarkerID)
|
|
532
|
+
val annotation = getPointAnnotationByAnnotationId(symbol.id)
|
|
490
533
|
annotation?.onDragEnd()
|
|
491
534
|
}
|
|
492
535
|
},
|
|
@@ -544,22 +587,29 @@ open class MLRNMapView(
|
|
|
544
587
|
markerViewManager!!.restoreViews()
|
|
545
588
|
}
|
|
546
589
|
}
|
|
590
|
+
|
|
591
|
+
if (changed) {
|
|
592
|
+
handler.post {
|
|
593
|
+
updateUISettings()
|
|
594
|
+
updateScaleBar()
|
|
595
|
+
}
|
|
596
|
+
}
|
|
547
597
|
}
|
|
548
598
|
|
|
549
599
|
override fun onMapClick(latLng: LatLng): Boolean {
|
|
550
|
-
|
|
551
|
-
pointAnnotationClicked = false
|
|
552
|
-
}
|
|
600
|
+
pointAnnotations.values.find { it.selected }?.let { deselectAnnotation(it) }
|
|
553
601
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
602
|
+
val screenPoint = mapLibreMap!!.projection.toScreenLocation(latLng)
|
|
603
|
+
|
|
604
|
+
if (markerViewManager != null) {
|
|
605
|
+
val hitMarker = markerViewManager!!.findMarkerAtPoint(screenPoint)
|
|
606
|
+
if (hitMarker != null) {
|
|
607
|
+
val pressPoint = PointF(screenPoint.x / displayDensity, screenPoint.y / displayDensity)
|
|
608
|
+
hitMarker.markerView.onPress(latLng, pressPoint)
|
|
609
|
+
return true
|
|
558
610
|
}
|
|
559
611
|
}
|
|
560
612
|
|
|
561
|
-
val screenPoint = mapLibreMap!!.projection.toScreenLocation(latLng)
|
|
562
|
-
|
|
563
613
|
val hits: MutableMap<String, MutableList<Feature>?> = HashMap()
|
|
564
614
|
val hitPressableSources: MutableList<MLRNPressableSource<*>> = ArrayList()
|
|
565
615
|
for (pressableSource in this.pressableSources) {
|
|
@@ -567,10 +617,10 @@ open class MLRNMapView(
|
|
|
567
617
|
|
|
568
618
|
val pointWithHitbox =
|
|
569
619
|
RectF(
|
|
570
|
-
screenPoint.x - hitbox.left,
|
|
571
|
-
screenPoint.y - hitbox.top,
|
|
572
|
-
screenPoint.x + hitbox.right,
|
|
573
|
-
screenPoint.y + hitbox.bottom,
|
|
620
|
+
screenPoint.x - (hitbox.left * displayDensity),
|
|
621
|
+
screenPoint.y - (hitbox.top * displayDensity),
|
|
622
|
+
screenPoint.x + (hitbox.right * displayDensity),
|
|
623
|
+
screenPoint.y + (hitbox.bottom * displayDensity),
|
|
574
624
|
)
|
|
575
625
|
|
|
576
626
|
val features =
|
|
@@ -581,6 +631,9 @@ open class MLRNMapView(
|
|
|
581
631
|
}
|
|
582
632
|
}
|
|
583
633
|
|
|
634
|
+
screenPoint.x /= this.displayDensity
|
|
635
|
+
screenPoint.y /= this.displayDensity
|
|
636
|
+
|
|
584
637
|
if (hits.isNotEmpty()) {
|
|
585
638
|
val source = getPressableSourceWithHighestZIndex(hitPressableSources)
|
|
586
639
|
if (source != null && source.hasOnPress) {
|
|
@@ -599,11 +652,14 @@ open class MLRNMapView(
|
|
|
599
652
|
}
|
|
600
653
|
|
|
601
654
|
override fun onMapLongClick(latLng: LatLng): Boolean {
|
|
602
|
-
|
|
603
|
-
|
|
655
|
+
val screenPoint = mapLibreMap!!.projection.toScreenLocation(latLng)
|
|
656
|
+
|
|
657
|
+
if (markerViewManager?.isPointInsideMarker(screenPoint) == true) {
|
|
658
|
+
return true
|
|
604
659
|
}
|
|
605
660
|
|
|
606
|
-
|
|
661
|
+
screenPoint.x /= this.displayDensity
|
|
662
|
+
screenPoint.y /= this.displayDensity
|
|
607
663
|
|
|
608
664
|
val event = MapPressEvent(surfaceId, id, "onLongPress", latLng, screenPoint)
|
|
609
665
|
eventDispatcher?.dispatchEvent(event)
|
|
@@ -611,42 +667,26 @@ open class MLRNMapView(
|
|
|
611
667
|
return false
|
|
612
668
|
}
|
|
613
669
|
|
|
614
|
-
fun
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
var activeAnnotation: MLRNPointAnnotation? = null
|
|
619
|
-
var nextActiveAnnotation: MLRNPointAnnotation? = null
|
|
670
|
+
fun onPointAnnotationClick(nextSymbol: Symbol) {
|
|
671
|
+
val nextSelectedPointAnnotation =
|
|
672
|
+
getPointAnnotationByAnnotationId(nextSymbol.id) ?: return
|
|
620
673
|
|
|
621
|
-
|
|
622
|
-
val pointAnnotation = pointAnnotations[key]
|
|
623
|
-
val currentAnnotationId = pointAnnotation!!.annotationId
|
|
674
|
+
nextSelectedPointAnnotation.onPress()
|
|
624
675
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
if (selectedMarkerID == currentAnnotationId && activePointAnnotationAnnotationId != currentAnnotationId) {
|
|
630
|
-
nextActiveAnnotation = pointAnnotation
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
if (activeAnnotation != null) {
|
|
635
|
-
deselectAnnotation(activeAnnotation)
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
if (nextActiveAnnotation != null) {
|
|
639
|
-
selectAnnotation(nextActiveAnnotation)
|
|
676
|
+
if (!nextSelectedPointAnnotation.selected) {
|
|
677
|
+
selectAnnotation(nextSelectedPointAnnotation)
|
|
640
678
|
}
|
|
641
679
|
}
|
|
642
680
|
|
|
643
|
-
fun selectAnnotation(
|
|
644
|
-
|
|
645
|
-
|
|
681
|
+
fun selectAnnotation(nextSelectedPointAnnotation: MLRNPointAnnotation) {
|
|
682
|
+
pointAnnotations.values
|
|
683
|
+
.filter { it.selected && it !== nextSelectedPointAnnotation }
|
|
684
|
+
.forEach { it.onDeselect() }
|
|
685
|
+
|
|
686
|
+
nextSelectedPointAnnotation.onSelect()
|
|
646
687
|
}
|
|
647
688
|
|
|
648
689
|
fun deselectAnnotation(annotation: MLRNPointAnnotation) {
|
|
649
|
-
activePointAnnotationAnnotationId = null
|
|
650
690
|
annotation.onDeselect()
|
|
651
691
|
}
|
|
652
692
|
|
|
@@ -654,10 +694,6 @@ open class MLRNMapView(
|
|
|
654
694
|
cameraChangeTracker.isAnimating = animated
|
|
655
695
|
}
|
|
656
696
|
|
|
657
|
-
override fun onCameraIsChanging() {
|
|
658
|
-
handleMapChangedEvent("onRegionIsChanging", true)
|
|
659
|
-
}
|
|
660
|
-
|
|
661
697
|
override fun onWillStartLoadingMap() {
|
|
662
698
|
handleMapChangedEvent("onWillStartLoadingMap")
|
|
663
699
|
}
|
|
@@ -825,13 +861,12 @@ open class MLRNMapView(
|
|
|
825
861
|
if (position.hasKey("right")) gravity = gravity or Gravity.END
|
|
826
862
|
if (position.hasKey("top")) gravity = gravity or Gravity.TOP
|
|
827
863
|
if (position.hasKey("bottom")) gravity = gravity or Gravity.BOTTOM
|
|
828
|
-
val density = this.displayDensity
|
|
829
864
|
val margins =
|
|
830
865
|
intArrayOf(
|
|
831
|
-
if (position.hasKey("left")) (
|
|
832
|
-
if (position.hasKey("top")) (
|
|
833
|
-
if (position.hasKey("right")) (
|
|
834
|
-
if (position.hasKey("bottom")) (
|
|
866
|
+
if (position.hasKey("left")) (displayDensity * position.getInt("left")).roundToInt() else 0,
|
|
867
|
+
if (position.hasKey("top")) (displayDensity * position.getInt("top")).roundToInt() else 0,
|
|
868
|
+
if (position.hasKey("right")) (displayDensity * position.getInt("right")).roundToInt() else 0,
|
|
869
|
+
if (position.hasKey("bottom")) (displayDensity * position.getInt("bottom")).roundToInt() else 0,
|
|
835
870
|
)
|
|
836
871
|
setGravity(gravity)
|
|
837
872
|
setMargins(margins)
|
|
@@ -890,6 +925,39 @@ open class MLRNMapView(
|
|
|
890
925
|
updateUISettings()
|
|
891
926
|
}
|
|
892
927
|
|
|
928
|
+
fun setReactScaleBar(value: Boolean) {
|
|
929
|
+
scaleBarEnabled = value
|
|
930
|
+
updateScaleBar()
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
fun setReactScaleBarPosition(position: ReadableMap?) {
|
|
934
|
+
if (position == null) {
|
|
935
|
+
scaleBarMarginTop = null
|
|
936
|
+
scaleBarMarginLeft = null
|
|
937
|
+
} else {
|
|
938
|
+
scaleBarMarginTop = if (position.hasKey("top")) (displayDensity * position.getInt("top")) else 0f
|
|
939
|
+
scaleBarMarginLeft = if (position.hasKey("left")) (displayDensity * position.getInt("left")) else 0f
|
|
940
|
+
}
|
|
941
|
+
updateScaleBar()
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
private fun updateScaleBar() {
|
|
945
|
+
val map = mapLibreMap ?: return
|
|
946
|
+
|
|
947
|
+
if (scaleBarPlugin == null) {
|
|
948
|
+
scaleBarPlugin = ScaleBarPlugin(this, map)
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
val viewInsets = getSystemInsetsForView()
|
|
952
|
+
val options = ScaleBarOptions(context)
|
|
953
|
+
options.setMarginTop((scaleBarMarginTop ?: (8 * displayDensity)) + viewInsets.top)
|
|
954
|
+
options.setMarginLeft((scaleBarMarginLeft ?: (10 * displayDensity)) + viewInsets.left)
|
|
955
|
+
scaleBarPlugin!!.create(options)
|
|
956
|
+
scaleBarPlugin!!.isEnabled = scaleBarEnabled ?: false
|
|
957
|
+
|
|
958
|
+
reflow()
|
|
959
|
+
}
|
|
960
|
+
|
|
893
961
|
fun getCenter(): WritableArray {
|
|
894
962
|
val cameraPosition = mapLibreMap!!.cameraPosition
|
|
895
963
|
val center = cameraPosition.target!!
|
|
@@ -937,8 +1005,7 @@ open class MLRNMapView(
|
|
|
937
1005
|
layers: ReadableArray?,
|
|
938
1006
|
filter: Expression?,
|
|
939
1007
|
): WritableArray {
|
|
940
|
-
val
|
|
941
|
-
val screenPoint = PointF(point.x * density, point.y * density)
|
|
1008
|
+
val screenPoint = PointF(point.x * displayDensity, point.y * displayDensity)
|
|
942
1009
|
|
|
943
1010
|
val features =
|
|
944
1011
|
mapLibreMap!!.queryRenderedFeatures(
|
|
@@ -981,9 +1048,8 @@ open class MLRNMapView(
|
|
|
981
1048
|
|
|
982
1049
|
fun project(mapCoordinate: LatLng): WritableArray {
|
|
983
1050
|
val pointInView = mapLibreMap!!.projection.toScreenLocation(mapCoordinate)
|
|
984
|
-
|
|
985
|
-
pointInView.
|
|
986
|
-
pointInView.y /= density
|
|
1051
|
+
pointInView.x /= displayDensity
|
|
1052
|
+
pointInView.y /= displayDensity
|
|
987
1053
|
val payload: WritableArray = Arguments.createArray()
|
|
988
1054
|
|
|
989
1055
|
payload.pushDouble(pointInView.x.toDouble())
|
|
@@ -993,9 +1059,8 @@ open class MLRNMapView(
|
|
|
993
1059
|
}
|
|
994
1060
|
|
|
995
1061
|
fun unproject(pointInView: PointF): WritableArray {
|
|
996
|
-
|
|
997
|
-
pointInView.
|
|
998
|
-
pointInView.y *= density
|
|
1062
|
+
pointInView.x *= displayDensity
|
|
1063
|
+
pointInView.y *= displayDensity
|
|
999
1064
|
|
|
1000
1065
|
val latLng = mapLibreMap!!.projection.fromScreenLocation(pointInView)
|
|
1001
1066
|
|
|
@@ -1061,6 +1126,48 @@ open class MLRNMapView(
|
|
|
1061
1126
|
mapLibreMap!!.getStyle(onStyleLoaded)
|
|
1062
1127
|
}
|
|
1063
1128
|
|
|
1129
|
+
private fun getSystemInsetsForView(): Insets {
|
|
1130
|
+
val sysInsets =
|
|
1131
|
+
windowInsets?.getInsets(
|
|
1132
|
+
WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout(),
|
|
1133
|
+
)
|
|
1134
|
+
?: return Insets.NONE
|
|
1135
|
+
if (!isAttachedToWindow || width == 0 || height == 0) return Insets.NONE
|
|
1136
|
+
|
|
1137
|
+
val location = IntArray(2)
|
|
1138
|
+
getLocationOnScreen(location)
|
|
1139
|
+
val screenWidth = rootView.width
|
|
1140
|
+
val screenHeight = rootView.height
|
|
1141
|
+
|
|
1142
|
+
return Insets.of(
|
|
1143
|
+
if (location[0] <= 0) sysInsets.left else 0,
|
|
1144
|
+
if (location[1] <= 0) sysInsets.top else 0,
|
|
1145
|
+
if (location[0] + width >= screenWidth) sysInsets.right else 0,
|
|
1146
|
+
if (location[1] + height >= screenHeight) sysInsets.bottom else 0,
|
|
1147
|
+
)
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
private fun marginsWithInsets(
|
|
1151
|
+
margins: IntArray,
|
|
1152
|
+
gravity: Int,
|
|
1153
|
+
): IntArray {
|
|
1154
|
+
val viewInsets = getSystemInsetsForView()
|
|
1155
|
+
if (viewInsets == Insets.NONE) return margins
|
|
1156
|
+
|
|
1157
|
+
val absGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection)
|
|
1158
|
+
val isLeft = (absGravity and Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.LEFT
|
|
1159
|
+
val isRight = (absGravity and Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.RIGHT
|
|
1160
|
+
val isTop = (absGravity and Gravity.VERTICAL_GRAVITY_MASK) == Gravity.TOP
|
|
1161
|
+
val isBottom = (absGravity and Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM
|
|
1162
|
+
|
|
1163
|
+
return intArrayOf(
|
|
1164
|
+
margins[0] + if (isLeft) viewInsets.left else 0,
|
|
1165
|
+
margins[1] + if (isTop) viewInsets.top else 0,
|
|
1166
|
+
margins[2] + if (isRight) viewInsets.right else 0,
|
|
1167
|
+
margins[3] + if (isBottom) viewInsets.bottom else 0,
|
|
1168
|
+
)
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1064
1171
|
private fun updateUISettings() {
|
|
1065
1172
|
if (mapLibreMap == null) {
|
|
1066
1173
|
return
|
|
@@ -1108,19 +1215,13 @@ open class MLRNMapView(
|
|
|
1108
1215
|
uiSettings.attributionGravity = attributionGravity!!
|
|
1109
1216
|
}
|
|
1110
1217
|
|
|
1111
|
-
if (attributionMargin != null
|
|
1112
|
-
(
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
uiSettings.setAttributionMargins(
|
|
1119
|
-
attributionMargin!![0],
|
|
1120
|
-
attributionMargin!![1],
|
|
1121
|
-
attributionMargin!![2],
|
|
1122
|
-
attributionMargin!![3],
|
|
1123
|
-
)
|
|
1218
|
+
if (attributionMargin != null) {
|
|
1219
|
+
val adjusted = marginsWithInsets(attributionMargin!!, attributionGravity ?: uiSettings.attributionGravity)
|
|
1220
|
+
if (uiSettings.attributionMarginLeft != adjusted[0] || uiSettings.attributionMarginTop != adjusted[1] ||
|
|
1221
|
+
uiSettings.attributionMarginRight != adjusted[2] || uiSettings.attributionMarginBottom != adjusted[3]
|
|
1222
|
+
) {
|
|
1223
|
+
uiSettings.setAttributionMargins(adjusted[0], adjusted[1], adjusted[2], adjusted[3])
|
|
1224
|
+
}
|
|
1124
1225
|
}
|
|
1125
1226
|
|
|
1126
1227
|
if (logoEnabled != null && uiSettings.isLogoEnabled != logoEnabled) {
|
|
@@ -1131,19 +1232,13 @@ open class MLRNMapView(
|
|
|
1131
1232
|
uiSettings.logoGravity = logoGravity!!
|
|
1132
1233
|
}
|
|
1133
1234
|
|
|
1134
|
-
if (logoMargins != null
|
|
1135
|
-
(
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
uiSettings.setLogoMargins(
|
|
1142
|
-
logoMargins!![0],
|
|
1143
|
-
logoMargins!![1],
|
|
1144
|
-
logoMargins!![2],
|
|
1145
|
-
logoMargins!![3],
|
|
1146
|
-
)
|
|
1235
|
+
if (logoMargins != null) {
|
|
1236
|
+
val adjusted = marginsWithInsets(logoMargins!!, logoGravity ?: uiSettings.logoGravity)
|
|
1237
|
+
if (uiSettings.logoMarginLeft != adjusted[0] || uiSettings.logoMarginTop != adjusted[1] ||
|
|
1238
|
+
uiSettings.logoMarginRight != adjusted[2] || uiSettings.logoMarginBottom != adjusted[3]
|
|
1239
|
+
) {
|
|
1240
|
+
uiSettings.setLogoMargins(adjusted[0], adjusted[1], adjusted[2], adjusted[3])
|
|
1241
|
+
}
|
|
1147
1242
|
}
|
|
1148
1243
|
|
|
1149
1244
|
if (compassEnabled != null && uiSettings.isCompassEnabled != compassEnabled) {
|
|
@@ -1154,19 +1249,13 @@ open class MLRNMapView(
|
|
|
1154
1249
|
uiSettings.compassGravity = compassGravity!!
|
|
1155
1250
|
}
|
|
1156
1251
|
|
|
1157
|
-
if (compassMargins != null
|
|
1158
|
-
(
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
uiSettings.setCompassMargins(
|
|
1165
|
-
compassMargins!![0],
|
|
1166
|
-
compassMargins!![1],
|
|
1167
|
-
compassMargins!![2],
|
|
1168
|
-
compassMargins!![3],
|
|
1169
|
-
)
|
|
1252
|
+
if (compassMargins != null) {
|
|
1253
|
+
val adjusted = marginsWithInsets(compassMargins!!, compassGravity ?: uiSettings.compassGravity)
|
|
1254
|
+
if (uiSettings.compassMarginLeft != adjusted[0] || uiSettings.compassMarginTop != adjusted[1] ||
|
|
1255
|
+
uiSettings.compassMarginRight != adjusted[2] || uiSettings.compassMarginBottom != adjusted[3]
|
|
1256
|
+
) {
|
|
1257
|
+
uiSettings.setCompassMargins(adjusted[0], adjusted[1], adjusted[2], adjusted[3])
|
|
1258
|
+
}
|
|
1170
1259
|
}
|
|
1171
1260
|
if (compassHiddenFacingNorth != null) {
|
|
1172
1261
|
uiSettings.setCompassFadeFacingNorth(compassHiddenFacingNorth!!)
|
|
@@ -1348,7 +1437,7 @@ open class MLRNMapView(
|
|
|
1348
1437
|
}
|
|
1349
1438
|
|
|
1350
1439
|
private fun getPressableSourceWithHighestZIndex(sources: MutableList<MLRNPressableSource<*>>?): MLRNPressableSource<*>? {
|
|
1351
|
-
if (sources
|
|
1440
|
+
if (sources.isNullOrEmpty()) {
|
|
1352
1441
|
return null
|
|
1353
1442
|
}
|
|
1354
1443
|
|
|
@@ -1401,10 +1490,10 @@ open class MLRNMapView(
|
|
|
1401
1490
|
*/
|
|
1402
1491
|
private fun setUpImage(loadedStyle: Style) {
|
|
1403
1492
|
loadedStyle.addImage(
|
|
1404
|
-
|
|
1493
|
+
MLRNPointAnnotation.DEFAULT_MARKER,
|
|
1405
1494
|
BitmapFactory.decodeResource(
|
|
1406
1495
|
this.resources,
|
|
1407
|
-
R.drawable.
|
|
1496
|
+
R.drawable.default_marker,
|
|
1408
1497
|
),
|
|
1409
1498
|
)
|
|
1410
1499
|
}
|
package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.kt
CHANGED
|
@@ -78,6 +78,8 @@ open class MLRNMapViewManager(
|
|
|
78
78
|
mViews.remove(reactTag)
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
mapView.dispose()
|
|
82
|
+
|
|
81
83
|
super.onDropViewInstance(mapView)
|
|
82
84
|
}
|
|
83
85
|
|
|
@@ -213,6 +215,22 @@ open class MLRNMapViewManager(
|
|
|
213
215
|
mapView.setReactCompassHiddenFacingNorth(value)
|
|
214
216
|
}
|
|
215
217
|
|
|
218
|
+
@ReactProp(name = "scaleBar")
|
|
219
|
+
override fun setScaleBar(
|
|
220
|
+
mapView: MLRNMapView,
|
|
221
|
+
value: Boolean,
|
|
222
|
+
) {
|
|
223
|
+
mapView.setReactScaleBar(value)
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@ReactProp(name = "scaleBarPosition")
|
|
227
|
+
override fun setScaleBarPosition(
|
|
228
|
+
mapView: MLRNMapView,
|
|
229
|
+
value: ReadableMap?,
|
|
230
|
+
) {
|
|
231
|
+
mapView.setReactScaleBarPosition(value)
|
|
232
|
+
}
|
|
233
|
+
|
|
216
234
|
//endregion
|
|
217
235
|
|
|
218
236
|
private class MapShadowNode(
|
|
@@ -3,10 +3,12 @@ package org.maplibre.reactnative.modules
|
|
|
3
3
|
import android.util.Log
|
|
4
4
|
import com.facebook.react.bridge.Arguments
|
|
5
5
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
+
import com.facebook.react.module.annotations.ReactModule
|
|
6
7
|
import org.maplibre.android.log.Logger
|
|
7
8
|
import org.maplibre.android.log.LoggerDefinition
|
|
8
9
|
import org.maplibre.reactnative.NativeLogModuleSpec
|
|
9
10
|
|
|
11
|
+
@ReactModule(name = MLRNLogModule.NAME)
|
|
10
12
|
class MLRNLogModule(
|
|
11
13
|
reactContext: ReactApplicationContext,
|
|
12
14
|
) : NativeLogModuleSpec(
|