@rnmapbox/maps 10.3.0 → 10.3.2-rc.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/android/src/main/java/com/rnmapbox/rnmbx/RNMBXPackage.kt +4 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerView.kt +8 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewContent.kt +9 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewContentManager.kt +7 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewManager.kt +14 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCamera.kt +3 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCameraManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXVIewportManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImageManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXCustomLocationProviderManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXNativeUserLocationManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt +13 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt +6 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleFactory.kt +748 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleImportManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXBackgroundLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXCircleLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXFillExtrusionLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXFillLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXHeatmapLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXHillshadeLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXLineLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXModelLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXRasterLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXSkyLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXSymbolLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/light/RNMBXLightManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/model/RNMBXModelsManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/rain/RNMBXRain.kt +83 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/rain/RNMBXRainManager.kt +40 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/snow/RNMBXSnow.kt +66 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/snow/RNMBXSnowManager.kt +40 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXImageSourceManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterDemSourceManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSource.kt +1 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSource.kt +8 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSourceManager.kt +11 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXVectorSourceManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/terrain/RNMBXTerrainManager.kt +6 -0
- package/ios/RNMBX/RNMBXAtmosphereComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXBackgroundLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXBridgeManager.h +8 -0
- package/ios/RNMBX/RNMBXBridgeManager.m +16 -0
- package/ios/RNMBX/RNMBXCamera.swift +5 -2
- package/ios/RNMBX/RNMBXCircleLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXFillLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXHeatmapLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXHillshadeLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXImageModule.h +1 -0
- package/ios/RNMBX/RNMBXImageModule.mm +15 -2
- package/ios/RNMBX/RNMBXImageQueue.swift +9 -1
- package/ios/RNMBX/RNMBXImages.swift +4 -0
- package/ios/RNMBX/RNMBXImagesComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXLightComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXLineLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXMapView.swift +16 -0
- package/ios/RNMBX/RNMBXMapViewComponentView.mm +10 -0
- package/ios/RNMBX/RNMBXModelLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXRain.swift +92 -0
- package/ios/RNMBX/RNMBXRainComponentView.h +14 -0
- package/ios/RNMBX/RNMBXRainComponentView.mm +80 -0
- package/ios/RNMBX/RNMBXRasterLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXRasterParticleLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXShapeSource.swift +5 -0
- package/ios/RNMBX/RNMBXShapeSourceComponentView.mm +1 -0
- package/ios/RNMBX/RNMBXSkyLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXSnow.swift +76 -0
- package/ios/RNMBX/RNMBXSnowComponentView.h +14 -0
- package/ios/RNMBX/RNMBXSnowComponentView.mm +80 -0
- package/ios/RNMBX/RNMBXStyle.swift +477 -9
- package/ios/RNMBX/RNMBXStyleValue.swift +7 -1
- package/ios/RNMBX/RNMBXSymbolLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXTerrainComponentView.mm +2 -1
- package/lib/commonjs/plugin/build/withMapbox.d.ts +1 -1
- package/lib/commonjs/plugin/install.md +2 -2
- package/lib/commonjs/plugin/src/withMapbox.ts +2 -2
- package/lib/module/Mapbox.native.js +2 -1
- package/lib/module/Mapbox.native.js.map +1 -1
- package/lib/module/components/AbstractLayer.js.map +1 -1
- package/lib/module/components/Annotation.js.map +1 -1
- package/lib/module/components/Callout.js.map +1 -1
- package/lib/module/components/Image.js.map +1 -1
- package/lib/module/components/Images.js.map +1 -1
- package/lib/module/components/MapView.js.map +1 -1
- package/lib/module/components/MarkerView.js +6 -2
- package/lib/module/components/MarkerView.js.map +1 -1
- package/lib/module/components/PointAnnotation.js +11 -4
- package/lib/module/components/PointAnnotation.js.map +1 -1
- package/lib/module/components/Rain.js +19 -0
- package/lib/module/components/Rain.js.map +1 -0
- package/lib/module/components/ShapeSource.js +1 -0
- package/lib/module/components/ShapeSource.js.map +1 -1
- package/lib/module/components/Snow.js +19 -0
- package/lib/module/components/Snow.js.map +1 -0
- package/lib/module/components/SymbolLayer.js.map +1 -1
- package/lib/module/components/UserLocation.js.map +1 -1
- package/lib/module/components/VectorSource.js.map +1 -1
- package/lib/module/specs/RNMBXCameraNativeComponent.ts +3 -3
- package/lib/module/specs/RNMBXCustomLocationProviderNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXImageSourceNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXMapViewNativeComponent.ts +5 -4
- package/lib/module/specs/RNMBXMarkerViewNativeComponent.ts +2 -2
- package/lib/module/specs/RNMBXModelLayerNativeComponent.ts +2 -2
- package/lib/module/specs/RNMBXModelsNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXNativeUserLocationNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXRainNativeComponent.ts +13 -0
- package/lib/module/specs/RNMBXRasterArraySourceNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXRasterDemSourceNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXRasterSourceNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXShapeSourceNativeComponent.ts +4 -3
- package/lib/module/specs/RNMBXSnowNativeComponent.ts +13 -0
- package/lib/module/specs/RNMBXVectorSourceNativeComponent.ts +2 -2
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/styleMap.js +26 -0
- package/lib/module/utils/styleMap.js.map +1 -1
- package/lib/module/web/components/Camera.js.map +1 -1
- package/lib/typescript/jest.config.d.ts +3 -3
- package/lib/typescript/jest.config.d.ts.map +1 -1
- package/lib/typescript/plugin/src/withMapbox.d.ts +1 -1
- package/lib/typescript/plugin/src/withMapbox.d.ts.map +1 -1
- package/lib/typescript/scripts/autogenHelpers/examplesJsonSchema.d.ts +1 -1
- package/lib/typescript/scripts/autogenHelpers/examplesJsonSchema.d.ts.map +1 -1
- package/lib/typescript/scripts/autogenHelpers/generateCodeWithEjs.d.mts +71 -2
- package/lib/typescript/scripts/autogenHelpers/generateCodeWithEjs.d.mts.map +1 -1
- package/lib/typescript/scripts/autogenHelpers/globals.d.mts +1 -1
- package/lib/typescript/scripts/autogenHelpers/globals.d.mts.map +1 -1
- package/lib/typescript/src/Mapbox.native.d.ts +3 -1
- package/lib/typescript/src/Mapbox.native.d.ts.map +1 -1
- package/lib/typescript/src/components/AbstractLayer.d.ts +2 -2
- package/lib/typescript/src/components/AbstractLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/AbstractSource.d.ts +1 -1
- package/lib/typescript/src/components/AbstractSource.d.ts.map +1 -1
- package/lib/typescript/src/components/Annotation.d.ts +4 -4
- package/lib/typescript/src/components/Annotation.d.ts.map +1 -1
- package/lib/typescript/src/components/Callout.d.ts +5 -5
- package/lib/typescript/src/components/Callout.d.ts.map +1 -1
- package/lib/typescript/src/components/Camera.d.ts +1 -1
- package/lib/typescript/src/components/Camera.d.ts.map +1 -1
- package/lib/typescript/src/components/CameraGestureObserver.d.ts +1 -1
- package/lib/typescript/src/components/CameraGestureObserver.d.ts.map +1 -1
- package/lib/typescript/src/components/CircleLayer.d.ts +1 -1
- package/lib/typescript/src/components/CircleLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/CustomLocationProvider.d.ts +1 -1
- package/lib/typescript/src/components/CustomLocationProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/FillExtrusionLayer.d.ts +1 -1
- package/lib/typescript/src/components/FillExtrusionLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/HeadingIndicator.d.ts +1 -1
- package/lib/typescript/src/components/HeadingIndicator.d.ts.map +1 -1
- package/lib/typescript/src/components/HillshadeLayer.d.ts +1 -1
- package/lib/typescript/src/components/HillshadeLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/Image.d.ts +1 -1
- package/lib/typescript/src/components/Image.d.ts.map +1 -1
- package/lib/typescript/src/components/ImageSource.d.ts +1 -1
- package/lib/typescript/src/components/ImageSource.d.ts.map +1 -1
- package/lib/typescript/src/components/Images.d.ts +2 -2
- package/lib/typescript/src/components/Images.d.ts.map +1 -1
- package/lib/typescript/src/components/LineLayer.d.ts +1 -1
- package/lib/typescript/src/components/LineLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/MapView.d.ts +5 -1
- package/lib/typescript/src/components/MapView.d.ts.map +1 -1
- package/lib/typescript/src/components/MarkerView.d.ts +1 -1
- package/lib/typescript/src/components/MarkerView.d.ts.map +1 -1
- package/lib/typescript/src/components/ModelLayer.d.ts +1 -1
- package/lib/typescript/src/components/ModelLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/NativeBridgeComponent.d.ts +1 -1
- package/lib/typescript/src/components/NativeBridgeComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/PointAnnotation.d.ts +3 -3
- package/lib/typescript/src/components/PointAnnotation.d.ts.map +1 -1
- package/lib/typescript/src/components/Rain.d.ts +17 -0
- package/lib/typescript/src/components/Rain.d.ts.map +1 -0
- package/lib/typescript/src/components/RasterArraySource.d.ts +1 -1
- package/lib/typescript/src/components/RasterArraySource.d.ts.map +1 -1
- package/lib/typescript/src/components/RasterLayer.d.ts +1 -1
- package/lib/typescript/src/components/RasterLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/RasterParticleLayer.d.ts +1 -1
- package/lib/typescript/src/components/RasterParticleLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/RasterSource.d.ts +1 -1
- package/lib/typescript/src/components/RasterSource.d.ts.map +1 -1
- package/lib/typescript/src/components/ShapeSource.d.ts +8 -3
- package/lib/typescript/src/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/src/components/SkyLayer.d.ts +1 -1
- package/lib/typescript/src/components/SkyLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/Snow.d.ts +8 -0
- package/lib/typescript/src/components/Snow.d.ts.map +1 -0
- package/lib/typescript/src/components/SymbolLayer.d.ts +1 -1
- package/lib/typescript/src/components/SymbolLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/UserLocation.d.ts +1 -1
- package/lib/typescript/src/components/UserLocation.d.ts.map +1 -1
- package/lib/typescript/src/components/VectorSource.d.ts +2 -2
- package/lib/typescript/src/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/src/modules/location/locationManager.d.ts +1 -1
- package/lib/typescript/src/modules/location/locationManager.d.ts.map +1 -1
- package/lib/typescript/src/modules/offline/offlineManager.d.ts +1 -1
- package/lib/typescript/src/modules/offline/offlineManager.d.ts.map +1 -1
- package/lib/typescript/src/shapeAnimators/ChangeLineOffsetsShapeAnimator.d.ts +1 -1
- package/lib/typescript/src/shapeAnimators/ChangeLineOffsetsShapeAnimator.d.ts.map +1 -1
- package/lib/typescript/src/shapeAnimators/MovePointShapeAnimator.d.ts +2 -2
- package/lib/typescript/src/shapeAnimators/MovePointShapeAnimator.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXCameraNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXCameraNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXCustomLocationProviderNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXCustomLocationProviderNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXImageSourceNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXImageSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts +2 -1
- package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXMarkerViewNativeComponent.d.ts +2 -2
- package/lib/typescript/src/specs/RNMBXMarkerViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXModelLayerNativeComponent.d.ts +2 -2
- package/lib/typescript/src/specs/RNMBXModelLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXModelsNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXModelsNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXNativeUserLocationNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXNativeUserLocationNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXRainNativeComponent.d.ts +8 -0
- package/lib/typescript/src/specs/RNMBXRainNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXRasterArraySourceNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXRasterArraySourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXRasterDemSourceNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXRasterDemSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXRasterSourceNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXRasterSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts +2 -1
- package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXSnowNativeComponent.d.ts +8 -0
- package/lib/typescript/src/specs/RNMBXSnowNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +2 -2
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/Logger.d.ts +1 -1
- package/lib/typescript/src/utils/Logger.d.ts.map +1 -1
- package/lib/typescript/src/utils/MapboxStyles.d.ts +202 -2
- package/lib/typescript/src/utils/MapboxStyles.d.ts.map +1 -1
- package/lib/typescript/src/utils/StyleValue.d.ts +1 -1
- package/lib/typescript/src/utils/StyleValue.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +2 -2
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/nativeRef.d.ts +1 -1
- package/lib/typescript/src/utils/nativeRef.d.ts.map +1 -1
- package/lib/typescript/src/utils/styleMap.d.ts.map +1 -1
- package/lib/typescript/src/web/components/Camera.d.ts +3 -3
- package/lib/typescript/src/web/components/Camera.d.ts.map +1 -1
- package/package.json +12 -3
- package/plugin/build/withMapbox.d.ts +1 -1
- package/plugin/install.md +2 -2
- package/plugin/src/withMapbox.ts +2 -2
- package/src/Mapbox.native.ts +3 -1
- package/src/components/AbstractLayer.tsx +2 -2
- package/src/components/AbstractSource.tsx +1 -1
- package/src/components/Annotation.tsx +4 -4
- package/src/components/Callout.tsx +3 -3
- package/src/components/Camera.tsx +1 -1
- package/src/components/CameraGestureObserver.tsx +1 -1
- package/src/components/CircleLayer.tsx +1 -1
- package/src/components/CustomLocationProvider.tsx +1 -1
- package/src/components/FillExtrusionLayer.tsx +1 -1
- package/src/components/HeadingIndicator.tsx +1 -1
- package/src/components/HillshadeLayer.tsx +1 -1
- package/src/components/Image.tsx +1 -1
- package/src/components/ImageSource.tsx +1 -1
- package/src/components/Images.tsx +6 -3
- package/src/components/LineLayer.tsx +1 -1
- package/src/components/MapView.tsx +10 -5
- package/src/components/MarkerView.tsx +10 -3
- package/src/components/ModelLayer.tsx +1 -1
- package/src/components/NativeBridgeComponent.tsx +1 -1
- package/src/components/PointAnnotation.tsx +18 -5
- package/src/components/Rain.tsx +31 -0
- package/src/components/RasterArraySource.tsx +1 -1
- package/src/components/RasterLayer.tsx +1 -1
- package/src/components/RasterParticleLayer.tsx +1 -1
- package/src/components/RasterSource.tsx +1 -1
- package/src/components/ShapeSource.tsx +11 -4
- package/src/components/SkyLayer.tsx +1 -1
- package/src/components/Snow.tsx +22 -0
- package/src/components/SymbolLayer.tsx +1 -1
- package/src/components/UserLocation.tsx +2 -2
- package/src/components/VectorSource.tsx +2 -2
- package/src/modules/location/locationManager.ts +3 -3
- package/src/modules/offline/offlineManager.ts +1 -1
- package/src/shapeAnimators/ChangeLineOffsetsShapeAnimator.ts +1 -1
- package/src/shapeAnimators/MovePointShapeAnimator.ts +2 -2
- package/src/specs/RNMBXCameraNativeComponent.ts +3 -3
- package/src/specs/RNMBXCustomLocationProviderNativeComponent.ts +1 -1
- package/src/specs/RNMBXImageSourceNativeComponent.ts +1 -1
- package/src/specs/RNMBXMapViewNativeComponent.ts +5 -4
- package/src/specs/RNMBXMarkerViewNativeComponent.ts +2 -2
- package/src/specs/RNMBXModelLayerNativeComponent.ts +2 -2
- package/src/specs/RNMBXModelsNativeComponent.ts +1 -1
- package/src/specs/RNMBXNativeUserLocationNativeComponent.ts +1 -1
- package/src/specs/RNMBXRainNativeComponent.ts +13 -0
- package/src/specs/RNMBXRasterArraySourceNativeComponent.ts +1 -1
- package/src/specs/RNMBXRasterDemSourceNativeComponent.ts +1 -1
- package/src/specs/RNMBXRasterSourceNativeComponent.ts +1 -1
- package/src/specs/RNMBXShapeSourceNativeComponent.ts +4 -3
- package/src/specs/RNMBXSnowNativeComponent.ts +13 -0
- package/src/specs/RNMBXVectorSourceNativeComponent.ts +2 -2
- package/src/types/index.ts +2 -2
- package/src/utils/Logger.ts +1 -1
- package/src/utils/MapboxStyles.ts +222 -1
- package/src/utils/StyleValue.ts +1 -1
- package/src/utils/index.ts +3 -3
- package/src/utils/nativeRef.ts +1 -1
- package/src/utils/styleMap.ts +28 -0
- package/src/web/components/Camera.tsx +8 -4
|
@@ -26,6 +26,8 @@ import com.rnmapbox.rnmbx.components.mapview.NativeMapViewModule
|
|
|
26
26
|
import com.rnmapbox.rnmbx.components.mapview.RNMBXMapViewManager
|
|
27
27
|
import com.rnmapbox.rnmbx.components.styles.RNMBXStyleImportManager
|
|
28
28
|
import com.rnmapbox.rnmbx.components.styles.atmosphere.RNMBXAtmosphereManager
|
|
29
|
+
import com.rnmapbox.rnmbx.components.styles.snow.RNMBXSnowManager
|
|
30
|
+
import com.rnmapbox.rnmbx.components.styles.rain.RNMBXRainManager
|
|
29
31
|
import com.rnmapbox.rnmbx.components.styles.layers.RNMBXBackgroundLayerManager
|
|
30
32
|
import com.rnmapbox.rnmbx.components.styles.layers.RNMBXCircleLayerManager
|
|
31
33
|
import com.rnmapbox.rnmbx.components.styles.layers.RNMBXFillExtrusionLayerManager
|
|
@@ -169,6 +171,8 @@ class RNMBXPackage : TurboReactPackage() {
|
|
|
169
171
|
managers.add(RNMBXSkyLayerManager())
|
|
170
172
|
managers.add(RNMBXTerrainManager())
|
|
171
173
|
managers.add(RNMBXAtmosphereManager())
|
|
174
|
+
managers.add(RNMBXSnowManager())
|
|
175
|
+
managers.add(RNMBXRainManager())
|
|
172
176
|
managers.add(RNMBXBackgroundLayerManager())
|
|
173
177
|
managers.add(RNMBXLightManager())
|
|
174
178
|
managers.add(RNMBXModelLayerManager())
|
|
@@ -11,6 +11,7 @@ import com.mapbox.geojson.Point
|
|
|
11
11
|
import com.mapbox.maps.ViewAnnotationAnchor
|
|
12
12
|
import com.mapbox.maps.ViewAnnotationOptions
|
|
13
13
|
import com.mapbox.maps.viewannotation.viewAnnotationOptions
|
|
14
|
+
import com.facebook.react.uimanager.PointerEvents
|
|
14
15
|
import com.rnmapbox.rnmbx.components.AbstractMapFeature
|
|
15
16
|
import com.rnmapbox.rnmbx.components.RemovalReason
|
|
16
17
|
import com.rnmapbox.rnmbx.components.mapview.RNMBXMapView
|
|
@@ -33,6 +34,7 @@ class RNMBXMarkerView(context: Context?, private val mManager: RNMBXMarkerViewMa
|
|
|
33
34
|
private var mAllowOverlap = false
|
|
34
35
|
private var mAllowOverlapWithPuck = false
|
|
35
36
|
private var mIsSelected = false
|
|
37
|
+
private var mPointerEvents: PointerEvents = PointerEvents.AUTO
|
|
36
38
|
|
|
37
39
|
fun setCoordinate(point: Point?) {
|
|
38
40
|
mCoordinate = point
|
|
@@ -63,8 +65,14 @@ class RNMBXMarkerView(context: Context?, private val mManager: RNMBXMarkerViewMa
|
|
|
63
65
|
|
|
64
66
|
// region View methods
|
|
65
67
|
|
|
68
|
+
fun setContentPointerEvents(pointerEvents: PointerEvents) {
|
|
69
|
+
mPointerEvents = pointerEvents
|
|
70
|
+
(mView as? RNMBXMarkerViewContent)?.setExternalPointerEvents(pointerEvents)
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
override fun addView(childView: View, childPosition: Int) {
|
|
67
74
|
mView = childView
|
|
75
|
+
(childView as? RNMBXMarkerViewContent)?.setExternalPointerEvents(mPointerEvents)
|
|
68
76
|
// Note: Do not call this method on `super`. The view is added manually.
|
|
69
77
|
}
|
|
70
78
|
|
package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewContent.kt
CHANGED
|
@@ -6,12 +6,18 @@ import android.view.View.MeasureSpec
|
|
|
6
6
|
import android.view.ViewGroup
|
|
7
7
|
import com.facebook.react.bridge.Arguments
|
|
8
8
|
import com.facebook.react.bridge.ReactContext
|
|
9
|
+
import com.facebook.react.uimanager.PointerEvents
|
|
9
10
|
import com.facebook.react.uimanager.UIManagerHelper
|
|
10
11
|
import com.facebook.react.views.view.ReactViewGroup
|
|
11
12
|
import com.rnmapbox.rnmbx.components.camera.BaseEvent
|
|
12
13
|
|
|
13
14
|
class RNMBXMarkerViewContent(context: Context): ReactViewGroup(context) {
|
|
14
15
|
var inAdd: Boolean = false
|
|
16
|
+
private var externalPointerEvents: PointerEvents = PointerEvents.AUTO
|
|
17
|
+
|
|
18
|
+
fun setExternalPointerEvents(pointerEvents: PointerEvents) {
|
|
19
|
+
externalPointerEvents = pointerEvents
|
|
20
|
+
}
|
|
15
21
|
|
|
16
22
|
// Track last reported translation to avoid feedback loop:
|
|
17
23
|
// Mapbox sets setTranslationX(512) → we fire event → JS sets transform:[{translateX:512}]
|
|
@@ -29,6 +35,9 @@ class RNMBXMarkerViewContent(context: Context): ReactViewGroup(context) {
|
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
override fun dispatchTouchEvent(ev: MotionEvent): Boolean {
|
|
38
|
+
if (externalPointerEvents == PointerEvents.NONE) {
|
|
39
|
+
return false
|
|
40
|
+
}
|
|
32
41
|
// On ACTION_DOWN, tell the parent MapView not to intercept subsequent MOVE/UP
|
|
33
42
|
// events for pan/zoom recognition — that would send CANCEL to child Pressables
|
|
34
43
|
// and suppress onPress. Android resets the disallow flag on each new DOWN, so
|
|
@@ -2,13 +2,19 @@ package com.rnmapbox.rnmbx.components.annotation
|
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
4
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
5
|
+
import com.facebook.react.uimanager.ViewManagerDelegate
|
|
6
|
+
import com.facebook.react.viewmanagers.RNMBXMarkerViewContentManagerDelegate
|
|
5
7
|
import com.facebook.react.viewmanagers.RNMBXMarkerViewContentManagerInterface
|
|
6
8
|
import com.rnmapbox.rnmbx.components.AbstractEventEmitter
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
class RNMBXMarkerViewContentManager(reactApplicationContext: ReactApplicationContext) :
|
|
10
12
|
AbstractEventEmitter<RNMBXMarkerViewContent>(reactApplicationContext),
|
|
11
|
-
RNMBXMarkerViewContentManagerInterface<
|
|
13
|
+
RNMBXMarkerViewContentManagerInterface<RNMBXMarkerViewContent> {
|
|
14
|
+
|
|
15
|
+
private val delegate = RNMBXMarkerViewContentManagerDelegate<RNMBXMarkerViewContent, RNMBXMarkerViewContentManager>(this)
|
|
16
|
+
|
|
17
|
+
override fun getDelegate(): ViewManagerDelegate<RNMBXMarkerViewContent> = delegate
|
|
12
18
|
|
|
13
19
|
override fun getName(): String {
|
|
14
20
|
return REACT_CLASS
|
package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewManager.kt
CHANGED
|
@@ -8,8 +8,11 @@ import com.facebook.react.bridge.ReactApplicationContext
|
|
|
8
8
|
import com.rnmapbox.rnmbx.components.AbstractEventEmitter
|
|
9
9
|
import com.facebook.react.uimanager.annotations.ReactProp
|
|
10
10
|
import com.facebook.react.common.MapBuilder
|
|
11
|
+
import com.facebook.react.uimanager.PointerEvents
|
|
12
|
+
import com.facebook.react.uimanager.ReactStylesDiffMap
|
|
11
13
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
12
14
|
import com.facebook.react.uimanager.ViewManagerDelegate
|
|
15
|
+
import com.facebook.react.uimanager.ViewProps
|
|
13
16
|
import com.facebook.react.viewmanagers.RNMBXMarkerViewManagerDelegate
|
|
14
17
|
import com.facebook.react.viewmanagers.RNMBXMarkerViewManagerInterface
|
|
15
18
|
import com.mapbox.maps.ScreenCoordinate
|
|
@@ -72,6 +75,17 @@ class RNMBXMarkerViewManager(reactApplicationContext: ReactApplicationContext) :
|
|
|
72
75
|
markerView.setIsSelected(isSelected.asBoolean())
|
|
73
76
|
}
|
|
74
77
|
|
|
78
|
+
override fun updateProperties(viewToUpdate: RNMBXMarkerView, props: ReactStylesDiffMap) {
|
|
79
|
+
super.updateProperties(viewToUpdate, props)
|
|
80
|
+
// The codegen delegate does not forward the standard `pointerEvents` ViewProp — it falls
|
|
81
|
+
// to BaseViewManagerDelegate which ignores it. Intercept it here so the marker content
|
|
82
|
+
// view (which lives in a separate Mapbox view hierarchy) can honour it.
|
|
83
|
+
if (props.hasKey(ViewProps.POINTER_EVENTS)) {
|
|
84
|
+
val pe = PointerEvents.parsePointerEvents(props.getString(ViewProps.POINTER_EVENTS))
|
|
85
|
+
viewToUpdate.setContentPointerEvents(pe)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
75
89
|
override fun createViewInstance(reactContext: ThemedReactContext): RNMBXMarkerView {
|
|
76
90
|
return RNMBXMarkerView(reactContext, this)
|
|
77
91
|
}
|
|
@@ -182,10 +182,13 @@ class RNMBXCamera(private val mContext: Context, private val mManager: RNMBXCame
|
|
|
182
182
|
|
|
183
183
|
private fun updateMaxBounds(mapView: RNMBXMapView) {
|
|
184
184
|
val map = mapView.getMapboxMap()
|
|
185
|
+
val currentBounds = map.getBounds()
|
|
185
186
|
val builder = CameraBoundsOptions.Builder()
|
|
186
187
|
builder.bounds(mMaxBounds?.toBounds())
|
|
187
188
|
builder.minZoom(mMinZoomLevel ?: 0.0) // Passing null does not reset this value.
|
|
188
189
|
builder.maxZoom(mMaxZoomLevel ?: 25.0) // Passing null does not reset this value.
|
|
190
|
+
builder.minPitch(currentBounds.minPitch)
|
|
191
|
+
builder.maxPitch(currentBounds.maxPitch)
|
|
189
192
|
map.setBounds(builder.build())
|
|
190
193
|
mCameraStop?.let { updateCamera(it, mapView) }
|
|
191
194
|
}
|
|
@@ -15,11 +15,17 @@ import com.rnmapbox.rnmbx.utils.extensions.asDoubleOrNull
|
|
|
15
15
|
import com.rnmapbox.rnmbx.utils.extensions.asStringOrNull
|
|
16
16
|
import com.rnmapbox.rnmbx.rncompat.dynamic.*
|
|
17
17
|
import com.rnmapbox.rnmbx.utils.Logger
|
|
18
|
+
import com.facebook.react.uimanager.ViewManagerDelegate
|
|
19
|
+
import com.facebook.react.viewmanagers.RNMBXCameraManagerDelegate
|
|
18
20
|
|
|
19
21
|
class RNMBXCameraManager(private val mContext: ReactApplicationContext, val viewTagResolver: ViewTagResolver) :
|
|
20
22
|
AbstractEventEmitter<RNMBXCamera>(
|
|
21
23
|
mContext
|
|
22
24
|
), RNMBXCameraManagerInterface<RNMBXCamera> {
|
|
25
|
+
|
|
26
|
+
private val delegate = RNMBXCameraManagerDelegate<RNMBXCamera, RNMBXCameraManager>(this)
|
|
27
|
+
|
|
28
|
+
override fun getDelegate(): ViewManagerDelegate<RNMBXCamera> = delegate
|
|
23
29
|
override fun customEvents(): Map<String, String>? {
|
|
24
30
|
return HashMap()
|
|
25
31
|
}
|
|
@@ -13,11 +13,17 @@ import com.rnmapbox.rnmbx.components.AbstractEventEmitter
|
|
|
13
13
|
import com.rnmapbox.rnmbx.events.constants.EventKeys
|
|
14
14
|
import com.rnmapbox.rnmbx.events.constants.eventMapOf
|
|
15
15
|
import com.rnmapbox.rnmbx.utils.ViewTagResolver
|
|
16
|
+
import com.facebook.react.uimanager.ViewManagerDelegate
|
|
17
|
+
import com.facebook.react.viewmanagers.RNMBXViewportManagerDelegate
|
|
16
18
|
|
|
17
19
|
class RNMBXViewportManager(private val mContext: ReactApplicationContext, val viewTagResolver: ViewTagResolver) : AbstractEventEmitter<RNMBXViewport>(
|
|
18
20
|
mContext
|
|
19
21
|
), RNMBXViewportManagerInterface<RNMBXViewport> {
|
|
20
22
|
|
|
23
|
+
private val delegate = RNMBXViewportManagerDelegate<RNMBXViewport, RNMBXViewportManager>(this)
|
|
24
|
+
|
|
25
|
+
override fun getDelegate(): ViewManagerDelegate<RNMBXViewport> = delegate
|
|
26
|
+
|
|
21
27
|
override fun getName(): String {
|
|
22
28
|
return REACT_CLASS
|
|
23
29
|
}
|
|
@@ -9,10 +9,16 @@ import com.facebook.react.viewmanagers.RNMBXImageManagerInterface
|
|
|
9
9
|
import com.rnmapbox.rnmbx.components.AbstractEventEmitter
|
|
10
10
|
import com.rnmapbox.rnmbx.components.styles.sources.RNMBXShapeSource
|
|
11
11
|
import com.rnmapbox.rnmbx.utils.ViewTagResolver
|
|
12
|
+
import com.facebook.react.uimanager.ViewManagerDelegate
|
|
13
|
+
import com.facebook.react.viewmanagers.RNMBXImageManagerDelegate
|
|
12
14
|
|
|
13
15
|
class RNMBXImageManager(private val mContext: ReactApplicationContext, val viewTagResolver: ViewTagResolver) : AbstractEventEmitter<RNMBXImage>(
|
|
14
16
|
mContext
|
|
15
17
|
), RNMBXImageManagerInterface<RNMBXImage> {
|
|
18
|
+
|
|
19
|
+
private val delegate = RNMBXImageManagerDelegate<RNMBXImage, RNMBXImageManager>(this)
|
|
20
|
+
|
|
21
|
+
override fun getDelegate(): ViewManagerDelegate<RNMBXImage> = delegate
|
|
16
22
|
override fun getName(): String {
|
|
17
23
|
return "RNMBXImage"
|
|
18
24
|
}
|
|
@@ -20,11 +20,17 @@ import com.rnmapbox.rnmbx.utils.ResourceUtils
|
|
|
20
20
|
import com.rnmapbox.rnmbx.utils.extensions.forEach
|
|
21
21
|
import com.rnmapbox.rnmbx.utils.extensions.getIfDouble
|
|
22
22
|
import java.util.*
|
|
23
|
+
import com.facebook.react.uimanager.ViewManagerDelegate
|
|
24
|
+
import com.facebook.react.viewmanagers.RNMBXImagesManagerDelegate
|
|
23
25
|
|
|
24
26
|
class RNMBXImagesManager(private val mContext: ReactApplicationContext) :
|
|
25
27
|
AbstractEventEmitter<RNMBXImages>(
|
|
26
28
|
mContext
|
|
27
29
|
), RNMBXImagesManagerInterface<RNMBXImages> {
|
|
30
|
+
|
|
31
|
+
private val delegate = RNMBXImagesManagerDelegate<RNMBXImages, RNMBXImagesManager>(this)
|
|
32
|
+
|
|
33
|
+
override fun getDelegate(): ViewManagerDelegate<RNMBXImages> = delegate
|
|
28
34
|
override fun getName(): String {
|
|
29
35
|
return "RNMBXImages"
|
|
30
36
|
}
|
|
@@ -8,10 +8,16 @@ import com.facebook.react.uimanager.annotations.ReactProp
|
|
|
8
8
|
import com.facebook.react.viewmanagers.RNMBXCustomLocationProviderManagerInterface
|
|
9
9
|
import com.rnmapbox.rnmbx.rncompat.dynamic.*
|
|
10
10
|
import com.rnmapbox.rnmbx.utils.Logger
|
|
11
|
+
import com.facebook.react.uimanager.ViewManagerDelegate
|
|
12
|
+
import com.facebook.react.viewmanagers.RNMBXCustomLocationProviderManagerDelegate
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
class RNMBXCustomLocationProviderManager : ViewGroupManager<RNMBXCustomLocationProvider>(),
|
|
14
16
|
RNMBXCustomLocationProviderManagerInterface<RNMBXCustomLocationProvider> {
|
|
17
|
+
|
|
18
|
+
private val delegate = RNMBXCustomLocationProviderManagerDelegate<RNMBXCustomLocationProvider, RNMBXCustomLocationProviderManager>(this)
|
|
19
|
+
|
|
20
|
+
override fun getDelegate(): ViewManagerDelegate<RNMBXCustomLocationProvider> = delegate
|
|
15
21
|
override fun getName(): String {
|
|
16
22
|
return REACT_CLASS
|
|
17
23
|
}
|
|
@@ -20,9 +20,15 @@ import com.rnmapbox.rnmbx.utils.extensions.toJsonArray
|
|
|
20
20
|
import java.io.StringWriter
|
|
21
21
|
import javax.annotation.Nonnull
|
|
22
22
|
import com.rnmapbox.rnmbx.v11compat.location.*
|
|
23
|
+
import com.facebook.react.uimanager.ViewManagerDelegate
|
|
24
|
+
import com.facebook.react.viewmanagers.RNMBXNativeUserLocationManagerDelegate
|
|
23
25
|
|
|
24
26
|
class RNMBXNativeUserLocationManager : ViewGroupManager<RNMBXNativeUserLocation>(),
|
|
25
27
|
RNMBXNativeUserLocationManagerInterface<RNMBXNativeUserLocation> {
|
|
28
|
+
|
|
29
|
+
private val delegate = RNMBXNativeUserLocationManagerDelegate<RNMBXNativeUserLocation, RNMBXNativeUserLocationManager>(this)
|
|
30
|
+
|
|
31
|
+
override fun getDelegate(): ViewManagerDelegate<RNMBXNativeUserLocation> = delegate
|
|
26
32
|
@Nonnull
|
|
27
33
|
override fun getName(): String {
|
|
28
34
|
return REACT_CLASS
|
|
@@ -1357,6 +1357,7 @@ open class RNMBXMapView(private val mContext: Context, var mManager: RNMBXMapVie
|
|
|
1357
1357
|
}
|
|
1358
1358
|
|
|
1359
1359
|
var mScaleBarSettings = OrnamentSettings(enabled = false)
|
|
1360
|
+
var mScaleBarUnits: String? = null
|
|
1360
1361
|
|
|
1361
1362
|
fun setReactScaleBarEnabled(scaleBarEnabled: Boolean) {
|
|
1362
1363
|
mScaleBarSettings.enabled = scaleBarEnabled
|
|
@@ -1378,9 +1379,21 @@ open class RNMBXMapView(private val mContext: Context, var mManager: RNMBXMapVie
|
|
|
1378
1379
|
changes.add(Property.SCALEBAR)
|
|
1379
1380
|
}
|
|
1380
1381
|
|
|
1382
|
+
fun setReactScaleBarUnits(units: String?) {
|
|
1383
|
+
mScaleBarUnits = units
|
|
1384
|
+
changes.add(Property.SCALEBAR)
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1381
1387
|
private fun applyScaleBar() {
|
|
1382
1388
|
mapView.scalebar.updateSettings {
|
|
1383
1389
|
updateOrnament("scaleBar", mScaleBarSettings, this.toGenericOrnamentSettings())
|
|
1390
|
+
mScaleBarUnits?.let { units ->
|
|
1391
|
+
distanceUnits = when (units) {
|
|
1392
|
+
"imperial" -> com.mapbox.maps.plugin.DistanceUnits.IMPERIAL
|
|
1393
|
+
"nautical" -> com.mapbox.maps.plugin.DistanceUnits.NAUTICAL
|
|
1394
|
+
else -> com.mapbox.maps.plugin.DistanceUnits.METRIC
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1384
1397
|
}
|
|
1385
1398
|
workaroundToRelayoutChildOfMapView()
|
|
1386
1399
|
}
|
|
@@ -326,6 +326,11 @@ open class RNMBXMapViewManager(context: ReactApplicationContext, val viewTagReso
|
|
|
326
326
|
mapView.setReactScaleBarPosition(mapValue)
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
+
@ReactProp(name = "scaleBarUnits")
|
|
330
|
+
override fun setScaleBarUnits(mapView: RNMBXMapView, scaleBarUnits: Dynamic) {
|
|
331
|
+
mapView.setReactScaleBarUnits(scaleBarUnits.asString())
|
|
332
|
+
}
|
|
333
|
+
|
|
329
334
|
@ReactProp(name = "compassEnabled")
|
|
330
335
|
override fun setCompassEnabled(mapView: RNMBXMapView, compassEnabled: Dynamic) {
|
|
331
336
|
mapView.setReactCompassEnabled(compassEnabled.asBoolean())
|
|
@@ -428,7 +433,7 @@ open class RNMBXMapViewManager(context: ReactApplicationContext, val viewTagReso
|
|
|
428
433
|
* onDropViewInstance.
|
|
429
434
|
*/
|
|
430
435
|
private fun diposeNativeMapView() {
|
|
431
|
-
val mapView = mViewManager.getByReactTag(
|
|
436
|
+
val mapView = mViewManager.getByReactTag(getReactTag())
|
|
432
437
|
if (mapView != null) {
|
|
433
438
|
UiThreadUtil.runOnUiThread {
|
|
434
439
|
try {
|