@rnmapbox/maps 10.0.0-beta.76 → 10.0.0-beta.78
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/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/AbstractMapFeature.kt +10 -1
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/annotation/RCTMGLMarkerView.kt +4 -2
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/annotation/RCTMGLPointAnnotation.kt +4 -3
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/CameraUpdateQueue.kt +1 -3
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/RCTMGLCamera.kt +17 -22
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/images/RCTMGLImages.kt +3 -2
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/location/RCTMGLNativeUserLocation.kt +3 -2
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.kt +82 -75
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapViewManager.kt +8 -6
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyle.kt +7 -1
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +5 -5
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/atmosphere/RCTMGLAtmosphere.kt +3 -2
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTLayer.kt +43 -15
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayer.kt +21 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayerManager.kt +65 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayer.kt +40 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayerManager.kt +76 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayer.kt +43 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayerManager.kt +76 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayer.kt +40 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayerManager.kt +76 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayer.kt +40 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayerManager.kt +76 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayer.kt +40 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayerManager.kt +76 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayer.kt +18 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayerManager.kt +65 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSkyLayerManager.kt +76 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayer.kt +40 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayerManager.kt +76 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/light/RCTMGLLight.kt +4 -1
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSource.kt +69 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSourceManager.kt +54 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterDemSource.kt +82 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterDemSourceManager.kt +30 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSource.kt +37 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSourceManager.kt +32 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLShapeSource.kt +5 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLShapeSourceManager.kt +10 -4
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSource.kt +44 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSourceManager.kt +69 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSource.kt +78 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSourceManager.kt +69 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTSource.kt +107 -87
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/terrain/RCTMGLTerrain.kt +3 -2
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/events/PointAnnotationDragEvent.java +4 -2
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/modules/RCTMGLOfflineModule.kt +4 -4
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/utils/GeoJSONUtils.kt +52 -44
- package/ios/RCTMGL-v10/RCTMGLCamera.swift +11 -31
- package/ios/RCTMGL-v10/RCTMGLInteractiveElement.swift +13 -1
- package/ios/RCTMGL-v10/RCTMGLLayer.swift +35 -6
- package/ios/RCTMGL-v10/RCTMGLLocationModule.swift +27 -4
- package/ios/RCTMGL-v10/RCTMGLMapView.swift +17 -2
- package/ios/RCTMGL-v10/RCTMGLMapViewManager.m +1 -0
- package/ios/RCTMGL-v10/RCTMGLSource.swift +35 -17
- package/lib/commonjs/MGLModule.js.map +1 -1
- package/lib/commonjs/Mapbox.js +13 -6
- package/lib/commonjs/Mapbox.js.map +1 -1
- package/lib/commonjs/classes/AnimatedCoordinatesArray.js.map +1 -1
- package/lib/commonjs/classes/AnimatedExtractCoordinateFromArray.js.map +1 -1
- package/lib/commonjs/classes/AnimatedPoint.js.map +1 -1
- package/lib/commonjs/classes/AnimatedRouteCoordinatesArray.js.map +1 -1
- package/lib/commonjs/classes/AnimatedShape.js.map +1 -1
- package/lib/commonjs/classes/index.d.js.map +1 -1
- package/lib/commonjs/classes/index.js.map +1 -1
- package/lib/commonjs/components/AbstractLayer.js +1 -2
- package/lib/commonjs/components/AbstractLayer.js.map +1 -1
- package/lib/commonjs/components/AbstractSource.js.map +1 -1
- package/lib/commonjs/components/Annotation.js.map +1 -1
- package/lib/commonjs/components/Atmosphere.js.map +1 -1
- package/lib/commonjs/components/BackgroundLayer.js.map +1 -1
- package/lib/commonjs/components/Callout.js +7 -33
- package/lib/commonjs/components/Callout.js.map +1 -1
- package/lib/commonjs/components/Camera.js +4 -4
- package/lib/commonjs/components/Camera.js.map +1 -1
- package/lib/commonjs/components/CircleLayer.js.map +1 -1
- package/lib/commonjs/components/FillExtrusionLayer.js.map +1 -1
- package/lib/commonjs/components/FillLayer.js.map +1 -1
- package/lib/commonjs/components/HeadingIndicator.js +12 -3
- package/lib/commonjs/components/HeadingIndicator.js.map +1 -1
- package/lib/commonjs/components/HeatmapLayer.js.map +1 -1
- package/lib/commonjs/components/Image.js.map +1 -1
- package/lib/commonjs/components/ImageSource.js.map +1 -1
- package/lib/commonjs/components/Images.js.map +1 -1
- package/lib/commonjs/components/Light.js.map +1 -1
- package/lib/commonjs/components/LineLayer.js.map +1 -1
- package/lib/commonjs/components/MapView.js +12 -1
- package/lib/commonjs/components/MapView.js.map +1 -1
- package/lib/commonjs/components/MarkerView.js.map +1 -1
- package/lib/commonjs/components/NativeBridgeComponent.js.map +1 -1
- package/lib/commonjs/components/NativeUserLocation.js.map +1 -1
- package/lib/commonjs/components/PointAnnotation.js.map +1 -1
- package/lib/commonjs/components/RasterDemSource.js.map +1 -1
- package/lib/commonjs/components/RasterLayer.js.map +1 -1
- package/lib/commonjs/components/RasterSource.js.map +1 -1
- package/lib/commonjs/components/ShapeSource.js.map +1 -1
- package/lib/commonjs/components/SkyLayer.js.map +1 -1
- package/lib/commonjs/components/Style.js.map +1 -1
- package/lib/commonjs/components/SymbolLayer.js.map +1 -1
- package/lib/commonjs/components/Terrain.js.map +1 -1
- package/lib/commonjs/components/UserLocation.js +6 -5
- package/lib/commonjs/components/UserLocation.js.map +1 -1
- package/lib/commonjs/components/VectorSource.js.map +1 -1
- package/lib/commonjs/global.d.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/modules/location/locationManager.js.map +1 -1
- package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -1
- package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -1
- package/lib/commonjs/modules/offline/offlineManager.js.map +1 -1
- package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -1
- package/lib/commonjs/modules/snapshot/snapshotManager.js.map +1 -1
- package/lib/commonjs/requestAndroidLocationPermissions.js.map +1 -1
- package/lib/commonjs/types/BaseProps.js.map +1 -1
- package/lib/commonjs/types/OnPressEvent.js.map +1 -1
- package/lib/commonjs/types/Position.js.map +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/utils/BridgeValue.js.map +1 -1
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/MapboxStyles.d.js +84 -84
- package/lib/commonjs/utils/MapboxStyles.d.js.map +1 -1
- package/lib/commonjs/utils/StyleValue.js.map +1 -1
- package/lib/commonjs/utils/animated/Animated.js.map +1 -1
- package/lib/commonjs/utils/deprecation.js.map +1 -1
- package/lib/commonjs/utils/filterUtils.js.map +1 -1
- package/lib/commonjs/utils/geoUtils.js.map +1 -1
- package/lib/commonjs/utils/getAnnotationsLayerID.js.map +1 -1
- package/lib/commonjs/utils/index.js +0 -16
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/nativeRef.js.map +1 -1
- package/lib/commonjs/utils/styleMap.js +1 -1217
- package/lib/commonjs/utils/styleMap.js.map +1 -1
- package/lib/commonjs/web/MapContext.js.map +1 -1
- package/lib/commonjs/web/MapboxModule.js.map +1 -1
- package/lib/commonjs/web/UnimplementedComponent.js.map +1 -1
- package/lib/commonjs/web/components/Camera.js.map +1 -1
- package/lib/commonjs/web/components/MapView.js.map +1 -1
- package/lib/commonjs/web/index.js.map +1 -1
- package/lib/commonjs/web/utils/Logger.js.map +1 -1
- package/lib/module/MGLModule.js.map +1 -1
- package/lib/module/Mapbox.js +6 -6
- package/lib/module/Mapbox.js.map +1 -1
- package/lib/module/classes/AnimatedCoordinatesArray.js.map +1 -1
- package/lib/module/classes/AnimatedExtractCoordinateFromArray.js.map +1 -1
- package/lib/module/classes/AnimatedPoint.js.map +1 -1
- package/lib/module/classes/AnimatedRouteCoordinatesArray.js.map +1 -1
- package/lib/module/classes/AnimatedShape.js.map +1 -1
- package/lib/module/classes/index.d.js.map +1 -1
- package/lib/module/classes/index.js.map +1 -1
- package/lib/module/components/AbstractLayer.js +1 -1
- package/lib/module/components/AbstractLayer.js.map +1 -1
- package/lib/module/components/AbstractSource.js.map +1 -1
- package/lib/module/components/Annotation.js.map +1 -1
- package/lib/module/components/Atmosphere.js.map +1 -1
- package/lib/module/components/BackgroundLayer.js.map +1 -1
- package/lib/module/components/Callout.js +7 -33
- package/lib/module/components/Callout.js.map +1 -1
- package/lib/module/components/Camera.js +3 -3
- package/lib/module/components/Camera.js.map +1 -1
- package/lib/module/components/CircleLayer.js.map +1 -1
- package/lib/module/components/FillExtrusionLayer.js.map +1 -1
- package/lib/module/components/FillLayer.js.map +1 -1
- package/lib/module/components/HeadingIndicator.js +12 -3
- package/lib/module/components/HeadingIndicator.js.map +1 -1
- package/lib/module/components/HeatmapLayer.js.map +1 -1
- package/lib/module/components/Image.js.map +1 -1
- package/lib/module/components/ImageSource.js.map +1 -1
- package/lib/module/components/Images.js.map +1 -1
- package/lib/module/components/Light.js.map +1 -1
- package/lib/module/components/LineLayer.js.map +1 -1
- package/lib/module/components/MapView.js +12 -1
- package/lib/module/components/MapView.js.map +1 -1
- package/lib/module/components/MarkerView.js.map +1 -1
- package/lib/module/components/NativeBridgeComponent.js.map +1 -1
- package/lib/module/components/NativeUserLocation.js.map +1 -1
- package/lib/module/components/PointAnnotation.js.map +1 -1
- package/lib/module/components/RasterDemSource.js.map +1 -1
- package/lib/module/components/RasterLayer.js.map +1 -1
- package/lib/module/components/RasterSource.js.map +1 -1
- package/lib/module/components/ShapeSource.js.map +1 -1
- package/lib/module/components/SkyLayer.js.map +1 -1
- package/lib/module/components/Style.js.map +1 -1
- package/lib/module/components/SymbolLayer.js.map +1 -1
- package/lib/module/components/Terrain.js.map +1 -1
- package/lib/module/components/UserLocation.js +5 -4
- package/lib/module/components/UserLocation.js.map +1 -1
- package/lib/module/components/VectorSource.js.map +1 -1
- package/lib/module/global.d.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/modules/location/locationManager.js.map +1 -1
- package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -1
- package/lib/module/modules/offline/OfflinePack.js.map +1 -1
- package/lib/module/modules/offline/offlineManager.js.map +1 -1
- package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -1
- package/lib/module/modules/snapshot/snapshotManager.js.map +1 -1
- package/lib/module/requestAndroidLocationPermissions.js.map +1 -1
- package/lib/module/types/BaseProps.js.map +1 -1
- package/lib/module/types/OnPressEvent.js.map +1 -1
- package/lib/module/types/Position.js.map +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/utils/BridgeValue.js.map +1 -1
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/MapboxStyles.d.js +84 -84
- package/lib/module/utils/MapboxStyles.d.js.map +1 -1
- package/lib/module/utils/StyleValue.js.map +1 -1
- package/lib/module/utils/animated/Animated.js.map +1 -1
- package/lib/module/utils/deprecation.js.map +1 -1
- package/lib/module/utils/filterUtils.js.map +1 -1
- package/lib/module/utils/geoUtils.js.map +1 -1
- package/lib/module/utils/getAnnotationsLayerID.js.map +1 -1
- package/lib/module/utils/index.js +0 -14
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/nativeRef.js.map +1 -1
- package/lib/module/utils/styleMap.js +0 -1201
- package/lib/module/utils/styleMap.js.map +1 -1
- package/lib/module/web/MapContext.js.map +1 -1
- package/lib/module/web/MapboxModule.js.map +1 -1
- package/lib/module/web/UnimplementedComponent.js.map +1 -1
- package/lib/module/web/components/Camera.js.map +1 -1
- package/lib/module/web/components/MapView.js.map +1 -1
- package/lib/module/web/index.js.map +1 -1
- package/lib/module/web/utils/Logger.js.map +1 -1
- package/lib/typescript/MGLModule.d.ts.map +1 -1
- package/lib/typescript/Mapbox.d.ts +1 -1
- package/lib/typescript/Mapbox.d.ts.map +1 -1
- package/lib/typescript/components/AbstractLayer.d.ts +1 -0
- package/lib/typescript/components/AbstractLayer.d.ts.map +1 -1
- package/lib/typescript/components/AbstractSource.d.ts.map +1 -1
- package/lib/typescript/components/Annotation.d.ts.map +1 -1
- package/lib/typescript/components/Atmosphere.d.ts.map +1 -1
- package/lib/typescript/components/BackgroundLayer.d.ts +5 -1
- package/lib/typescript/components/BackgroundLayer.d.ts.map +1 -1
- package/lib/typescript/components/Callout.d.ts +41 -0
- package/lib/typescript/components/Callout.d.ts.map +1 -0
- package/lib/typescript/components/Camera.d.ts +2 -1
- package/lib/typescript/components/Camera.d.ts.map +1 -1
- package/lib/typescript/components/CircleLayer.d.ts +4 -0
- package/lib/typescript/components/CircleLayer.d.ts.map +1 -1
- package/lib/typescript/components/FillExtrusionLayer.d.ts +5 -1
- package/lib/typescript/components/FillExtrusionLayer.d.ts.map +1 -1
- package/lib/typescript/components/FillLayer.d.ts +4 -0
- package/lib/typescript/components/FillLayer.d.ts.map +1 -1
- package/lib/typescript/components/HeadingIndicator.d.ts +2 -1
- package/lib/typescript/components/HeadingIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HeatmapLayer.d.ts +5 -1
- package/lib/typescript/components/HeatmapLayer.d.ts.map +1 -1
- package/lib/typescript/components/Image.d.ts.map +1 -1
- package/lib/typescript/components/ImageSource.d.ts +4 -0
- package/lib/typescript/components/ImageSource.d.ts.map +1 -1
- package/lib/typescript/components/Images.d.ts.map +1 -1
- package/lib/typescript/components/Light.d.ts.map +1 -1
- package/lib/typescript/components/LineLayer.d.ts +4 -0
- package/lib/typescript/components/LineLayer.d.ts.map +1 -1
- package/lib/typescript/components/MapView.d.ts +15 -5
- package/lib/typescript/components/MapView.d.ts.map +1 -1
- package/lib/typescript/components/MarkerView.d.ts.map +1 -1
- package/lib/typescript/components/NativeBridgeComponent.d.ts.map +1 -1
- package/lib/typescript/components/NativeUserLocation.d.ts.map +1 -1
- package/lib/typescript/components/PointAnnotation.d.ts +5 -9
- package/lib/typescript/components/PointAnnotation.d.ts.map +1 -1
- package/lib/typescript/components/RasterDemSource.d.ts +4 -0
- package/lib/typescript/components/RasterDemSource.d.ts.map +1 -1
- package/lib/typescript/components/RasterLayer.d.ts +5 -1
- package/lib/typescript/components/RasterLayer.d.ts.map +1 -1
- package/lib/typescript/components/RasterSource.d.ts +4 -0
- package/lib/typescript/components/RasterSource.d.ts.map +1 -1
- package/lib/typescript/components/ShapeSource.d.ts +4 -0
- package/lib/typescript/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/components/SkyLayer.d.ts +4 -0
- package/lib/typescript/components/SkyLayer.d.ts.map +1 -1
- package/lib/typescript/components/Style.d.ts.map +1 -1
- package/lib/typescript/components/SymbolLayer.d.ts +5 -1
- package/lib/typescript/components/SymbolLayer.d.ts.map +1 -1
- package/lib/typescript/components/Terrain.d.ts.map +1 -1
- package/lib/typescript/components/UserLocation.d.ts +1 -1
- package/lib/typescript/components/UserLocation.d.ts.map +1 -1
- package/lib/typescript/components/VectorSource.d.ts +4 -0
- package/lib/typescript/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/modules/location/locationManager.d.ts.map +1 -1
- package/lib/typescript/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -1
- package/lib/typescript/modules/offline/OfflinePack.d.ts.map +1 -1
- package/lib/typescript/modules/offline/offlineManager.d.ts.map +1 -1
- package/lib/typescript/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
- package/lib/typescript/modules/snapshot/snapshotManager.d.ts.map +1 -1
- package/lib/typescript/requestAndroidLocationPermissions.d.ts.map +1 -1
- package/lib/typescript/types/BaseProps.d.ts +1 -0
- package/lib/typescript/types/BaseProps.d.ts.map +1 -1
- package/lib/typescript/types/OnPressEvent.d.ts.map +1 -1
- package/lib/typescript/types/Position.d.ts.map +1 -1
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/lib/typescript/utils/BridgeValue.d.ts.map +1 -1
- package/lib/typescript/utils/Logger.d.ts.map +1 -1
- package/lib/typescript/utils/StyleValue.d.ts.map +1 -1
- package/lib/typescript/utils/animated/Animated.d.ts.map +1 -1
- package/lib/typescript/utils/deprecation.d.ts.map +1 -1
- package/lib/typescript/utils/filterUtils.d.ts.map +1 -1
- package/lib/typescript/utils/geoUtils.d.ts.map +1 -1
- package/lib/typescript/utils/getAnnotationsLayerID.d.ts.map +1 -1
- package/lib/typescript/utils/index.d.ts +0 -14
- package/lib/typescript/utils/index.d.ts.map +1 -1
- package/lib/typescript/utils/nativeRef.d.ts.map +1 -1
- package/lib/typescript/utils/styleMap.d.ts +0 -1406
- package/lib/typescript/utils/styleMap.d.ts.map +1 -1
- package/lib/typescript/web/MapContext.d.ts.map +1 -1
- package/lib/typescript/web/components/Camera.d.ts.map +1 -1
- package/lib/typescript/web/components/MapView.d.ts.map +1 -1
- package/lib/typescript/web/utils/Logger.d.ts.map +1 -1
- package/package.json +37 -39
- package/plugin/build/withMapbox.d.ts +10 -6
- package/plugin/build/withMapbox.js +122 -137
- package/plugin/install.md +21 -0
- package/plugin/src/withMapbox.ts +172 -139
- package/{javascript → src}/Mapbox.ts +4 -1
- package/{javascript → src}/components/AbstractLayer.tsx +2 -1
- package/{javascript → src}/components/BackgroundLayer.tsx +6 -1
- package/{javascript/components/Callout.js → src/components/Callout.tsx} +53 -45
- package/{javascript → src}/components/Camera.tsx +2 -1
- package/{javascript → src}/components/CircleLayer.tsx +5 -0
- package/{javascript → src}/components/FillExtrusionLayer.tsx +6 -1
- package/{javascript → src}/components/FillLayer.tsx +5 -0
- package/src/components/HeadingIndicator.tsx +41 -0
- package/{javascript → src}/components/HeatmapLayer.tsx +6 -1
- package/{javascript → src}/components/ImageSource.tsx +5 -0
- package/{javascript → src}/components/LineLayer.tsx +5 -0
- package/{javascript → src}/components/MapView.tsx +31 -7
- package/{javascript → src}/components/PointAnnotation.tsx +8 -4
- package/{javascript → src}/components/RasterDemSource.tsx +5 -0
- package/{javascript → src}/components/RasterLayer.tsx +6 -1
- package/{javascript → src}/components/RasterSource.tsx +5 -0
- package/{javascript → src}/components/ShapeSource.tsx +5 -0
- package/{javascript → src}/components/SkyLayer.tsx +5 -0
- package/{javascript → src}/components/SymbolLayer.tsx +6 -1
- package/{javascript → src}/components/UserLocation.tsx +2 -2
- package/{javascript → src}/components/VectorSource.tsx +5 -0
- package/{javascript → src}/types/BaseProps.ts +1 -0
- package/{javascript → src}/utils/index.ts +0 -8
- package/src/utils/styleMap.ts +284 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayer.java +0 -23
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayerManager.java +0 -60
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayer.java +0 -53
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayerManager.java +0 -73
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayer.java +0 -51
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayerManager.java +0 -76
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayer.java +0 -51
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayerManager.java +0 -77
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayer.java +0 -51
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayerManager.java +0 -73
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayer.java +0 -51
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayerManager.java +0 -75
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayer.java +0 -24
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayerManager.java +0 -60
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSkyLayerManager.java +0 -73
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayer.java +0 -51
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayerManager.java +0 -71
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSource.java +0 -76
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSourceManager.java +0 -68
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterDemSource.java +0 -122
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterDemSourceManager.java +0 -64
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSource.java +0 -43
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSourceManager.java +0 -39
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSource.java +0 -103
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSourceManager.java +0 -80
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSource.java +0 -100
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSourceManager.java +0 -80
- package/javascript/components/Callout.d.ts +0 -35
- package/javascript/components/HeadingIndicator.tsx +0 -30
- package/javascript/utils/styleMap.ts +0 -1882
- package/lib/commonjs/components/Callout.d.js +0 -9
- package/lib/commonjs/components/Callout.d.js.map +0 -1
- package/lib/module/components/Callout.d.js +0 -2
- package/lib/module/components/Callout.d.js.map +0 -1
- /package/{javascript → src}/MGLModule.ts +0 -0
- /package/{javascript → src}/assets/heading.png +0 -0
- /package/{javascript → src}/assets/heading@2x.png +0 -0
- /package/{javascript → src}/assets/heading@3x.png +0 -0
- /package/{javascript → src}/classes/AnimatedCoordinatesArray.js +0 -0
- /package/{javascript → src}/classes/AnimatedExtractCoordinateFromArray.js +0 -0
- /package/{javascript → src}/classes/AnimatedPoint.js +0 -0
- /package/{javascript → src}/classes/AnimatedRouteCoordinatesArray.js +0 -0
- /package/{javascript → src}/classes/AnimatedShape.js +0 -0
- /package/{javascript → src}/classes/index.d.ts +0 -0
- /package/{javascript → src}/classes/index.js +0 -0
- /package/{javascript → src}/components/AbstractSource.tsx +0 -0
- /package/{javascript → src}/components/Annotation.tsx +0 -0
- /package/{javascript → src}/components/Atmosphere.tsx +0 -0
- /package/{javascript → src}/components/Image.tsx +0 -0
- /package/{javascript → src}/components/Images.tsx +0 -0
- /package/{javascript → src}/components/Light.tsx +0 -0
- /package/{javascript → src}/components/MarkerView.tsx +0 -0
- /package/{javascript → src}/components/NativeBridgeComponent.tsx +0 -0
- /package/{javascript → src}/components/NativeUserLocation.tsx +0 -0
- /package/{javascript → src}/components/Style.tsx +0 -0
- /package/{javascript → src}/components/Terrain.tsx +0 -0
- /package/{javascript → src}/global.d.ts +0 -0
- /package/{javascript → src}/index.ts +0 -0
- /package/{javascript → src}/index.web.js +0 -0
- /package/{javascript → src}/modules/location/locationManager.ts +0 -0
- /package/{javascript → src}/modules/offline/OfflineCreatePackOptions.ts +0 -0
- /package/{javascript → src}/modules/offline/OfflinePack.ts +0 -0
- /package/{javascript → src}/modules/offline/offlineManager.ts +0 -0
- /package/{javascript → src}/modules/snapshot/SnapshotOptions.ts +0 -0
- /package/{javascript → src}/modules/snapshot/snapshotManager.ts +0 -0
- /package/{javascript → src}/requestAndroidLocationPermissions.ts +0 -0
- /package/{javascript → src}/types/OnPressEvent.ts +0 -0
- /package/{javascript → src}/types/Position.ts +0 -0
- /package/{javascript → src}/types/index.ts +0 -0
- /package/{javascript → src}/utils/BridgeValue.ts +0 -0
- /package/{javascript → src}/utils/Logger.ts +0 -0
- /package/{javascript → src}/utils/MapboxStyles.d.ts +0 -0
- /package/{javascript → src}/utils/StyleValue.ts +0 -0
- /package/{javascript → src}/utils/animated/Animated.ts +0 -0
- /package/{javascript → src}/utils/deprecation.ts +0 -0
- /package/{javascript → src}/utils/filterUtils.ts +0 -0
- /package/{javascript → src}/utils/geoUtils.ts +0 -0
- /package/{javascript → src}/utils/getAnnotationsLayerID.ts +0 -0
- /package/{javascript → src}/utils/nativeRef.ts +0 -0
- /package/{javascript → src}/web/MapContext.ts +0 -0
- /package/{javascript → src}/web/MapboxModule.js +0 -0
- /package/{javascript → src}/web/UnimplementedComponent.js +0 -0
- /package/{javascript → src}/web/components/Camera.tsx +0 -0
- /package/{javascript → src}/web/components/MapView.tsx +0 -0
- /package/{javascript → src}/web/index.js +0 -0
- /package/{javascript → src}/web/install.md +0 -0
- /package/{javascript → src}/web/utils/Logger.ts +0 -0
|
@@ -15,10 +15,15 @@ export const NATIVE_MODULE_NAME = 'RCTMGLFillExtrusionLayer';
|
|
|
15
15
|
|
|
16
16
|
export type Props = {
|
|
17
17
|
/**
|
|
18
|
-
* A string that uniquely identifies the
|
|
18
|
+
* A string that uniquely identifies the layer in the style to which it is added.
|
|
19
19
|
*/
|
|
20
20
|
id: string;
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* The id refers to en existing layer in the style. Does not create a new layer.
|
|
24
|
+
*/
|
|
25
|
+
existing?: boolean;
|
|
26
|
+
|
|
22
27
|
/**
|
|
23
28
|
* The source from which to obtain the data to style.
|
|
24
29
|
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
@@ -16,6 +16,11 @@ export type Props = {
|
|
|
16
16
|
*/
|
|
17
17
|
id: string;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* The id refers to en existing layer in the style. Does not create a new layer.
|
|
21
|
+
*/
|
|
22
|
+
existing?: boolean;
|
|
23
|
+
|
|
19
24
|
/**
|
|
20
25
|
* The source from which to obtain the data to style.
|
|
21
26
|
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import headingIcon from '../assets/heading.png';
|
|
4
|
+
import { BaseProps } from '../types/BaseProps';
|
|
5
|
+
|
|
6
|
+
import { SymbolLayer } from './SymbolLayer';
|
|
7
|
+
import Images from './Images';
|
|
8
|
+
|
|
9
|
+
const style = {
|
|
10
|
+
iconImage: 'userLocationHeading',
|
|
11
|
+
iconAllowOverlap: true,
|
|
12
|
+
iconPitchAlignment: 'map',
|
|
13
|
+
iconRotationAlignment: 'map',
|
|
14
|
+
} as const;
|
|
15
|
+
|
|
16
|
+
type Props = BaseProps & {
|
|
17
|
+
heading?: number;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const HeadingIndicator = ({ heading }: Props) => {
|
|
21
|
+
return (
|
|
22
|
+
<React.Fragment key="mapboxUserLocationHeadingIndicatorWrapper">
|
|
23
|
+
<Images
|
|
24
|
+
images={{ userLocationHeading: headingIcon }}
|
|
25
|
+
key="mapboxUserLocationHeadingImages"
|
|
26
|
+
/>
|
|
27
|
+
<SymbolLayer
|
|
28
|
+
key="mapboxUserLocationHeadingIndicator"
|
|
29
|
+
id="mapboxUserLocationHeadingIndicator"
|
|
30
|
+
sourceID="mapboxUserLocation"
|
|
31
|
+
belowLayerID="mapboxUserLocationWhiteCircle"
|
|
32
|
+
style={{
|
|
33
|
+
iconRotate: heading,
|
|
34
|
+
...style,
|
|
35
|
+
}}
|
|
36
|
+
/>
|
|
37
|
+
</React.Fragment>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default HeadingIndicator;
|
|
@@ -15,10 +15,15 @@ export const NATIVE_MODULE_NAME = 'RCTMGLHeatmapLayer';
|
|
|
15
15
|
|
|
16
16
|
export type Props = {
|
|
17
17
|
/**
|
|
18
|
-
* A string that uniquely identifies the
|
|
18
|
+
* A string that uniquely identifies the layer in the style to which it is added.
|
|
19
19
|
*/
|
|
20
20
|
id: string;
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* The id refers to en existing layer in the style. Does not create a new layer.
|
|
24
|
+
*/
|
|
25
|
+
existing?: boolean;
|
|
26
|
+
|
|
22
27
|
/**
|
|
23
28
|
* The source from which to obtain the data to style.
|
|
24
29
|
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
@@ -20,6 +20,11 @@ type Props = BaseProps & {
|
|
|
20
20
|
*/
|
|
21
21
|
id: string;
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The id refers to en existing source in the style. Does not create a new source.
|
|
25
|
+
*/
|
|
26
|
+
existing?: boolean;
|
|
27
|
+
|
|
23
28
|
/**
|
|
24
29
|
* An HTTP(S) URL, absolute file URL, or local file URL to the source image.
|
|
25
30
|
* Gifs are currently not supported.
|
|
@@ -16,6 +16,11 @@ export type Props = {
|
|
|
16
16
|
*/
|
|
17
17
|
id: string;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* The id refers to en existing layer in the style. Does not create a new layer.
|
|
21
|
+
*/
|
|
22
|
+
existing?: boolean;
|
|
23
|
+
|
|
19
24
|
/**
|
|
20
25
|
* The source from which to obtain the data to style.
|
|
21
26
|
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
@@ -78,6 +78,16 @@ export type MapState = {
|
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* label localization settings (v10 only)
|
|
83
|
+
*/
|
|
84
|
+
type LocalizeLabels = {
|
|
85
|
+
/** locale code like `es` or `current` for the device's current locale */
|
|
86
|
+
locale: string;
|
|
87
|
+
/** layer id to localize. If not specified, all layers will be localized */
|
|
88
|
+
layerIds?: string[];
|
|
89
|
+
};
|
|
90
|
+
|
|
81
91
|
type Props = ViewProps & {
|
|
82
92
|
/**
|
|
83
93
|
* The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport.
|
|
@@ -110,12 +120,6 @@ type Props = ViewProps & {
|
|
|
110
120
|
*/
|
|
111
121
|
preferredFramesPerSecond?: number;
|
|
112
122
|
|
|
113
|
-
/**
|
|
114
|
-
* Automatically change the language of the map labels to the system’s preferred language,
|
|
115
|
-
* this is not something that can be toggled on/off
|
|
116
|
-
*/
|
|
117
|
-
localizeLabels?: boolean;
|
|
118
|
-
|
|
119
123
|
/**
|
|
120
124
|
* Enable/Disable zoom on the map
|
|
121
125
|
*/
|
|
@@ -214,6 +218,12 @@ type Props = ViewProps & {
|
|
|
214
218
|
*/
|
|
215
219
|
surfaceView?: boolean;
|
|
216
220
|
|
|
221
|
+
/**
|
|
222
|
+
* [`mapbox` (v10) implementation only]
|
|
223
|
+
* Set map's label locale, e.g. { "locale": "es" } will localize labels to Spanish, { "locale": "current" } will localize labels to system locale.
|
|
224
|
+
*/
|
|
225
|
+
localizeLabels?: LocalizeLabels;
|
|
226
|
+
|
|
217
227
|
/**
|
|
218
228
|
* Map press listener, gets called when a user presses the map
|
|
219
229
|
*/
|
|
@@ -371,7 +381,6 @@ class MapView extends NativeBridgeComponent(
|
|
|
371
381
|
) {
|
|
372
382
|
static defaultProps: Props = {
|
|
373
383
|
projection: 'mercator',
|
|
374
|
-
localizeLabels: false,
|
|
375
384
|
scrollEnabled: true,
|
|
376
385
|
pitchEnabled: true,
|
|
377
386
|
rotateEnabled: true,
|
|
@@ -934,6 +943,20 @@ class MapView extends NativeBridgeComponent(
|
|
|
934
943
|
}
|
|
935
944
|
}
|
|
936
945
|
|
|
946
|
+
_setLocalizeLabels(props: Props) {
|
|
947
|
+
if (!MapboxGL.MapboxV10) {
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
if (typeof props.localizeLabels === 'boolean') {
|
|
951
|
+
console.warn(
|
|
952
|
+
'boolean value of localizeLabels is deprecated. Please set this as Locale object instead',
|
|
953
|
+
);
|
|
954
|
+
props.localizeLabels = {
|
|
955
|
+
locale: 'current',
|
|
956
|
+
};
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
|
|
937
960
|
render() {
|
|
938
961
|
const props = {
|
|
939
962
|
...this.props,
|
|
@@ -942,6 +965,7 @@ class MapView extends NativeBridgeComponent(
|
|
|
942
965
|
};
|
|
943
966
|
|
|
944
967
|
this._setStyleURL(props);
|
|
968
|
+
this._setLocalizeLabels(props);
|
|
945
969
|
|
|
946
970
|
const callbacks = {
|
|
947
971
|
ref: (nativeRef: RCTMGLMapViewRefType) => this._setNativeRef(nativeRef),
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
Platform,
|
|
6
6
|
type ViewProps,
|
|
7
7
|
} from 'react-native';
|
|
8
|
-
import {
|
|
8
|
+
import { Feature, Point } from 'geojson';
|
|
9
9
|
|
|
10
10
|
import { toJSONString, isFunction } from '../utils';
|
|
11
11
|
import { makePoint } from '../utils/geoUtils';
|
|
@@ -24,9 +24,13 @@ const styles = StyleSheet.create({
|
|
|
24
24
|
},
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
type FeaturePayload =
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
type FeaturePayload = Feature<
|
|
28
|
+
Point,
|
|
29
|
+
{
|
|
30
|
+
screenPointX: number;
|
|
31
|
+
screenPointY: number;
|
|
32
|
+
}
|
|
33
|
+
>;
|
|
30
34
|
|
|
31
35
|
type Props = BaseProps & {
|
|
32
36
|
/**
|
|
@@ -19,6 +19,11 @@ type Props = {
|
|
|
19
19
|
*/
|
|
20
20
|
id: string;
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* The id refers to en existing source in the style. Does not create a new source.
|
|
24
|
+
*/
|
|
25
|
+
existing?: boolean;
|
|
26
|
+
|
|
22
27
|
/**
|
|
23
28
|
* A URL to a TileJSON configuration file describing the source’s contents and other metadata.
|
|
24
29
|
*/
|
|
@@ -12,10 +12,15 @@ export const NATIVE_MODULE_NAME = 'RCTMGLRasterLayer';
|
|
|
12
12
|
|
|
13
13
|
export type Props = {
|
|
14
14
|
/**
|
|
15
|
-
* A string that uniquely identifies the
|
|
15
|
+
* A string that uniquely identifies the layer in the style to which it is added.
|
|
16
16
|
*/
|
|
17
17
|
id: string;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* The id refers to en existing layer in the style. Does not create a new layer.
|
|
21
|
+
*/
|
|
22
|
+
existing?: boolean;
|
|
23
|
+
|
|
19
24
|
/**
|
|
20
25
|
* The source from which to obtain the data to style.
|
|
21
26
|
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
@@ -20,6 +20,11 @@ type Props = BaseProps & {
|
|
|
20
20
|
*/
|
|
21
21
|
id: string;
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The id refers to en existing source in the style. Does not create a new source.
|
|
25
|
+
*/
|
|
26
|
+
existing?: boolean;
|
|
27
|
+
|
|
23
28
|
/**
|
|
24
29
|
* A URL to a TileJSON configuration file describing the source’s contents and other metadata.
|
|
25
30
|
*/
|
|
@@ -33,6 +33,11 @@ export type Props = {
|
|
|
33
33
|
*/
|
|
34
34
|
id: string;
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* The id refers to en existing source in the style. Does not create a new source.
|
|
38
|
+
*/
|
|
39
|
+
existing?: boolean;
|
|
40
|
+
|
|
36
41
|
/**
|
|
37
42
|
* An HTTP(S) URL, absolute file URL, or local file URL relative to the current application’s resource bundle.
|
|
38
43
|
*/
|
|
@@ -16,6 +16,11 @@ export type Props = {
|
|
|
16
16
|
*/
|
|
17
17
|
id: string;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* The id refers to en existing layer in the style. Does not create a new layer.
|
|
21
|
+
*/
|
|
22
|
+
existing?: boolean;
|
|
23
|
+
|
|
19
24
|
/**
|
|
20
25
|
* The source from which to obtain the data to style.
|
|
21
26
|
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
@@ -12,10 +12,15 @@ export const NATIVE_MODULE_NAME = 'RCTMGLSymbolLayer';
|
|
|
12
12
|
|
|
13
13
|
export type Props = {
|
|
14
14
|
/**
|
|
15
|
-
* A string that uniquely identifies the
|
|
15
|
+
* A string that uniquely identifies the layer in the style to which it is added.
|
|
16
16
|
*/
|
|
17
17
|
id: string;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* The id refers to en existing layer in the style. Does not create a new layer.
|
|
21
|
+
*/
|
|
22
|
+
existing?: boolean;
|
|
23
|
+
|
|
19
24
|
/**
|
|
20
25
|
* The source from which to obtain the data to style.
|
|
21
26
|
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
@@ -53,7 +53,7 @@ const normalIcon = (
|
|
|
53
53
|
style={layerStyles.normal.foreground}
|
|
54
54
|
/>,
|
|
55
55
|
...(showsUserHeadingIndicator && typeof heading === 'number'
|
|
56
|
-
? [HeadingIndicator({ heading })]
|
|
56
|
+
? [HeadingIndicator({ heading, key: 'mapboxUserLocationHeadingIndicator' })]
|
|
57
57
|
: []),
|
|
58
58
|
];
|
|
59
59
|
|
|
@@ -82,7 +82,7 @@ type Props = {
|
|
|
82
82
|
/**
|
|
83
83
|
* Custom location icon of type mapbox-gl-native components
|
|
84
84
|
*/
|
|
85
|
-
children?: ReactElement;
|
|
85
|
+
children?: ReactElement | ReactElement[];
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* Minimum amount of movement before GPS location is updated in meters
|
|
@@ -24,6 +24,11 @@ interface Props {
|
|
|
24
24
|
*/
|
|
25
25
|
id: string;
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* The id refers to en existing source in the style. Does not create a new source.
|
|
29
|
+
*/
|
|
30
|
+
existing?: boolean;
|
|
31
|
+
|
|
27
32
|
/**
|
|
28
33
|
* A URL to a TileJSON configuration file describing the source’s contents and other metadata.
|
|
29
34
|
*/
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
Image,
|
|
8
8
|
ImageSourcePropType,
|
|
9
9
|
} from 'react-native';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
10
|
|
|
12
11
|
function getAndroidManagerInstance(module: string) {
|
|
13
12
|
const haveViewManagerConfig =
|
|
@@ -21,13 +20,6 @@ function getIosManagerInstance(module: string): any {
|
|
|
21
20
|
return NativeModules[getIOSModuleName(module)];
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
export const ornamentPositionPropType = PropTypes.oneOfType([
|
|
25
|
-
PropTypes.shape({ top: PropTypes.number, left: PropTypes.number }),
|
|
26
|
-
PropTypes.shape({ top: PropTypes.number, right: PropTypes.number }),
|
|
27
|
-
PropTypes.shape({ bottom: PropTypes.number, left: PropTypes.number }),
|
|
28
|
-
PropTypes.shape({ bottom: PropTypes.number, right: PropTypes.number }),
|
|
29
|
-
]);
|
|
30
|
-
|
|
31
23
|
export function isAndroid(): boolean {
|
|
32
24
|
return Platform.OS === 'android';
|
|
33
25
|
}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
// DO NOT MODIFY
|
|
2
|
+
// THIS FILE IS AUTOGENERATED
|
|
3
|
+
|
|
4
|
+
import { isAndroid } from './index';
|
|
5
|
+
|
|
6
|
+
export const StyleTypes = {
|
|
7
|
+
Constant: 'constant',
|
|
8
|
+
Color: 'color',
|
|
9
|
+
Transition: 'transition',
|
|
10
|
+
Translation: 'translation',
|
|
11
|
+
Function: 'function',
|
|
12
|
+
Image: 'image',
|
|
13
|
+
Enum: 'enum',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function getStyleType(styleProp: keyof typeof styleExtras) {
|
|
17
|
+
if (!isAndroid() && styleExtras[styleProp]) {
|
|
18
|
+
return styleExtras[styleProp].iosType;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (styleMap[styleProp]) {
|
|
22
|
+
return styleMap[styleProp];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
throw new Error(`${styleProp} is not a valid Mapbox layer style`);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const styleMap = {
|
|
29
|
+
fillSortKey: StyleTypes.Constant,
|
|
30
|
+
fillAntialias: StyleTypes.Constant,
|
|
31
|
+
fillOpacity: StyleTypes.Constant,
|
|
32
|
+
fillOpacityTransition: StyleTypes.Transition,
|
|
33
|
+
fillColor: StyleTypes.Color,
|
|
34
|
+
fillColorTransition: StyleTypes.Transition,
|
|
35
|
+
fillOutlineColor: StyleTypes.Color,
|
|
36
|
+
fillOutlineColorTransition: StyleTypes.Transition,
|
|
37
|
+
fillTranslate: StyleTypes.Translation,
|
|
38
|
+
fillTranslateTransition: StyleTypes.Transition,
|
|
39
|
+
fillTranslateAnchor: StyleTypes.Enum,
|
|
40
|
+
fillPattern: StyleTypes.Image,
|
|
41
|
+
|
|
42
|
+
lineCap: StyleTypes.Enum,
|
|
43
|
+
lineJoin: StyleTypes.Enum,
|
|
44
|
+
lineMiterLimit: StyleTypes.Constant,
|
|
45
|
+
lineRoundLimit: StyleTypes.Constant,
|
|
46
|
+
lineSortKey: StyleTypes.Constant,
|
|
47
|
+
lineOpacity: StyleTypes.Constant,
|
|
48
|
+
lineOpacityTransition: StyleTypes.Transition,
|
|
49
|
+
lineColor: StyleTypes.Color,
|
|
50
|
+
lineColorTransition: StyleTypes.Transition,
|
|
51
|
+
lineTranslate: StyleTypes.Translation,
|
|
52
|
+
lineTranslateTransition: StyleTypes.Transition,
|
|
53
|
+
lineTranslateAnchor: StyleTypes.Enum,
|
|
54
|
+
lineWidth: StyleTypes.Constant,
|
|
55
|
+
lineWidthTransition: StyleTypes.Transition,
|
|
56
|
+
lineGapWidth: StyleTypes.Constant,
|
|
57
|
+
lineGapWidthTransition: StyleTypes.Transition,
|
|
58
|
+
lineOffset: StyleTypes.Constant,
|
|
59
|
+
lineOffsetTransition: StyleTypes.Transition,
|
|
60
|
+
lineBlur: StyleTypes.Constant,
|
|
61
|
+
lineBlurTransition: StyleTypes.Transition,
|
|
62
|
+
lineDasharray: StyleTypes.Constant,
|
|
63
|
+
linePattern: StyleTypes.Image,
|
|
64
|
+
lineGradient: StyleTypes.Color,
|
|
65
|
+
lineTrimOffset: StyleTypes.Constant,
|
|
66
|
+
|
|
67
|
+
symbolPlacement: StyleTypes.Enum,
|
|
68
|
+
symbolSpacing: StyleTypes.Constant,
|
|
69
|
+
symbolAvoidEdges: StyleTypes.Constant,
|
|
70
|
+
symbolSortKey: StyleTypes.Constant,
|
|
71
|
+
symbolZOrder: StyleTypes.Enum,
|
|
72
|
+
iconAllowOverlap: StyleTypes.Constant,
|
|
73
|
+
iconIgnorePlacement: StyleTypes.Constant,
|
|
74
|
+
iconOptional: StyleTypes.Constant,
|
|
75
|
+
iconRotationAlignment: StyleTypes.Enum,
|
|
76
|
+
iconSize: StyleTypes.Constant,
|
|
77
|
+
iconTextFit: StyleTypes.Enum,
|
|
78
|
+
iconTextFitPadding: StyleTypes.Constant,
|
|
79
|
+
iconImage: StyleTypes.Image,
|
|
80
|
+
iconRotate: StyleTypes.Constant,
|
|
81
|
+
iconPadding: StyleTypes.Constant,
|
|
82
|
+
iconKeepUpright: StyleTypes.Constant,
|
|
83
|
+
iconOffset: StyleTypes.Constant,
|
|
84
|
+
iconAnchor: StyleTypes.Enum,
|
|
85
|
+
iconPitchAlignment: StyleTypes.Enum,
|
|
86
|
+
textPitchAlignment: StyleTypes.Enum,
|
|
87
|
+
textRotationAlignment: StyleTypes.Enum,
|
|
88
|
+
textField: StyleTypes.Constant,
|
|
89
|
+
textFont: StyleTypes.Constant,
|
|
90
|
+
textSize: StyleTypes.Constant,
|
|
91
|
+
textMaxWidth: StyleTypes.Constant,
|
|
92
|
+
textLineHeight: StyleTypes.Constant,
|
|
93
|
+
textLetterSpacing: StyleTypes.Constant,
|
|
94
|
+
textJustify: StyleTypes.Enum,
|
|
95
|
+
textRadialOffset: StyleTypes.Constant,
|
|
96
|
+
textVariableAnchor: StyleTypes.Constant,
|
|
97
|
+
textAnchor: StyleTypes.Enum,
|
|
98
|
+
textMaxAngle: StyleTypes.Constant,
|
|
99
|
+
textWritingMode: StyleTypes.Constant,
|
|
100
|
+
textRotate: StyleTypes.Constant,
|
|
101
|
+
textPadding: StyleTypes.Constant,
|
|
102
|
+
textKeepUpright: StyleTypes.Constant,
|
|
103
|
+
textTransform: StyleTypes.Enum,
|
|
104
|
+
textOffset: StyleTypes.Constant,
|
|
105
|
+
textAllowOverlap: StyleTypes.Constant,
|
|
106
|
+
textIgnorePlacement: StyleTypes.Constant,
|
|
107
|
+
textOptional: StyleTypes.Constant,
|
|
108
|
+
iconOpacity: StyleTypes.Constant,
|
|
109
|
+
iconOpacityTransition: StyleTypes.Transition,
|
|
110
|
+
iconColor: StyleTypes.Color,
|
|
111
|
+
iconColorTransition: StyleTypes.Transition,
|
|
112
|
+
iconHaloColor: StyleTypes.Color,
|
|
113
|
+
iconHaloColorTransition: StyleTypes.Transition,
|
|
114
|
+
iconHaloWidth: StyleTypes.Constant,
|
|
115
|
+
iconHaloWidthTransition: StyleTypes.Transition,
|
|
116
|
+
iconHaloBlur: StyleTypes.Constant,
|
|
117
|
+
iconHaloBlurTransition: StyleTypes.Transition,
|
|
118
|
+
iconTranslate: StyleTypes.Translation,
|
|
119
|
+
iconTranslateTransition: StyleTypes.Transition,
|
|
120
|
+
iconTranslateAnchor: StyleTypes.Enum,
|
|
121
|
+
textOpacity: StyleTypes.Constant,
|
|
122
|
+
textOpacityTransition: StyleTypes.Transition,
|
|
123
|
+
textColor: StyleTypes.Color,
|
|
124
|
+
textColorTransition: StyleTypes.Transition,
|
|
125
|
+
textHaloColor: StyleTypes.Color,
|
|
126
|
+
textHaloColorTransition: StyleTypes.Transition,
|
|
127
|
+
textHaloWidth: StyleTypes.Constant,
|
|
128
|
+
textHaloWidthTransition: StyleTypes.Transition,
|
|
129
|
+
textHaloBlur: StyleTypes.Constant,
|
|
130
|
+
textHaloBlurTransition: StyleTypes.Transition,
|
|
131
|
+
textTranslate: StyleTypes.Translation,
|
|
132
|
+
textTranslateTransition: StyleTypes.Transition,
|
|
133
|
+
textTranslateAnchor: StyleTypes.Enum,
|
|
134
|
+
|
|
135
|
+
circleSortKey: StyleTypes.Constant,
|
|
136
|
+
circleRadius: StyleTypes.Constant,
|
|
137
|
+
circleRadiusTransition: StyleTypes.Transition,
|
|
138
|
+
circleColor: StyleTypes.Color,
|
|
139
|
+
circleColorTransition: StyleTypes.Transition,
|
|
140
|
+
circleBlur: StyleTypes.Constant,
|
|
141
|
+
circleBlurTransition: StyleTypes.Transition,
|
|
142
|
+
circleOpacity: StyleTypes.Constant,
|
|
143
|
+
circleOpacityTransition: StyleTypes.Transition,
|
|
144
|
+
circleTranslate: StyleTypes.Translation,
|
|
145
|
+
circleTranslateTransition: StyleTypes.Transition,
|
|
146
|
+
circleTranslateAnchor: StyleTypes.Enum,
|
|
147
|
+
circlePitchScale: StyleTypes.Enum,
|
|
148
|
+
circlePitchAlignment: StyleTypes.Enum,
|
|
149
|
+
circleStrokeWidth: StyleTypes.Constant,
|
|
150
|
+
circleStrokeWidthTransition: StyleTypes.Transition,
|
|
151
|
+
circleStrokeColor: StyleTypes.Color,
|
|
152
|
+
circleStrokeColorTransition: StyleTypes.Transition,
|
|
153
|
+
circleStrokeOpacity: StyleTypes.Constant,
|
|
154
|
+
circleStrokeOpacityTransition: StyleTypes.Transition,
|
|
155
|
+
|
|
156
|
+
heatmapRadius: StyleTypes.Constant,
|
|
157
|
+
heatmapRadiusTransition: StyleTypes.Transition,
|
|
158
|
+
heatmapWeight: StyleTypes.Constant,
|
|
159
|
+
heatmapIntensity: StyleTypes.Constant,
|
|
160
|
+
heatmapIntensityTransition: StyleTypes.Transition,
|
|
161
|
+
heatmapColor: StyleTypes.Color,
|
|
162
|
+
heatmapOpacity: StyleTypes.Constant,
|
|
163
|
+
heatmapOpacityTransition: StyleTypes.Transition,
|
|
164
|
+
|
|
165
|
+
fillExtrusionOpacity: StyleTypes.Constant,
|
|
166
|
+
fillExtrusionOpacityTransition: StyleTypes.Transition,
|
|
167
|
+
fillExtrusionColor: StyleTypes.Color,
|
|
168
|
+
fillExtrusionColorTransition: StyleTypes.Transition,
|
|
169
|
+
fillExtrusionTranslate: StyleTypes.Translation,
|
|
170
|
+
fillExtrusionTranslateTransition: StyleTypes.Transition,
|
|
171
|
+
fillExtrusionTranslateAnchor: StyleTypes.Enum,
|
|
172
|
+
fillExtrusionPattern: StyleTypes.Image,
|
|
173
|
+
fillExtrusionHeight: StyleTypes.Constant,
|
|
174
|
+
fillExtrusionHeightTransition: StyleTypes.Transition,
|
|
175
|
+
fillExtrusionBase: StyleTypes.Constant,
|
|
176
|
+
fillExtrusionBaseTransition: StyleTypes.Transition,
|
|
177
|
+
fillExtrusionVerticalGradient: StyleTypes.Constant,
|
|
178
|
+
|
|
179
|
+
rasterOpacity: StyleTypes.Constant,
|
|
180
|
+
rasterOpacityTransition: StyleTypes.Transition,
|
|
181
|
+
rasterHueRotate: StyleTypes.Constant,
|
|
182
|
+
rasterHueRotateTransition: StyleTypes.Transition,
|
|
183
|
+
rasterBrightnessMin: StyleTypes.Constant,
|
|
184
|
+
rasterBrightnessMinTransition: StyleTypes.Transition,
|
|
185
|
+
rasterBrightnessMax: StyleTypes.Constant,
|
|
186
|
+
rasterBrightnessMaxTransition: StyleTypes.Transition,
|
|
187
|
+
rasterSaturation: StyleTypes.Constant,
|
|
188
|
+
rasterSaturationTransition: StyleTypes.Transition,
|
|
189
|
+
rasterContrast: StyleTypes.Constant,
|
|
190
|
+
rasterContrastTransition: StyleTypes.Transition,
|
|
191
|
+
rasterResampling: StyleTypes.Enum,
|
|
192
|
+
rasterFadeDuration: StyleTypes.Constant,
|
|
193
|
+
|
|
194
|
+
hillshadeIlluminationDirection: StyleTypes.Constant,
|
|
195
|
+
hillshadeIlluminationAnchor: StyleTypes.Enum,
|
|
196
|
+
hillshadeExaggeration: StyleTypes.Constant,
|
|
197
|
+
hillshadeExaggerationTransition: StyleTypes.Transition,
|
|
198
|
+
hillshadeShadowColor: StyleTypes.Color,
|
|
199
|
+
hillshadeShadowColorTransition: StyleTypes.Transition,
|
|
200
|
+
hillshadeHighlightColor: StyleTypes.Color,
|
|
201
|
+
hillshadeHighlightColorTransition: StyleTypes.Transition,
|
|
202
|
+
hillshadeAccentColor: StyleTypes.Color,
|
|
203
|
+
hillshadeAccentColorTransition: StyleTypes.Transition,
|
|
204
|
+
|
|
205
|
+
backgroundColor: StyleTypes.Color,
|
|
206
|
+
backgroundColorTransition: StyleTypes.Transition,
|
|
207
|
+
backgroundPattern: StyleTypes.Image,
|
|
208
|
+
backgroundOpacity: StyleTypes.Constant,
|
|
209
|
+
backgroundOpacityTransition: StyleTypes.Transition,
|
|
210
|
+
|
|
211
|
+
skyType: StyleTypes.Enum,
|
|
212
|
+
skyAtmosphereSun: StyleTypes.Constant,
|
|
213
|
+
skyAtmosphereSunIntensity: StyleTypes.Constant,
|
|
214
|
+
skyGradientCenter: StyleTypes.Constant,
|
|
215
|
+
skyGradientRadius: StyleTypes.Constant,
|
|
216
|
+
skyGradient: StyleTypes.Color,
|
|
217
|
+
skyAtmosphereHaloColor: StyleTypes.Color,
|
|
218
|
+
skyAtmosphereColor: StyleTypes.Color,
|
|
219
|
+
skyOpacity: StyleTypes.Constant,
|
|
220
|
+
skyOpacityTransition: StyleTypes.Transition,
|
|
221
|
+
|
|
222
|
+
anchor: StyleTypes.Enum,
|
|
223
|
+
position: StyleTypes.Constant,
|
|
224
|
+
positionTransition: StyleTypes.Transition,
|
|
225
|
+
intensity: StyleTypes.Constant,
|
|
226
|
+
intensityTransition: StyleTypes.Transition,
|
|
227
|
+
|
|
228
|
+
range: StyleTypes.Constant,
|
|
229
|
+
rangeTransition: StyleTypes.Transition,
|
|
230
|
+
highColor: StyleTypes.Color,
|
|
231
|
+
highColorTransition: StyleTypes.Transition,
|
|
232
|
+
spaceColor: StyleTypes.Color,
|
|
233
|
+
spaceColorTransition: StyleTypes.Transition,
|
|
234
|
+
horizonBlend: StyleTypes.Constant,
|
|
235
|
+
horizonBlendTransition: StyleTypes.Transition,
|
|
236
|
+
starIntensity: StyleTypes.Constant,
|
|
237
|
+
starIntensityTransition: StyleTypes.Transition,
|
|
238
|
+
|
|
239
|
+
source: StyleTypes.Constant,
|
|
240
|
+
exaggeration: StyleTypes.Constant,
|
|
241
|
+
exaggerationTransition: StyleTypes.Transition,
|
|
242
|
+
|
|
243
|
+
color: StyleTypes.Color,
|
|
244
|
+
colorTransition: StyleTypes.Transition,
|
|
245
|
+
visibility: StyleTypes.Constant,
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
export const styleExtras = {
|
|
249
|
+
// padding
|
|
250
|
+
iconTextFitPadding: {
|
|
251
|
+
iosType: 'edgeinsets',
|
|
252
|
+
},
|
|
253
|
+
|
|
254
|
+
// offsets
|
|
255
|
+
iconOffset: {
|
|
256
|
+
iosType: 'vector',
|
|
257
|
+
},
|
|
258
|
+
textOffset: {
|
|
259
|
+
iosType: 'vector',
|
|
260
|
+
},
|
|
261
|
+
lineOffset: {
|
|
262
|
+
iosType: 'vector',
|
|
263
|
+
},
|
|
264
|
+
|
|
265
|
+
// translates
|
|
266
|
+
fillTranslate: {
|
|
267
|
+
iosType: 'vector',
|
|
268
|
+
},
|
|
269
|
+
lineTranslate: {
|
|
270
|
+
iosType: 'vector',
|
|
271
|
+
},
|
|
272
|
+
iconTranslate: {
|
|
273
|
+
iosType: 'vector',
|
|
274
|
+
},
|
|
275
|
+
textTranslate: {
|
|
276
|
+
iosType: 'vector',
|
|
277
|
+
},
|
|
278
|
+
circleTranslate: {
|
|
279
|
+
iosType: 'vector',
|
|
280
|
+
},
|
|
281
|
+
fillExtrusionTranslate: {
|
|
282
|
+
iosType: 'vector',
|
|
283
|
+
},
|
|
284
|
+
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
package com.mapbox.rctmgl.components.styles.layers;
|
|
2
|
-
|
|
3
|
-
import android.content.Context;
|
|
4
|
-
|
|
5
|
-
import com.mapbox.maps.extension.style.layers.generated.BackgroundLayer;
|
|
6
|
-
import com.mapbox.rctmgl.components.styles.RCTMGLStyle;
|
|
7
|
-
import com.mapbox.rctmgl.components.styles.RCTMGLStyleFactory;
|
|
8
|
-
|
|
9
|
-
public class RCTMGLBackgroundLayer extends RCTLayer<BackgroundLayer> {
|
|
10
|
-
public RCTMGLBackgroundLayer(Context context) {
|
|
11
|
-
super(context);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@Override
|
|
15
|
-
public BackgroundLayer makeLayer() {
|
|
16
|
-
return new BackgroundLayer(getID());
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@Override
|
|
20
|
-
public void addStyles() {
|
|
21
|
-
RCTMGLStyleFactory.setBackgroundLayerStyle(mLayer, new RCTMGLStyle(getContext(), mReactStyle, mMap));
|
|
22
|
-
}
|
|
23
|
-
}
|