@rnmapbox/maps 10.1.0-beta.11 → 10.1.0-beta.14
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 +19 -8
- package/android/src/main/java/com/rnmapbox/rnmbx/components/AbstractMapFeature.kt +2 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCamera.kt +66 -9
- package/android/src/main/java/com/rnmapbox/rnmbx/components/location/LocationComponentManager.kt +1 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/location/UserTrackingMode.kt +1 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/NativeMapViewModule.kt +1 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXAndroidTextureMapViewManager.kt +1 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt +22 -19
- package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt +52 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXSkyLayerManager.kt +0 -6
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXImageSource.kt +1 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSource.kt +21 -23
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSourceManager.kt +0 -46
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSourceModule.kt +61 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/{RCTSource.kt → RNMBXSource.kt} +8 -8
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSource.kt +1 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/events/FeatureClickEvent.java +4 -4
- package/android/src/main/java/com/rnmapbox/rnmbx/utils/ViewTagResolver.kt +6 -5
- package/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/ReadableMap.kt +35 -0
- package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Image.kt +1 -1
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXImageSourceManagerDelegate.java +41 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXImageSourceManagerInterface.java +20 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXMapViewManagerDelegate.java +3 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXMapViewManagerInterface.java +1 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXRasterDemSourceManagerDelegate.java +50 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXRasterDemSourceManagerInterface.java +23 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXRasterSourceManagerDelegate.java +56 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXRasterSourceManagerInterface.java +25 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXShapeSourceManagerDelegate.java +77 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXShapeSourceManagerInterface.java +32 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXVectorSourceManagerDelegate.java +59 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXVectorSourceManagerInterface.java +26 -0
- package/android/src/main/old-arch/com/rnmapbox/rnmbx/NativeRNMBXShapeSourceModuleSpec.java +48 -0
- package/ios/RNMBX/CustomHttpHeaders.swift +11 -0
- package/ios/RNMBX/RNMBXBackgroundLayerComponentView.mm +2 -0
- package/ios/RNMBX/RNMBXCircleLayerComponentView.mm +2 -0
- package/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.mm +3 -1
- package/ios/RNMBX/RNMBXFillLayerComponentView.mm +2 -0
- package/ios/RNMBX/RNMBXHeatmapLayerComponentView.mm +2 -0
- package/ios/RNMBX/RNMBXImageSource.swift +3 -3
- package/ios/RNMBX/RNMBXImageSourceComponentView.h +15 -0
- package/ios/RNMBX/RNMBXImageSourceComponentView.mm +100 -0
- package/ios/RNMBX/{RNMBXImageSourceManager.m → RNMBXImageSourceViewManager.m} +1 -1
- package/ios/RNMBX/{RNMBXImageSourceManager.swift → RNMBXImageSourceViewManager.swift} +2 -2
- package/ios/RNMBX/RNMBXInteractiveElement.swift +7 -7
- package/ios/RNMBX/RNMBXLayer.swift +1 -1
- package/ios/RNMBX/RNMBXLineLayerComponentView.mm +2 -0
- package/ios/RNMBX/RNMBXMapFeatureView.h +7 -0
- package/ios/RNMBX/RNMBXMapView.swift +56 -1
- package/ios/RNMBX/RNMBXMapViewManager.m +2 -0
- package/ios/RNMBX/RNMBXRasterDemSource.swift +6 -6
- package/ios/RNMBX/RNMBXRasterDemSourceComponentView.h +17 -0
- package/ios/RNMBX/RNMBXRasterDemSourceComponentView.mm +116 -0
- package/ios/RNMBX/{RNMBXRasterDemSourceManager.m → RNMBXRasterDemSourceViewManager.m} +1 -7
- package/ios/RNMBX/{RNMBXRasterDemSourceManager.swift → RNMBXRasterDemSourceViewManager.swift} +2 -2
- package/ios/RNMBX/RNMBXRasterLayerComponentView.mm +2 -0
- package/ios/RNMBX/RNMBXRasterSource.swift +8 -8
- package/ios/RNMBX/RNMBXRasterSourceComponentView.h +17 -0
- package/ios/RNMBX/RNMBXRasterSourceComponentView.mm +124 -0
- package/ios/RNMBX/{RNMBXRasterSourceManager.m → RNMBXRasterSourceViewManager.m} +1 -1
- package/ios/RNMBX/{RNMBXRasterSourceManager.swift → RNMBXRasterSourceViewManager.swift} +2 -2
- package/ios/RNMBX/RNMBXShapeSource.swift +11 -11
- package/ios/RNMBX/RNMBXShapeSourceComponentView.h +17 -0
- package/ios/RNMBX/RNMBXShapeSourceComponentView.mm +153 -0
- package/ios/RNMBX/RNMBXShapeSourceModule.h +18 -0
- package/ios/RNMBX/RNMBXShapeSourceModule.mm +87 -0
- package/ios/RNMBX/RNMBXShapeSourceViewManager.m +26 -0
- package/ios/RNMBX/{RNMBXShapeSourceManager.swift → RNMBXShapeSourceViewManager.swift} +12 -42
- package/ios/RNMBX/RNMBXSkyLayerComponentView.mm +2 -0
- package/ios/RNMBX/RNMBXSource.swift +36 -27
- package/ios/RNMBX/RNMBXSymbolLayerComponentView.mm +2 -0
- package/ios/RNMBX/RNMBXTileSource.swift +2 -2
- package/ios/RNMBX/RNMBXVectorSource.swift +6 -6
- package/ios/RNMBX/RNMBXVectorSourceComponentView.h +17 -0
- package/ios/RNMBX/RNMBXVectorSourceComponentView.mm +141 -0
- package/ios/RNMBX/{RNMBXVectorSourceManager.m → RNMBXVectorSourceViewManager.m} +1 -1
- package/ios/RNMBX/{RNMBXVectorSourceManager.swift → RNMBXVectorSourceViewManager.swift} +2 -2
- package/ios/install.md +2 -1
- package/lib/commonjs/components/AbstractLayer.js +1 -2
- package/lib/commonjs/components/AbstractLayer.js.map +1 -1
- package/lib/commonjs/components/Annotation.js +2 -3
- package/lib/commonjs/components/Annotation.js.map +1 -1
- package/lib/commonjs/components/Camera.js +7 -10
- package/lib/commonjs/components/Camera.js.map +1 -1
- package/lib/commonjs/components/ImageSource.js +10 -7
- package/lib/commonjs/components/ImageSource.js.map +1 -1
- package/lib/commonjs/components/Light.js +1 -2
- package/lib/commonjs/components/Light.js.map +1 -1
- package/lib/commonjs/components/MapView.js +2 -5
- package/lib/commonjs/components/MapView.js.map +1 -1
- package/lib/commonjs/components/RasterDemSource.js +11 -8
- package/lib/commonjs/components/RasterDemSource.js.map +1 -1
- package/lib/commonjs/components/RasterSource.js +11 -8
- package/lib/commonjs/components/RasterSource.js.map +1 -1
- package/lib/commonjs/components/ShapeSource.js +32 -54
- package/lib/commonjs/components/ShapeSource.js.map +1 -1
- package/lib/commonjs/components/SymbolLayer.js +1 -1
- package/lib/commonjs/components/SymbolLayer.js.map +1 -1
- package/lib/commonjs/components/VectorSource.js +26 -39
- package/lib/commonjs/components/VectorSource.js.map +1 -1
- package/lib/commonjs/specs/NativeRNMBXShapeSourceModule.js +10 -0
- package/lib/commonjs/specs/NativeRNMBXShapeSourceModule.js.map +1 -0
- package/lib/commonjs/specs/RNMBXBackgroundLayerNativeComponent.js +1 -0
- package/lib/commonjs/specs/RNMBXBackgroundLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXCameraNativeComponent.js +1 -0
- package/lib/commonjs/specs/RNMBXCameraNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXCircleLayerNativeComponent.js +1 -0
- package/lib/commonjs/specs/RNMBXCircleLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXFillExtrusionLayerNativeComponent.js +1 -0
- package/lib/commonjs/specs/RNMBXFillExtrusionLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXFillLayerNativeComponent.js +1 -0
- package/lib/commonjs/specs/RNMBXFillLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXHeatmapLayerNativeComponent.js +1 -0
- package/lib/commonjs/specs/RNMBXHeatmapLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXImageSourceNativeComponent.js +10 -0
- package/lib/commonjs/specs/RNMBXImageSourceNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/RNMBXLineLayerNativeComponent.js +1 -0
- package/lib/commonjs/specs/RNMBXLineLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXMapViewNativeComponent.js +1 -0
- package/lib/commonjs/specs/RNMBXMapViewNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXRasterDemSourceNativeComponent.js +10 -0
- package/lib/commonjs/specs/RNMBXRasterDemSourceNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/RNMBXRasterLayerNativeComponent.js +1 -0
- package/lib/commonjs/specs/RNMBXRasterLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXRasterSourceNativeComponent.js +10 -0
- package/lib/commonjs/specs/RNMBXRasterSourceNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/RNMBXShapeSourceNativeComponent.js +10 -0
- package/lib/commonjs/specs/RNMBXShapeSourceNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/RNMBXSkyLayerNativeComponent.js +1 -0
- package/lib/commonjs/specs/RNMBXSkyLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXSymbolLayerNativeComponent.js +1 -0
- package/lib/commonjs/specs/RNMBXSymbolLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXVectorSourceNativeComponent.js +10 -0
- package/lib/commonjs/specs/RNMBXVectorSourceNativeComponent.js.map +1 -0
- package/lib/commonjs/utils/Logger.js +1 -2
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/module/components/AbstractLayer.js +1 -2
- package/lib/module/components/AbstractLayer.js.map +1 -1
- package/lib/module/components/Annotation.js +2 -3
- package/lib/module/components/Annotation.js.map +1 -1
- package/lib/module/components/Camera.js +7 -10
- package/lib/module/components/Camera.js.map +1 -1
- package/lib/module/components/ImageSource.js +10 -7
- package/lib/module/components/ImageSource.js.map +1 -1
- package/lib/module/components/Light.js +1 -2
- package/lib/module/components/Light.js.map +1 -1
- package/lib/module/components/MapView.js +2 -5
- package/lib/module/components/MapView.js.map +1 -1
- package/lib/module/components/RasterDemSource.js +11 -8
- package/lib/module/components/RasterDemSource.js.map +1 -1
- package/lib/module/components/RasterSource.js +11 -8
- package/lib/module/components/RasterSource.js.map +1 -1
- package/lib/module/components/ShapeSource.js +33 -55
- package/lib/module/components/ShapeSource.js.map +1 -1
- package/lib/module/components/SymbolLayer.js +1 -1
- package/lib/module/components/SymbolLayer.js.map +1 -1
- package/lib/module/components/VectorSource.js +28 -41
- package/lib/module/components/VectorSource.js.map +1 -1
- package/lib/module/specs/NativeRNMBXShapeSourceModule.js +5 -0
- package/lib/module/specs/NativeRNMBXShapeSourceModule.js.map +1 -0
- package/lib/module/specs/RNMBXBackgroundLayerNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXBackgroundLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXCameraNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXCameraNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXCircleLayerNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXCircleLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXFillExtrusionLayerNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXFillExtrusionLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXFillLayerNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXFillLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXHeatmapLayerNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXHeatmapLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXImageSourceNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXImageSourceNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXLineLayerNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXLineLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXMapViewNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXMapViewNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXRasterDemSourceNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXRasterDemSourceNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXRasterLayerNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXRasterLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXRasterSourceNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXRasterSourceNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXShapeSourceNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXShapeSourceNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXSkyLayerNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXSkyLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXSymbolLayerNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXSymbolLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXVectorSourceNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXVectorSourceNativeComponent.js.map +1 -0
- package/lib/module/utils/Logger.js +1 -2
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/typescript/jest.config.d.ts +4 -0
- package/lib/typescript/jest.config.d.ts.map +1 -0
- package/lib/typescript/src/Mapbox.d.ts.map +1 -0
- package/lib/typescript/src/RNMBXModule.d.ts.map +1 -0
- package/lib/typescript/src/components/AbstractLayer.d.ts.map +1 -0
- package/lib/typescript/src/components/AbstractSource.d.ts.map +1 -0
- package/lib/typescript/src/components/Annotation.d.ts.map +1 -0
- package/lib/typescript/src/components/Atmosphere.d.ts.map +1 -0
- package/lib/typescript/src/components/BackgroundLayer.d.ts.map +1 -0
- package/lib/typescript/src/components/Callout.d.ts.map +1 -0
- package/lib/typescript/src/components/Camera.d.ts.map +1 -0
- package/lib/typescript/src/components/CircleLayer.d.ts.map +1 -0
- package/lib/typescript/src/components/FillExtrusionLayer.d.ts.map +1 -0
- package/lib/typescript/src/components/FillLayer.d.ts.map +1 -0
- package/lib/typescript/src/components/HeadingIndicator.d.ts.map +1 -0
- package/lib/typescript/src/components/HeatmapLayer.d.ts.map +1 -0
- package/lib/typescript/src/components/Image.d.ts.map +1 -0
- package/lib/typescript/src/components/ImageSource.d.ts.map +1 -0
- package/lib/typescript/src/components/Images.d.ts.map +1 -0
- package/lib/typescript/src/components/Light.d.ts.map +1 -0
- package/lib/typescript/src/components/LineLayer.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/MapView.d.ts +64 -0
- package/lib/typescript/src/components/MapView.d.ts.map +1 -0
- package/lib/typescript/src/components/MarkerView.d.ts.map +1 -0
- package/lib/typescript/src/components/NativeBridgeComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/NativeUserLocation.d.ts.map +1 -0
- package/lib/typescript/src/components/PointAnnotation.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/RasterDemSource.d.ts +0 -1
- package/lib/typescript/src/components/RasterDemSource.d.ts.map +1 -0
- package/lib/typescript/src/components/RasterLayer.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/RasterSource.d.ts +0 -1
- package/lib/typescript/src/components/RasterSource.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/ShapeSource.d.ts +2 -58
- package/lib/typescript/src/components/ShapeSource.d.ts.map +1 -0
- package/lib/typescript/src/components/SkyLayer.d.ts.map +1 -0
- package/lib/typescript/src/components/Style.d.ts.map +1 -0
- package/lib/typescript/src/components/StyleImport.d.ts.map +1 -0
- package/lib/typescript/src/components/SymbolLayer.d.ts.map +1 -0
- package/lib/typescript/src/components/Terrain.d.ts.map +1 -0
- package/lib/typescript/src/components/UserLocation.d.ts.map +1 -0
- package/lib/typescript/src/components/VectorSource.d.ts +88 -0
- package/lib/typescript/src/components/VectorSource.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/modules/location/locationManager.d.ts.map +1 -0
- package/lib/typescript/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -0
- package/lib/typescript/src/modules/offline/OfflinePack.d.ts.map +1 -0
- package/lib/typescript/src/modules/offline/offlineManager.d.ts.map +1 -0
- package/lib/typescript/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -0
- package/lib/typescript/src/modules/snapshot/snapshotManager.d.ts.map +1 -0
- package/lib/typescript/src/requestAndroidLocationPermissions.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeMapViewModule.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeRNMBXShapeSourceModule.d.ts +11 -0
- package/lib/typescript/src/specs/NativeRNMBXShapeSourceModule.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXAndroidTextureMapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXAtmosphereNativeComponent.d.ts.map +1 -0
- package/lib/typescript/{specs → src/specs}/RNMBXBackgroundLayerNativeComponent.d.ts +7 -6
- package/lib/typescript/src/specs/RNMBXBackgroundLayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/{specs → src/specs}/RNMBXCameraNativeComponent.d.ts +12 -11
- package/lib/typescript/src/specs/RNMBXCameraNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXCircleLayerNativeComponent.d.ts +20 -0
- package/lib/typescript/src/specs/RNMBXCircleLayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/{specs → src/specs}/RNMBXFillExtrusionLayerNativeComponent.d.ts +10 -9
- package/lib/typescript/src/specs/RNMBXFillExtrusionLayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXFillLayerNativeComponent.d.ts +20 -0
- package/lib/typescript/src/specs/RNMBXFillLayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXHeatmapLayerNativeComponent.d.ts +20 -0
- package/lib/typescript/src/specs/RNMBXHeatmapLayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXImageSourceNativeComponent.d.ts +11 -0
- package/lib/typescript/src/specs/RNMBXImageSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXLineLayerNativeComponent.d.ts +20 -0
- package/lib/typescript/src/specs/RNMBXLineLayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/{specs → src/specs}/RNMBXMapViewNativeComponent.d.ts +23 -15
- package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXRasterDemSourceNativeComponent.d.ts +15 -0
- package/lib/typescript/src/specs/RNMBXRasterDemSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXRasterLayerNativeComponent.d.ts +20 -0
- package/lib/typescript/src/specs/RNMBXRasterLayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXRasterSourceNativeComponent.d.ts +17 -0
- package/lib/typescript/src/specs/RNMBXRasterSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts +29 -0
- package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXSkyLayerNativeComponent.d.ts +19 -0
- package/lib/typescript/src/specs/RNMBXSkyLayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXStyleImportNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXSymbolLayerNativeComponent.d.ts +20 -0
- package/lib/typescript/src/specs/RNMBXSymbolLayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts +23 -0
- package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts.map +1 -0
- package/lib/typescript/{specs → src/specs}/codegenUtils.d.ts +1 -0
- package/lib/typescript/src/specs/codegenUtils.d.ts.map +1 -0
- package/lib/typescript/src/types/BaseProps.d.ts.map +1 -0
- package/lib/typescript/src/types/OnPressEvent.d.ts.map +1 -0
- package/lib/typescript/src/types/Position.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/lib/typescript/src/utils/BridgeValue.d.ts.map +1 -0
- package/lib/typescript/src/utils/Logger.d.ts.map +1 -0
- package/lib/typescript/src/utils/StyleValue.d.ts.map +1 -0
- package/lib/typescript/src/utils/animated/Animated.d.ts.map +1 -0
- package/lib/typescript/src/utils/checkRequiredProps.d.ts.map +1 -0
- package/lib/typescript/src/utils/deprecation.d.ts.map +1 -0
- package/lib/typescript/src/utils/filterUtils.d.ts.map +1 -0
- package/lib/typescript/src/utils/geoUtils.d.ts.map +1 -0
- package/lib/typescript/src/utils/getAnnotationsLayerID.d.ts.map +1 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/utils/nativeRef.d.ts.map +1 -0
- package/lib/typescript/src/utils/styleMap.d.ts.map +1 -0
- package/lib/typescript/src/web/MapContext.d.ts.map +1 -0
- package/lib/typescript/src/web/components/Camera.d.ts.map +1 -0
- package/lib/typescript/src/web/components/MapView.d.ts.map +1 -0
- package/lib/typescript/src/web/utils/Logger.d.ts.map +1 -0
- package/package.json +10 -25
- package/plugin/build/withMapbox.d.ts +5 -4
- package/plugin/build/withMapbox.js +46 -19
- package/plugin/install.md +20 -0
- package/plugin/src/withMapbox.ts +79 -21
- package/rnmapbox-maps.podspec +3 -0
- package/setup-jest.js +25 -4
- package/src/components/ImageSource.tsx +4 -6
- package/src/components/MapView.tsx +66 -1
- package/src/components/RasterDemSource.tsx +5 -8
- package/src/components/RasterSource.tsx +5 -8
- package/src/components/ShapeSource.tsx +39 -86
- package/src/components/VectorSource.tsx +20 -44
- package/src/specs/NativeRNMBXShapeSourceModule.ts +23 -0
- package/src/specs/RNMBXBackgroundLayerNativeComponent.ts +9 -6
- package/src/specs/RNMBXCameraNativeComponent.ts +14 -11
- package/src/specs/RNMBXCircleLayerNativeComponent.ts +11 -8
- package/src/specs/RNMBXFillExtrusionLayerNativeComponent.ts +12 -9
- package/src/specs/RNMBXFillLayerNativeComponent.ts +11 -8
- package/src/specs/RNMBXHeatmapLayerNativeComponent.ts +12 -9
- package/src/specs/RNMBXImageSourceNativeComponent.ts +15 -0
- package/src/specs/RNMBXLineLayerNativeComponent.ts +11 -8
- package/src/specs/RNMBXMapViewNativeComponent.ts +27 -15
- package/src/specs/RNMBXRasterDemSourceNativeComponent.ts +19 -0
- package/src/specs/RNMBXRasterLayerNativeComponent.ts +12 -9
- package/src/specs/RNMBXRasterSourceNativeComponent.ts +21 -0
- package/src/specs/RNMBXShapeSourceNativeComponent.ts +35 -0
- package/src/specs/RNMBXSkyLayerNativeComponent.ts +12 -9
- package/src/specs/RNMBXSymbolLayerNativeComponent.ts +12 -9
- package/src/specs/RNMBXVectorSourceNativeComponent.ts +28 -0
- package/src/specs/codegenUtils.ts +5 -0
- package/ios/RNMBX/RNMBXShapeSourceManager.m +0 -45
- package/lib/typescript/Mapbox.d.ts.map +0 -1
- package/lib/typescript/RNMBXModule.d.ts.map +0 -1
- package/lib/typescript/components/AbstractLayer.d.ts.map +0 -1
- package/lib/typescript/components/AbstractSource.d.ts.map +0 -1
- package/lib/typescript/components/Annotation.d.ts.map +0 -1
- package/lib/typescript/components/Atmosphere.d.ts.map +0 -1
- package/lib/typescript/components/BackgroundLayer.d.ts.map +0 -1
- package/lib/typescript/components/Callout.d.ts.map +0 -1
- package/lib/typescript/components/Camera.d.ts.map +0 -1
- package/lib/typescript/components/CircleLayer.d.ts.map +0 -1
- package/lib/typescript/components/FillExtrusionLayer.d.ts.map +0 -1
- package/lib/typescript/components/FillLayer.d.ts.map +0 -1
- package/lib/typescript/components/HeadingIndicator.d.ts.map +0 -1
- package/lib/typescript/components/HeatmapLayer.d.ts.map +0 -1
- package/lib/typescript/components/Image.d.ts.map +0 -1
- package/lib/typescript/components/ImageSource.d.ts.map +0 -1
- package/lib/typescript/components/Images.d.ts.map +0 -1
- package/lib/typescript/components/Light.d.ts.map +0 -1
- package/lib/typescript/components/LineLayer.d.ts.map +0 -1
- package/lib/typescript/components/MapView.d.ts.map +0 -1
- package/lib/typescript/components/MarkerView.d.ts.map +0 -1
- package/lib/typescript/components/NativeBridgeComponent.d.ts.map +0 -1
- package/lib/typescript/components/NativeUserLocation.d.ts.map +0 -1
- package/lib/typescript/components/PointAnnotation.d.ts.map +0 -1
- package/lib/typescript/components/RasterDemSource.d.ts.map +0 -1
- package/lib/typescript/components/RasterLayer.d.ts.map +0 -1
- package/lib/typescript/components/RasterSource.d.ts.map +0 -1
- package/lib/typescript/components/ShapeSource.d.ts.map +0 -1
- package/lib/typescript/components/SkyLayer.d.ts.map +0 -1
- package/lib/typescript/components/Style.d.ts.map +0 -1
- package/lib/typescript/components/StyleImport.d.ts.map +0 -1
- package/lib/typescript/components/SymbolLayer.d.ts.map +0 -1
- package/lib/typescript/components/Terrain.d.ts.map +0 -1
- package/lib/typescript/components/UserLocation.d.ts.map +0 -1
- package/lib/typescript/components/VectorSource.d.ts +0 -149
- package/lib/typescript/components/VectorSource.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/modules/location/locationManager.d.ts.map +0 -1
- package/lib/typescript/modules/offline/OfflineCreatePackOptions.d.ts.map +0 -1
- package/lib/typescript/modules/offline/OfflinePack.d.ts.map +0 -1
- package/lib/typescript/modules/offline/offlineManager.d.ts.map +0 -1
- package/lib/typescript/modules/snapshot/SnapshotOptions.d.ts.map +0 -1
- package/lib/typescript/modules/snapshot/snapshotManager.d.ts.map +0 -1
- package/lib/typescript/requestAndroidLocationPermissions.d.ts.map +0 -1
- package/lib/typescript/specs/NativeMapViewModule.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXAndroidTextureMapViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXAtmosphereNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXBackgroundLayerNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXCameraNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXCircleLayerNativeComponent.d.ts +0 -19
- package/lib/typescript/specs/RNMBXCircleLayerNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXFillExtrusionLayerNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXFillLayerNativeComponent.d.ts +0 -19
- package/lib/typescript/specs/RNMBXFillLayerNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXHeatmapLayerNativeComponent.d.ts +0 -19
- package/lib/typescript/specs/RNMBXHeatmapLayerNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXLineLayerNativeComponent.d.ts +0 -19
- package/lib/typescript/specs/RNMBXLineLayerNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXMapViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXRasterLayerNativeComponent.d.ts +0 -19
- package/lib/typescript/specs/RNMBXRasterLayerNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXSkyLayerNativeComponent.d.ts +0 -18
- package/lib/typescript/specs/RNMBXSkyLayerNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXStyleImportNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/RNMBXSymbolLayerNativeComponent.d.ts +0 -19
- package/lib/typescript/specs/RNMBXSymbolLayerNativeComponent.d.ts.map +0 -1
- package/lib/typescript/specs/codegenUtils.d.ts.map +0 -1
- package/lib/typescript/types/BaseProps.d.ts.map +0 -1
- package/lib/typescript/types/OnPressEvent.d.ts.map +0 -1
- package/lib/typescript/types/Position.d.ts.map +0 -1
- package/lib/typescript/types/index.d.ts.map +0 -1
- package/lib/typescript/utils/BridgeValue.d.ts.map +0 -1
- package/lib/typescript/utils/Logger.d.ts.map +0 -1
- package/lib/typescript/utils/StyleValue.d.ts.map +0 -1
- package/lib/typescript/utils/animated/Animated.d.ts.map +0 -1
- package/lib/typescript/utils/checkRequiredProps.d.ts.map +0 -1
- package/lib/typescript/utils/deprecation.d.ts.map +0 -1
- package/lib/typescript/utils/filterUtils.d.ts.map +0 -1
- package/lib/typescript/utils/geoUtils.d.ts.map +0 -1
- package/lib/typescript/utils/getAnnotationsLayerID.d.ts.map +0 -1
- package/lib/typescript/utils/index.d.ts.map +0 -1
- package/lib/typescript/utils/nativeRef.d.ts.map +0 -1
- package/lib/typescript/utils/styleMap.d.ts.map +0 -1
- package/lib/typescript/web/MapContext.d.ts.map +0 -1
- package/lib/typescript/web/components/Camera.d.ts.map +0 -1
- package/lib/typescript/web/components/MapView.d.ts.map +0 -1
- package/lib/typescript/web/utils/Logger.d.ts.map +0 -1
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Annotation.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Event.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Feature.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/HttpInterceptor.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Image.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Light.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Location.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/MapboxMap.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/OfflineManager.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/OrnamentSettings.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/ResourceOption.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Snapshot.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/style.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Annotation.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Event.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Feature.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/HttpInterceptor.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Light.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Location.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/MapboxMap.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/OfflineManager.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/OrnamentSettings.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/ResourceOption.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Snapshot.kt +0 -0
- /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/style.kt +0 -0
- /package/lib/typescript/{Mapbox.d.ts → src/Mapbox.d.ts} +0 -0
- /package/lib/typescript/{RNMBXModule.d.ts → src/RNMBXModule.d.ts} +0 -0
- /package/lib/typescript/{components → src/components}/AbstractLayer.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/AbstractSource.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/Annotation.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/Atmosphere.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/BackgroundLayer.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/Callout.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/Camera.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/CircleLayer.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/FillExtrusionLayer.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/FillLayer.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/HeadingIndicator.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/HeatmapLayer.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/Image.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/ImageSource.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/Images.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/Light.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/LineLayer.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/MarkerView.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/NativeBridgeComponent.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/NativeUserLocation.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/PointAnnotation.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/RasterLayer.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/SkyLayer.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/Style.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/StyleImport.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/SymbolLayer.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/Terrain.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UserLocation.d.ts +0 -0
- /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
- /package/lib/typescript/{modules → src/modules}/location/locationManager.d.ts +0 -0
- /package/lib/typescript/{modules → src/modules}/offline/OfflineCreatePackOptions.d.ts +0 -0
- /package/lib/typescript/{modules → src/modules}/offline/OfflinePack.d.ts +0 -0
- /package/lib/typescript/{modules → src/modules}/offline/offlineManager.d.ts +0 -0
- /package/lib/typescript/{modules → src/modules}/snapshot/SnapshotOptions.d.ts +0 -0
- /package/lib/typescript/{modules → src/modules}/snapshot/snapshotManager.d.ts +0 -0
- /package/lib/typescript/{requestAndroidLocationPermissions.d.ts → src/requestAndroidLocationPermissions.d.ts} +0 -0
- /package/lib/typescript/{specs → src/specs}/NativeMapViewModule.d.ts +0 -0
- /package/lib/typescript/{specs → src/specs}/RNMBXAndroidTextureMapViewNativeComponent.d.ts +0 -0
- /package/lib/typescript/{specs → src/specs}/RNMBXAtmosphereNativeComponent.d.ts +0 -0
- /package/lib/typescript/{specs → src/specs}/RNMBXStyleImportNativeComponent.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/BaseProps.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/OnPressEvent.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/Position.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/index.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/BridgeValue.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/Logger.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/StyleValue.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/animated/Animated.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/checkRequiredProps.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/deprecation.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/filterUtils.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/geoUtils.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/getAnnotationsLayerID.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/index.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/nativeRef.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/styleMap.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/MapContext.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/components/Camera.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/components/MapView.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/utils/Logger.d.ts +0 -0
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
NativeMethods,
|
|
4
4
|
NativeModules,
|
|
5
5
|
NativeSyntheticEvent,
|
|
6
|
-
|
|
6
|
+
findNodeHandle,
|
|
7
7
|
} from 'react-native';
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import RNMBXShapeSourceNativeComponent from '../specs/RNMBXShapeSourceNativeComponent';
|
|
10
|
+
import NativeRNMBXShapeSourceModule from '../specs/NativeRNMBXShapeSourceModule';
|
|
10
11
|
import {
|
|
11
12
|
toJSONString,
|
|
12
13
|
cloneReactChildrenWithProps,
|
|
@@ -17,7 +18,6 @@ import { copyPropertiesAsDeprecated } from '../utils/deprecation';
|
|
|
17
18
|
import { OnPressEvent } from '../types/OnPressEvent';
|
|
18
19
|
|
|
19
20
|
import AbstractSource from './AbstractSource';
|
|
20
|
-
import NativeBridgeComponent from './NativeBridgeComponent';
|
|
21
21
|
|
|
22
22
|
const MapboxGL = NativeModules.RNMBXModule;
|
|
23
23
|
|
|
@@ -148,10 +148,7 @@ export type Props = {
|
|
|
148
148
|
* ShapeSource is a map content source that supplies vector shapes to be shown on the map.
|
|
149
149
|
* The shape may be an url or a GeoJSON object
|
|
150
150
|
*/
|
|
151
|
-
export class ShapeSource extends
|
|
152
|
-
AbstractSource<Props, NativeProps>,
|
|
153
|
-
NATIVE_MODULE_NAME,
|
|
154
|
-
) {
|
|
151
|
+
export class ShapeSource extends AbstractSource<Props, NativeProps> {
|
|
155
152
|
static NATIVE_ASSETS_KEY = 'assets';
|
|
156
153
|
|
|
157
154
|
static defaultProps = {
|
|
@@ -166,31 +163,6 @@ export class ShapeSource extends NativeBridgeComponent(
|
|
|
166
163
|
nativeRef: React.Component<NativeProps> & Readonly<NativeMethods>,
|
|
167
164
|
) {
|
|
168
165
|
this.setNativeRef(nativeRef);
|
|
169
|
-
super._runPendingNativeCommands(nativeRef);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Returns all features from the source that match the query parameters whether the feature is currently
|
|
174
|
-
* rendered on the map.
|
|
175
|
-
*
|
|
176
|
-
* @example
|
|
177
|
-
* shapeSource.features()
|
|
178
|
-
*
|
|
179
|
-
* @param {Array=} filter - an optional filter statement to filter the returned Features.
|
|
180
|
-
* @return {FeatureCollection}
|
|
181
|
-
*/
|
|
182
|
-
async features(filter: Array<string> = []) {
|
|
183
|
-
const res: { data: string } = await this._runNativeCommand(
|
|
184
|
-
'features',
|
|
185
|
-
this._nativeRef,
|
|
186
|
-
getFilter(filter),
|
|
187
|
-
);
|
|
188
|
-
|
|
189
|
-
if (isAndroid()) {
|
|
190
|
-
return JSON.parse(res.data);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
return res.data;
|
|
194
166
|
}
|
|
195
167
|
|
|
196
168
|
/**
|
|
@@ -209,19 +181,14 @@ export class ShapeSource extends NativeBridgeComponent(
|
|
|
209
181
|
console.warn(
|
|
210
182
|
'Using cluster_id is deprecated and will be removed from the future releases. Please use cluster as an argument instead.',
|
|
211
183
|
);
|
|
212
|
-
const res: { data: number } = await this._runNativeCommand(
|
|
213
|
-
'getClusterExpansionZoomById',
|
|
214
|
-
this._nativeRef,
|
|
215
|
-
[feature],
|
|
216
|
-
);
|
|
217
|
-
return res.data;
|
|
218
184
|
}
|
|
219
185
|
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
186
|
+
const handle = findNodeHandle(this._nativeRef as any);
|
|
187
|
+
|
|
188
|
+
const res = (await NativeRNMBXShapeSourceModule.getClusterExpansionZoom(
|
|
189
|
+
handle,
|
|
190
|
+
JSON.stringify(feature),
|
|
191
|
+
)) as { data: number };
|
|
225
192
|
return res.data;
|
|
226
193
|
}
|
|
227
194
|
|
|
@@ -245,24 +212,16 @@ export class ShapeSource extends NativeBridgeComponent(
|
|
|
245
212
|
console.warn(
|
|
246
213
|
'Using cluster_id is deprecated and will be removed from the future releases. Please use cluster as an argument instead.',
|
|
247
214
|
);
|
|
248
|
-
const res: { data: string } = await this._runNativeCommand(
|
|
249
|
-
'getClusterLeavesById',
|
|
250
|
-
this._nativeRef,
|
|
251
|
-
[feature, limit, offset],
|
|
252
|
-
);
|
|
253
|
-
|
|
254
|
-
if (isAndroid()) {
|
|
255
|
-
return JSON.parse(res.data);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
return res.data;
|
|
259
215
|
}
|
|
260
216
|
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
217
|
+
const handle = findNodeHandle(this._nativeRef as any);
|
|
218
|
+
|
|
219
|
+
const res = (await NativeRNMBXShapeSourceModule.getClusterLeaves(
|
|
220
|
+
handle,
|
|
221
|
+
JSON.stringify(feature),
|
|
222
|
+
limit,
|
|
223
|
+
offset,
|
|
224
|
+
)) as { data: string };
|
|
266
225
|
|
|
267
226
|
if (isAndroid()) {
|
|
268
227
|
return JSON.parse(res.data);
|
|
@@ -285,24 +244,14 @@ export class ShapeSource extends NativeBridgeComponent(
|
|
|
285
244
|
console.warn(
|
|
286
245
|
'Using cluster_id is deprecated and will be removed from the future releases. Please use cluster as an argument instead.',
|
|
287
246
|
);
|
|
288
|
-
const res: { data: string } = await this._runNativeCommand(
|
|
289
|
-
'getClusterChildrenById',
|
|
290
|
-
this._nativeRef,
|
|
291
|
-
[feature],
|
|
292
|
-
);
|
|
293
|
-
|
|
294
|
-
if (isAndroid()) {
|
|
295
|
-
return JSON.parse(res.data);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
return res.data;
|
|
299
247
|
}
|
|
300
248
|
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
249
|
+
const handle = findNodeHandle(this._nativeRef as any);
|
|
250
|
+
|
|
251
|
+
const res = (await NativeRNMBXShapeSourceModule.getClusterChildren(
|
|
252
|
+
handle,
|
|
253
|
+
JSON.stringify(feature),
|
|
254
|
+
)) as { data: string };
|
|
306
255
|
|
|
307
256
|
if (isAndroid()) {
|
|
308
257
|
return JSON.parse(res.data);
|
|
@@ -329,16 +278,23 @@ export class ShapeSource extends NativeBridgeComponent(
|
|
|
329
278
|
return toJSONString(this.props.shape);
|
|
330
279
|
}
|
|
331
280
|
|
|
281
|
+
_decodePayload(payload: OnPressEvent | string): OnPressEvent {
|
|
282
|
+
// we check whether the payload is a string, since the strict type safety is enforced only on iOS on the new arch
|
|
283
|
+
// on Android, on both archs, the payload is an object
|
|
284
|
+
if (typeof payload === 'string') {
|
|
285
|
+
return JSON.parse(payload);
|
|
286
|
+
} else {
|
|
287
|
+
return payload;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
332
291
|
onPress(
|
|
333
292
|
event: NativeSyntheticEvent<{
|
|
334
293
|
payload: OnPressEvent;
|
|
335
294
|
}>,
|
|
336
295
|
) {
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
payload: { features, coordinates, point },
|
|
340
|
-
},
|
|
341
|
-
} = event;
|
|
296
|
+
const payload = this._decodePayload(event.nativeEvent.payload);
|
|
297
|
+
const { features, coordinates, point } = payload;
|
|
342
298
|
let newEvent: OnPressEventDeprecated = {
|
|
343
299
|
features,
|
|
344
300
|
coordinates,
|
|
@@ -384,15 +340,15 @@ export class ShapeSource extends NativeBridgeComponent(
|
|
|
384
340
|
ref: (
|
|
385
341
|
nativeRef: React.Component<NativeProps> & Readonly<NativeMethods>,
|
|
386
342
|
) => this._setNativeRef(nativeRef),
|
|
387
|
-
onAndroidCallback: isAndroid() ? this._onAndroidCallback : undefined,
|
|
388
343
|
};
|
|
389
344
|
|
|
390
345
|
return (
|
|
391
|
-
|
|
346
|
+
// @ts-expect-error just codegen stuff
|
|
347
|
+
<RNMBXShapeSourceNativeComponent {...props}>
|
|
392
348
|
{cloneReactChildrenWithProps(this.props.children, {
|
|
393
349
|
sourceID: this.props.id,
|
|
394
350
|
})}
|
|
395
|
-
</
|
|
351
|
+
</RNMBXShapeSourceNativeComponent>
|
|
396
352
|
);
|
|
397
353
|
}
|
|
398
354
|
}
|
|
@@ -401,6 +357,3 @@ type NativeProps = {
|
|
|
401
357
|
id: string;
|
|
402
358
|
shape?: string;
|
|
403
359
|
};
|
|
404
|
-
|
|
405
|
-
const RNMBXShapeSource =
|
|
406
|
-
requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
@@ -3,16 +3,14 @@ import {
|
|
|
3
3
|
NativeMethods,
|
|
4
4
|
NativeModules,
|
|
5
5
|
NativeSyntheticEvent,
|
|
6
|
-
requireNativeComponent,
|
|
7
6
|
} from 'react-native';
|
|
8
7
|
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
8
|
+
import RNMBXVectorSourceNativeComponent from '../specs/RNMBXVectorSourceNativeComponent';
|
|
9
|
+
import { cloneReactChildrenWithProps, isFunction } from '../utils';
|
|
11
10
|
import { copyPropertiesAsDeprecated } from '../utils/deprecation';
|
|
12
11
|
import { OnPressEvent } from '../types/OnPressEvent';
|
|
13
12
|
|
|
14
13
|
import AbstractSource from './AbstractSource';
|
|
15
|
-
import NativeBridgeComponent from './NativeBridgeComponent';
|
|
16
14
|
|
|
17
15
|
const MapboxGL = NativeModules.RNMBXModule;
|
|
18
16
|
|
|
@@ -99,10 +97,7 @@ type NativeProps = Props; // Omit<Props, 'children'>;
|
|
|
99
97
|
* VectorSource is a map content source that supplies tiled vector data in Mapbox Vector Tile format to be shown on the map.
|
|
100
98
|
* The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification.
|
|
101
99
|
*/
|
|
102
|
-
class VectorSource extends
|
|
103
|
-
AbstractSource<Props, NativeProps>,
|
|
104
|
-
NATIVE_MODULE_NAME,
|
|
105
|
-
) {
|
|
100
|
+
class VectorSource extends AbstractSource<Props, NativeProps> {
|
|
106
101
|
static defaultProps = {
|
|
107
102
|
id: MapboxGL.StyleSource.DefaultSourceID,
|
|
108
103
|
};
|
|
@@ -117,46 +112,26 @@ class VectorSource extends NativeBridgeComponent(
|
|
|
117
112
|
if (nativeRef) {
|
|
118
113
|
this.setNativeRef(nativeRef);
|
|
119
114
|
// this._nativeRef = nativeRef;
|
|
120
|
-
super._runPendingNativeCommands(nativeRef);
|
|
121
115
|
}
|
|
122
116
|
}
|
|
123
117
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
*
|
|
132
|
-
* @param {Array=} layerIDs - A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array.
|
|
133
|
-
* @param {Array=} filter - an optional filter statement to filter the returned Features.
|
|
134
|
-
* @return {FeatureCollection}
|
|
135
|
-
*/
|
|
136
|
-
async features(layerIDs = [], filter = []) {
|
|
137
|
-
const res: { data: string } = await this._runNativeCommand(
|
|
138
|
-
'features',
|
|
139
|
-
this._nativeRef,
|
|
140
|
-
[layerIDs, getFilter(filter)],
|
|
141
|
-
);
|
|
142
|
-
|
|
143
|
-
if (isAndroid()) {
|
|
144
|
-
return JSON.parse(res.data);
|
|
118
|
+
_decodePayload(payload: OnPressEvent | string): OnPressEvent {
|
|
119
|
+
// we check whether the payload is a string, since the strict type safety is enforced only on iOS on the new arch
|
|
120
|
+
// on Android, on both archs, the payload is an object
|
|
121
|
+
if (typeof payload === 'string') {
|
|
122
|
+
return JSON.parse(payload);
|
|
123
|
+
} else {
|
|
124
|
+
return payload;
|
|
145
125
|
}
|
|
146
|
-
|
|
147
|
-
return res.data;
|
|
148
126
|
}
|
|
149
127
|
|
|
150
128
|
onPress(
|
|
151
129
|
event: NativeSyntheticEvent<{
|
|
152
|
-
payload: OnPressEvent;
|
|
130
|
+
payload: OnPressEvent | string;
|
|
153
131
|
}>,
|
|
154
132
|
) {
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
payload: { features, coordinates, point },
|
|
158
|
-
},
|
|
159
|
-
} = event;
|
|
133
|
+
const payload = this._decodePayload(event.nativeEvent.payload);
|
|
134
|
+
const { features, coordinates, point } = payload;
|
|
160
135
|
let newEvent = {
|
|
161
136
|
features,
|
|
162
137
|
coordinates,
|
|
@@ -197,19 +172,20 @@ class VectorSource extends NativeBridgeComponent(
|
|
|
197
172
|
hasPressListener: isFunction(this.props.onPress),
|
|
198
173
|
onMapboxVectorSourcePress: this.onPress.bind(this),
|
|
199
174
|
onPress: undefined,
|
|
200
|
-
onAndroidCallback: isAndroid() ? this._onAndroidCallback : undefined,
|
|
201
175
|
};
|
|
202
176
|
return (
|
|
203
|
-
|
|
177
|
+
// @ts-expect-error just codegen stuff
|
|
178
|
+
<RNMBXVectorSourceNativeComponent
|
|
179
|
+
// @ts-expect-error just codegen stuff
|
|
180
|
+
ref={(r) => this._setNativeRef(r)}
|
|
181
|
+
{...props}
|
|
182
|
+
>
|
|
204
183
|
{cloneReactChildrenWithProps(this.props.children, {
|
|
205
184
|
sourceID: this.props.id,
|
|
206
185
|
})}
|
|
207
|
-
</
|
|
186
|
+
</RNMBXVectorSourceNativeComponent>
|
|
208
187
|
);
|
|
209
188
|
}
|
|
210
189
|
}
|
|
211
190
|
|
|
212
|
-
const RNMBXVectorSource =
|
|
213
|
-
requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
214
|
-
|
|
215
191
|
export default VectorSource;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
2
|
+
import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
|
|
3
|
+
import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
5
|
+
|
|
6
|
+
export interface Spec extends TurboModule {
|
|
7
|
+
getClusterExpansionZoom: (
|
|
8
|
+
viewRef: Int32 | null,
|
|
9
|
+
featureJSON: string,
|
|
10
|
+
) => Promise<Object>;
|
|
11
|
+
getClusterLeaves: (
|
|
12
|
+
viewRef: Int32 | null,
|
|
13
|
+
featureJSON: string,
|
|
14
|
+
number: Int32,
|
|
15
|
+
offset: Int32,
|
|
16
|
+
) => Promise<Object>;
|
|
17
|
+
getClusterChildren: (
|
|
18
|
+
viewRef: Int32 | null,
|
|
19
|
+
featureJSON: string,
|
|
20
|
+
) => Promise<Object>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXShapeSourceModule');
|
|
@@ -4,19 +4,22 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
|
4
4
|
|
|
5
5
|
import type { UnsafeMixed } from './codegenUtils';
|
|
6
6
|
|
|
7
|
+
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
8
|
+
type OptionalProp<T> = UnsafeMixed<T>;
|
|
9
|
+
|
|
7
10
|
export interface NativeProps extends ViewProps {
|
|
8
11
|
id: UnsafeMixed<string>;
|
|
9
12
|
sourceID: UnsafeMixed<string>;
|
|
10
|
-
existing
|
|
13
|
+
existing?: OptionalProp<boolean>;
|
|
11
14
|
filter: UnsafeMixed<any[]>;
|
|
12
15
|
|
|
13
|
-
aboveLayerID
|
|
14
|
-
belowLayerID
|
|
15
|
-
layerIndex
|
|
16
|
+
aboveLayerID?: OptionalProp<string>;
|
|
17
|
+
belowLayerID?: OptionalProp<string>;
|
|
18
|
+
layerIndex?: OptionalProp<Int32>;
|
|
16
19
|
reactStyle: UnsafeMixed<any>;
|
|
17
20
|
|
|
18
|
-
maxZoomLevel
|
|
19
|
-
minZoomLevel
|
|
21
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
22
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
export default codegenNativeComponent<NativeProps>(
|
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
|
|
9
9
|
import type { NativeCameraStop, UnsafeMixed } from './codegenUtils';
|
|
10
10
|
|
|
11
|
+
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
12
|
+
type OptionalProp<T> = UnsafeMixed<T>;
|
|
13
|
+
|
|
11
14
|
type UserTrackingModeChangeEventType = {
|
|
12
15
|
type: string;
|
|
13
16
|
payloadRenamed: {
|
|
@@ -18,21 +21,21 @@ type UserTrackingModeChangeEventType = {
|
|
|
18
21
|
|
|
19
22
|
export interface NativeProps extends ViewProps {
|
|
20
23
|
maxBounds?: UnsafeMixed<string | null>;
|
|
21
|
-
animationDuration?:
|
|
22
|
-
animationMode?:
|
|
24
|
+
animationDuration?: OptionalProp<Double>;
|
|
25
|
+
animationMode?: OptionalProp<string>;
|
|
23
26
|
defaultStop?: UnsafeMixed<NativeCameraStop>;
|
|
24
|
-
userTrackingMode?:
|
|
27
|
+
userTrackingMode?: OptionalProp<Int32>;
|
|
25
28
|
|
|
26
|
-
followUserLocation?:
|
|
27
|
-
followUserMode?:
|
|
28
|
-
followZoomLevel?:
|
|
29
|
-
followPitch?:
|
|
30
|
-
followHeading?:
|
|
29
|
+
followUserLocation?: OptionalProp<boolean>;
|
|
30
|
+
followUserMode?: OptionalProp<string>;
|
|
31
|
+
followZoomLevel?: OptionalProp<Double>;
|
|
32
|
+
followPitch?: OptionalProp<Double>;
|
|
33
|
+
followHeading?: OptionalProp<Double>;
|
|
31
34
|
followPadding?: UnsafeMixed<any>;
|
|
32
35
|
|
|
33
|
-
zoomLevel?:
|
|
34
|
-
maxZoomLevel?:
|
|
35
|
-
minZoomLevel?:
|
|
36
|
+
zoomLevel?: OptionalProp<Double>;
|
|
37
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
38
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
36
39
|
stop?: UnsafeMixed<NativeCameraStop>;
|
|
37
40
|
|
|
38
41
|
onUserTrackingModeChange?: DirectEventHandler<UserTrackingModeChangeEventType>;
|
|
@@ -4,20 +4,23 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
|
4
4
|
|
|
5
5
|
import type { UnsafeMixed } from './codegenUtils';
|
|
6
6
|
|
|
7
|
+
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
8
|
+
type OptionalProp<T> = UnsafeMixed<T>;
|
|
9
|
+
|
|
7
10
|
export interface NativeProps extends ViewProps {
|
|
8
11
|
id: UnsafeMixed<string>;
|
|
9
|
-
sourceID:
|
|
10
|
-
existing:
|
|
12
|
+
sourceID: OptionalProp<string>;
|
|
13
|
+
existing: OptionalProp<boolean>;
|
|
11
14
|
filter: UnsafeMixed<any[]>;
|
|
12
15
|
|
|
13
|
-
aboveLayerID:
|
|
14
|
-
belowLayerID:
|
|
15
|
-
layerIndex:
|
|
16
|
+
aboveLayerID: OptionalProp<string>;
|
|
17
|
+
belowLayerID: OptionalProp<string>;
|
|
18
|
+
layerIndex: OptionalProp<Int32>;
|
|
16
19
|
reactStyle: UnsafeMixed<any>;
|
|
17
20
|
|
|
18
|
-
maxZoomLevel:
|
|
19
|
-
minZoomLevel:
|
|
20
|
-
sourceLayerID:
|
|
21
|
+
maxZoomLevel: OptionalProp<Double>;
|
|
22
|
+
minZoomLevel: OptionalProp<Double>;
|
|
23
|
+
sourceLayerID: OptionalProp<string>;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export default codegenNativeComponent<NativeProps>(
|
|
@@ -4,20 +4,23 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
|
4
4
|
|
|
5
5
|
import type { UnsafeMixed } from './codegenUtils';
|
|
6
6
|
|
|
7
|
+
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
8
|
+
type OptionalProp<T> = UnsafeMixed<T>;
|
|
9
|
+
|
|
7
10
|
export interface NativeProps extends ViewProps {
|
|
8
|
-
id
|
|
9
|
-
sourceID
|
|
10
|
-
existing
|
|
11
|
+
id?: UnsafeMixed<string>;
|
|
12
|
+
sourceID?: OptionalProp<string>;
|
|
13
|
+
existing?: OptionalProp<boolean>;
|
|
11
14
|
filter: UnsafeMixed<any[]>;
|
|
12
15
|
|
|
13
|
-
aboveLayerID
|
|
14
|
-
belowLayerID
|
|
15
|
-
layerIndex
|
|
16
|
+
aboveLayerID?: OptionalProp<string>;
|
|
17
|
+
belowLayerID?: OptionalProp<string>;
|
|
18
|
+
layerIndex?: OptionalProp<Int32>;
|
|
16
19
|
reactStyle: UnsafeMixed<any>;
|
|
17
20
|
|
|
18
|
-
maxZoomLevel
|
|
19
|
-
minZoomLevel
|
|
20
|
-
sourceLayerID
|
|
21
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
22
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
23
|
+
sourceLayerID?: OptionalProp<string>;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export default codegenNativeComponent<NativeProps>(
|
|
@@ -4,20 +4,23 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
|
4
4
|
|
|
5
5
|
import type { UnsafeMixed } from './codegenUtils';
|
|
6
6
|
|
|
7
|
+
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
8
|
+
type OptionalProp<T> = UnsafeMixed<T>;
|
|
9
|
+
|
|
7
10
|
export interface NativeProps extends ViewProps {
|
|
8
11
|
id: UnsafeMixed<string>;
|
|
9
|
-
sourceID
|
|
10
|
-
existing
|
|
12
|
+
sourceID?: OptionalProp<string>;
|
|
13
|
+
existing?: OptionalProp<boolean>;
|
|
11
14
|
filter: UnsafeMixed<any[]>;
|
|
12
15
|
|
|
13
|
-
aboveLayerID
|
|
14
|
-
belowLayerID
|
|
15
|
-
layerIndex
|
|
16
|
+
aboveLayerID?: OptionalProp<string>;
|
|
17
|
+
belowLayerID?: OptionalProp<string>;
|
|
18
|
+
layerIndex?: OptionalProp<Int32>;
|
|
16
19
|
reactStyle: UnsafeMixed<any>;
|
|
17
20
|
|
|
18
|
-
maxZoomLevel
|
|
19
|
-
minZoomLevel
|
|
20
|
-
sourceLayerID
|
|
21
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
22
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
23
|
+
sourceLayerID?: OptionalProp<string>;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export default codegenNativeComponent<NativeProps>(
|
|
@@ -4,20 +4,23 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
|
4
4
|
|
|
5
5
|
import type { UnsafeMixed } from './codegenUtils';
|
|
6
6
|
|
|
7
|
+
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
8
|
+
type OptionalProp<T> = UnsafeMixed<T>;
|
|
9
|
+
|
|
7
10
|
export interface NativeProps extends ViewProps {
|
|
8
|
-
id:
|
|
9
|
-
sourceID
|
|
10
|
-
existing
|
|
11
|
+
id: OptionalProp<string>;
|
|
12
|
+
sourceID?: OptionalProp<string>;
|
|
13
|
+
existing?: OptionalProp<boolean>;
|
|
11
14
|
filter: UnsafeMixed<any[]>;
|
|
12
15
|
|
|
13
|
-
aboveLayerID
|
|
14
|
-
belowLayerID
|
|
15
|
-
layerIndex
|
|
16
|
+
aboveLayerID?: OptionalProp<string>;
|
|
17
|
+
belowLayerID?: OptionalProp<string>;
|
|
18
|
+
layerIndex?: OptionalProp<Int32>;
|
|
16
19
|
reactStyle: UnsafeMixed<any>;
|
|
17
20
|
|
|
18
|
-
maxZoomLevel
|
|
19
|
-
minZoomLevel
|
|
20
|
-
sourceLayerID
|
|
21
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
22
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
23
|
+
sourceLayerID?: OptionalProp<string>;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export default codegenNativeComponent<NativeProps>(
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
|
|
4
|
+
import { UnsafeMixed } from './codegenUtils';
|
|
5
|
+
|
|
6
|
+
export interface NativeProps extends ViewProps {
|
|
7
|
+
id: UnsafeMixed<string>;
|
|
8
|
+
existing: UnsafeMixed<boolean>;
|
|
9
|
+
url: UnsafeMixed<string>;
|
|
10
|
+
coordinates: UnsafeMixed<any>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default codegenNativeComponent<NativeProps>(
|
|
14
|
+
'RNMBXImageSource',
|
|
15
|
+
) as HostComponent<NativeProps>;
|
|
@@ -4,20 +4,23 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
|
4
4
|
|
|
5
5
|
import type { UnsafeMixed } from './codegenUtils';
|
|
6
6
|
|
|
7
|
+
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
8
|
+
type OptionalProp<T> = UnsafeMixed<T>;
|
|
9
|
+
|
|
7
10
|
export interface NativeProps extends ViewProps {
|
|
8
11
|
id: UnsafeMixed<string>;
|
|
9
|
-
sourceID
|
|
10
|
-
existing
|
|
12
|
+
sourceID?: OptionalProp<string>;
|
|
13
|
+
existing?: OptionalProp<boolean>;
|
|
11
14
|
filter: UnsafeMixed<any[]>;
|
|
12
15
|
|
|
13
|
-
aboveLayerID
|
|
14
|
-
belowLayerID
|
|
15
|
-
layerIndex
|
|
16
|
+
aboveLayerID?: OptionalProp<string>;
|
|
17
|
+
belowLayerID?: OptionalProp<string>;
|
|
18
|
+
layerIndex?: OptionalProp<Int32>;
|
|
16
19
|
reactStyle: UnsafeMixed<any>;
|
|
17
20
|
|
|
18
|
-
maxZoomLevel
|
|
19
|
-
minZoomLevel
|
|
20
|
-
sourceLayerID
|
|
21
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
22
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
23
|
+
sourceLayerID?: OptionalProp<string>;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export default codegenNativeComponent<NativeProps>(
|