@maplibre/maplibre-react-native 8.6.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +3 -0
- package/.eslintrc.js +158 -0
- package/.gitattributes +1 -0
- package/.nvmrc +1 -0
- package/.prettierrc.js +7 -0
- package/.sonarcloud.properties +15 -0
- package/CHANGELOG.md +367 -0
- package/CODE_OF_CONDUCT.md +2 -0
- package/CONTRIBUTING.md +34 -0
- package/LICENSE.md +9 -0
- package/README.md +224 -0
- package/RELEASE.md +30 -0
- package/android/build.gradle +34 -0
- package/android/install.md +16 -0
- package/android/rctmgl/.settings/org.eclipse.buildship.core.prefs +2 -0
- package/android/rctmgl/build.gradle +61 -0
- package/android/rctmgl/proguard-rules.pro +25 -0
- package/android/rctmgl/src/main/AndroidManifest.xml +4 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/RCTMGLPackage.java +99 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/AbstractEvent.java +35 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/AbstractEventEmitter.java +80 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/AbstractMapFeature.java +19 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/annotation/MarkerView.java +23 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/annotation/MarkerViewManager.java +67 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/annotation/RCTMGLCallout.java +15 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/annotation/RCTMGLCalloutManager.java +22 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/annotation/RCTMGLMarkerView.java +112 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/annotation/RCTMGLMarkerViewManager.java +45 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/annotation/RCTMGLPointAnnotation.java +360 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/annotation/RCTMGLPointAnnotationManager.java +88 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/camera/CameraStop.java +249 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/camera/CameraUpdateItem.java +125 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/camera/CameraUpdateQueue.java +73 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/camera/RCTMGLCamera.java +530 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/camera/RCTMGLCameraManager.java +101 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/camera/constants/CameraMode.java +22 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/images/RCTMGLImages.java +234 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/images/RCTMGLImagesManager.java +103 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/location/LocationComponentManager.java +149 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/location/RCTMGLNativeUserLocation.java +66 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/location/RCTMGLNativeUserLocationManager.java +35 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/mapview/LayerSourceInfo.java +59 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/mapview/RCTMGLAndroidTextureMapView.java +16 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/mapview/RCTMGLAndroidTextureMapViewManager.java +31 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.java +1527 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/mapview/RCTMGLMapViewManager.java +353 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/mapview/helpers/CameraChangeTracker.java +41 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/RCTMGLStyle.java +83 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +2242 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/RCTMGLStyleFunctionParser.java +108 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/RCTMGLStyleValue.java +212 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTLayer.java +287 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayer.java +27 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayerManager.java +64 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayer.java +55 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayerManager.java +77 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayer.java +55 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayerManager.java +80 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayer.java +55 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayerManager.java +80 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayer.java +55 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayerManager.java +77 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayer.java +55 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayerManager.java +79 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayer.java +27 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayerManager.java +64 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayer.java +55 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayerManager.java +75 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/light/RCTMGLLight.java +65 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/light/RCTMGLLightManager.java +29 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSource.java +81 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSourceManager.java +72 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSource.java +45 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSourceManager.java +44 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLShapeSource.java +302 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLShapeSourceManager.java +227 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSource.java +97 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSourceManager.java +80 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSource.java +64 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSourceManager.java +84 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTSource.java +244 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/AbstractEvent.java +66 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/AndroidCallbackEvent.java +38 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/EventEmitter.java +45 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/FeatureClickEvent.java +79 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/IEvent.java +18 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/ImageMissingEvent.java +42 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/LocationEvent.java +100 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/MapChangeEvent.java +47 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/MapClickEvent.java +51 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/MapUserTrackingModeEvent.java +36 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/OfflineEvent.java +29 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/PointAnnotationClickEvent.java +46 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/PointAnnotationDragEvent.java +51 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/constants/EventKeys.java +39 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/events/constants/EventTypes.java +51 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/http/CustomHeadersInterceptor.java +38 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/location/LocationManager.java +168 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/location/UserLocation.java +63 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/location/UserLocationVerticalAlignment.java +11 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/location/UserTrackingMode.java +63 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/location/UserTrackingState.java +19 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/modules/RCTMGLLocationModule.java +158 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/modules/RCTMGLLogging.java +140 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/modules/RCTMGLModule.java +348 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/modules/RCTMGLOfflineModule.java +597 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/modules/RCTMGLSnapshotModule.java +139 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/utils/BitmapUtils.java +129 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/utils/ConvertUtils.java +257 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/utils/DownloadMapImageTask.java +159 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/utils/ExpressionParser.java +74 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/utils/GeoJSONUtils.java +209 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/utils/GeoViewport.java +38 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/utils/ImageEntry.java +25 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/utils/ResourceUtils.java +30 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/utils/SimpleEventCallback.java +30 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/utils/SphericalMercator.java +69 -0
- package/android/rctmgl/src/main/res/drawable/empty.xml +5 -0
- package/android/rctmgl/src/main/res/drawable/empty_drawable.png +0 -0
- package/android/rctmgl/src/main/res/drawable-xxhdpi/red_marker.png +0 -0
- package/android/rctmgl/src/main/res/layout/annotation.xml +17 -0
- package/android/rctmgl/src/main/res/values/strings.xml +3 -0
- package/android/settings.gradle +1 -0
- package/app.plugin.js +1 -0
- package/assets/heading.png +0 -0
- package/assets/heading@2x.png +0 -0
- package/assets/heading@3x.png +0 -0
- package/assets/indoor_building_map_android.png +0 -0
- package/assets/indoor_building_map_ios.png +0 -0
- package/assets/mapbox_logo.png +0 -0
- package/babel.config.js +9 -0
- package/docs/Annotation.md +39 -0
- package/docs/Annotations.md +17 -0
- package/docs/BackgroundLayer.md +166 -0
- package/docs/Callout.md +15 -0
- package/docs/Camera.md +162 -0
- package/docs/CircleLayer.md +453 -0
- package/docs/CustomHttpHeaders.md +87 -0
- package/docs/FillExtrusionLayer.md +327 -0
- package/docs/FillLayer.md +293 -0
- package/docs/GettingStarted.md +72 -0
- package/docs/HeadingIndicator.md +10 -0
- package/docs/HeatmapLayer.md +215 -0
- package/docs/ImageSource.md +12 -0
- package/docs/Images.md +12 -0
- package/docs/Light.md +159 -0
- package/docs/LineLayer.md +567 -0
- package/docs/Logger.md +23 -0
- package/docs/MapView.md +211 -0
- package/docs/MapboxGL.md +65 -0
- package/docs/MarkerView.md +14 -0
- package/docs/NativeUserLocation.md +11 -0
- package/docs/OfflineManager.md +246 -0
- package/docs/PointAnnotation.md +34 -0
- package/docs/RasterLayer.md +357 -0
- package/docs/RasterSource.md +17 -0
- package/docs/ShapeSource.md +100 -0
- package/docs/Style.md +10 -0
- package/docs/StyleSheet.md +430 -0
- package/docs/SymbolLayer.md +1658 -0
- package/docs/UserLocation.md +39 -0
- package/docs/VectorSource.md +48 -0
- package/docs/docs.json +6093 -0
- package/docs/snapshotManager.md +53 -0
- package/index.d.ts +953 -0
- package/ios/RCTMGL/CameraMode.h +18 -0
- package/ios/RCTMGL/CameraMode.m +18 -0
- package/ios/RCTMGL/CameraStop.h +26 -0
- package/ios/RCTMGL/CameraStop.m +83 -0
- package/ios/RCTMGL/CameraUpdateItem.h +18 -0
- package/ios/RCTMGL/CameraUpdateItem.m +178 -0
- package/ios/RCTMGL/CameraUpdateQueue.h +21 -0
- package/ios/RCTMGL/CameraUpdateQueue.m +74 -0
- package/ios/RCTMGL/FilterParser.h +14 -0
- package/ios/RCTMGL/FilterParser.m +22 -0
- package/ios/RCTMGL/MGLCustomHeaders.h +20 -0
- package/ios/RCTMGL/MGLCustomHeaders.m +98 -0
- package/ios/RCTMGL/MGLFaux3DUserLocationAnnotationView.h +23 -0
- package/ios/RCTMGL/MGLFaux3DUserLocationAnnotationView.m +474 -0
- package/ios/RCTMGL/MGLModule.h +13 -0
- package/ios/RCTMGL/MGLModule.m +269 -0
- package/ios/RCTMGL/MGLOfflineModule.h +19 -0
- package/ios/RCTMGL/MGLOfflineModule.m +516 -0
- package/ios/RCTMGL/MGLSnapshotModule.h +13 -0
- package/ios/RCTMGL/MGLSnapshotModule.m +80 -0
- package/ios/RCTMGL/MGLUserLocationHeadingArrowLayer.h +11 -0
- package/ios/RCTMGL/MGLUserLocationHeadingArrowLayer.m +57 -0
- package/ios/RCTMGL/MGLUserLocationHeadingBeamLayer.h +11 -0
- package/ios/RCTMGL/MGLUserLocationHeadingBeamLayer.m +102 -0
- package/ios/RCTMGL/MGLUserLocationHeadingIndicator.h +10 -0
- package/ios/RCTMGL/RCTConvert+Mapbox.h +16 -0
- package/ios/RCTMGL/RCTConvert+Mapbox.m +32 -0
- package/ios/RCTMGL/RCTMGL.h +13 -0
- package/ios/RCTMGL/RCTMGL.m +13 -0
- package/ios/RCTMGL/RCTMGLBackgroundLayer.h +14 -0
- package/ios/RCTMGL/RCTMGLBackgroundLayer.m +27 -0
- package/ios/RCTMGL/RCTMGLBackgroundLayerManager.h +13 -0
- package/ios/RCTMGL/RCTMGLBackgroundLayerManager.m +35 -0
- package/ios/RCTMGL/RCTMGLCallout.h +15 -0
- package/ios/RCTMGL/RCTMGLCallout.m +74 -0
- package/ios/RCTMGL/RCTMGLCalloutManager.h +13 -0
- package/ios/RCTMGL/RCTMGLCalloutManager.m +21 -0
- package/ios/RCTMGL/RCTMGLCamera.h +39 -0
- package/ios/RCTMGL/RCTMGLCamera.m +258 -0
- package/ios/RCTMGL/RCTMGLCameraManager.h +13 -0
- package/ios/RCTMGL/RCTMGLCameraManager.m +52 -0
- package/ios/RCTMGL/RCTMGLCircleLayer.h +13 -0
- package/ios/RCTMGL/RCTMGLCircleLayer.m +34 -0
- package/ios/RCTMGL/RCTMGLCircleLayerManager.h +13 -0
- package/ios/RCTMGL/RCTMGLCircleLayerManager.m +39 -0
- package/ios/RCTMGL/RCTMGLEvent.h +21 -0
- package/ios/RCTMGL/RCTMGLEvent.m +47 -0
- package/ios/RCTMGL/RCTMGLEventProtocol.h +16 -0
- package/ios/RCTMGL/RCTMGLEventTypes.h +50 -0
- package/ios/RCTMGL/RCTMGLEventTypes.m +49 -0
- package/ios/RCTMGL/RCTMGLFillExtrusionLayer.h +14 -0
- package/ios/RCTMGL/RCTMGLFillExtrusionLayer.m +32 -0
- package/ios/RCTMGL/RCTMGLFillExtrusionLayerManager.h +13 -0
- package/ios/RCTMGL/RCTMGLFillExtrusionLayerManager.m +39 -0
- package/ios/RCTMGL/RCTMGLFillLayer.h +14 -0
- package/ios/RCTMGL/RCTMGLFillLayer.m +33 -0
- package/ios/RCTMGL/RCTMGLFillLayerManager.h +13 -0
- package/ios/RCTMGL/RCTMGLFillLayerManager.m +37 -0
- package/ios/RCTMGL/RCTMGLHeatmapLayer.h +12 -0
- package/ios/RCTMGL/RCTMGLHeatmapLayer.m +30 -0
- package/ios/RCTMGL/RCTMGLHeatmapLayerManager.h +12 -0
- package/ios/RCTMGL/RCTMGLHeatmapLayerManager.m +38 -0
- package/ios/RCTMGL/RCTMGLImageQueue.h +19 -0
- package/ios/RCTMGL/RCTMGLImageQueue.m +57 -0
- package/ios/RCTMGL/RCTMGLImageQueueOperation.h +17 -0
- package/ios/RCTMGL/RCTMGLImageQueueOperation.m +138 -0
- package/ios/RCTMGL/RCTMGLImageSource.h +16 -0
- package/ios/RCTMGL/RCTMGLImageSource.m +60 -0
- package/ios/RCTMGL/RCTMGLImageSourceManager.h +13 -0
- package/ios/RCTMGL/RCTMGLImageSourceManager.m +25 -0
- package/ios/RCTMGL/RCTMGLImages.h +25 -0
- package/ios/RCTMGL/RCTMGLImages.m +126 -0
- package/ios/RCTMGL/RCTMGLImagesManager.h +5 -0
- package/ios/RCTMGL/RCTMGLImagesManager.m +21 -0
- package/ios/RCTMGL/RCTMGLLayer.h +52 -0
- package/ios/RCTMGL/RCTMGLLayer.m +236 -0
- package/ios/RCTMGL/RCTMGLLight.h +17 -0
- package/ios/RCTMGL/RCTMGLLight.m +46 -0
- package/ios/RCTMGL/RCTMGLLightManager.h +13 -0
- package/ios/RCTMGL/RCTMGLLightManager.m +23 -0
- package/ios/RCTMGL/RCTMGLLineLayer.h +14 -0
- package/ios/RCTMGL/RCTMGLLineLayer.m +33 -0
- package/ios/RCTMGL/RCTMGLLineLayerManager.h +13 -0
- package/ios/RCTMGL/RCTMGLLineLayerManager.m +40 -0
- package/ios/RCTMGL/RCTMGLLocation.h +19 -0
- package/ios/RCTMGL/RCTMGLLocation.m +32 -0
- package/ios/RCTMGL/RCTMGLLocationManager.h +30 -0
- package/ios/RCTMGL/RCTMGLLocationManager.m +180 -0
- package/ios/RCTMGL/RCTMGLLocationManagerDelegate.h +20 -0
- package/ios/RCTMGL/RCTMGLLocationModule.h +15 -0
- package/ios/RCTMGL/RCTMGLLocationModule.m +99 -0
- package/ios/RCTMGL/RCTMGLLogging.h +18 -0
- package/ios/RCTMGL/RCTMGLLogging.m +132 -0
- package/ios/RCTMGL/RCTMGLMapTouchEvent.h +25 -0
- package/ios/RCTMGL/RCTMGLMapTouchEvent.m +77 -0
- package/ios/RCTMGL/RCTMGLMapView.h +91 -0
- package/ios/RCTMGL/RCTMGLMapView.m +536 -0
- package/ios/RCTMGL/RCTMGLMapViewManager.h +17 -0
- package/ios/RCTMGL/RCTMGLMapViewManager.m +625 -0
- package/ios/RCTMGL/RCTMGLNativeUserLocation.h +18 -0
- package/ios/RCTMGL/RCTMGLNativeUserLocation.m +49 -0
- package/ios/RCTMGL/RCTMGLNativeUserLocationManager.h +5 -0
- package/ios/RCTMGL/RCTMGLNativeUserLocationManager.m +25 -0
- package/ios/RCTMGL/RCTMGLPointAnnotation.h +41 -0
- package/ios/RCTMGL/RCTMGLPointAnnotation.m +251 -0
- package/ios/RCTMGL/RCTMGLPointAnnotationManager.h +13 -0
- package/ios/RCTMGL/RCTMGLPointAnnotationManager.m +36 -0
- package/ios/RCTMGL/RCTMGLRasterLayer.h +14 -0
- package/ios/RCTMGL/RCTMGLRasterLayer.m +30 -0
- package/ios/RCTMGL/RCTMGLRasterLayerManager.h +13 -0
- package/ios/RCTMGL/RCTMGLRasterLayerManager.m +35 -0
- package/ios/RCTMGL/RCTMGLRasterSource.h +16 -0
- package/ios/RCTMGL/RCTMGLRasterSource.m +35 -0
- package/ios/RCTMGL/RCTMGLRasterSourceManager.h +13 -0
- package/ios/RCTMGL/RCTMGLRasterSourceManager.m +32 -0
- package/ios/RCTMGL/RCTMGLShapeSource.h +52 -0
- package/ios/RCTMGL/RCTMGLShapeSource.m +180 -0
- package/ios/RCTMGL/RCTMGLShapeSourceManager.h +14 -0
- package/ios/RCTMGL/RCTMGLShapeSourceManager.m +205 -0
- package/ios/RCTMGL/RCTMGLSource.h +35 -0
- package/ios/RCTMGL/RCTMGLSource.m +143 -0
- package/ios/RCTMGL/RCTMGLStyle.h +219 -0
- package/ios/RCTMGL/RCTMGLStyle.m +1654 -0
- package/ios/RCTMGL/RCTMGLStyleValue.h +27 -0
- package/ios/RCTMGL/RCTMGLStyleValue.m +167 -0
- package/ios/RCTMGL/RCTMGLSymbolLayer.h +19 -0
- package/ios/RCTMGL/RCTMGLSymbolLayer.m +121 -0
- package/ios/RCTMGL/RCTMGLSymbolLayerManager.h +13 -0
- package/ios/RCTMGL/RCTMGLSymbolLayerManager.m +40 -0
- package/ios/RCTMGL/RCTMGLTileSource.h +22 -0
- package/ios/RCTMGL/RCTMGLTileSource.m +31 -0
- package/ios/RCTMGL/RCTMGLUserLocation.h +15 -0
- package/ios/RCTMGL/RCTMGLUserLocation.m +38 -0
- package/ios/RCTMGL/RCTMGLUtils.h +31 -0
- package/ios/RCTMGL/RCTMGLUtils.m +218 -0
- package/ios/RCTMGL/RCTMGLVectorLayer.h +15 -0
- package/ios/RCTMGL/RCTMGLVectorLayer.m +59 -0
- package/ios/RCTMGL/RCTMGLVectorSource.h +16 -0
- package/ios/RCTMGL/RCTMGLVectorSource.m +28 -0
- package/ios/RCTMGL/RCTMGLVectorSourceManager.h +14 -0
- package/ios/RCTMGL/RCTMGLVectorSourceManager.m +79 -0
- package/ios/RCTMGL/RNMBImageUtils.h +17 -0
- package/ios/RCTMGL/RNMBImageUtils.m +31 -0
- package/ios/RCTMGL/ViewManager.h +16 -0
- package/ios/RCTMGL/ViewManager.m +63 -0
- package/ios/RCTMGL/index.d.ts +1164 -0
- package/ios/RCTMGL.xcodeproj/project.pbxproj +774 -0
- package/ios/install.md +44 -0
- package/javascript/components/AbstractLayer.js +75 -0
- package/javascript/components/AbstractSource.js +15 -0
- package/javascript/components/BackgroundLayer.js +97 -0
- package/javascript/components/Callout.js +139 -0
- package/javascript/components/Camera.js +665 -0
- package/javascript/components/CircleLayer.js +101 -0
- package/javascript/components/FillExtrusionLayer.js +98 -0
- package/javascript/components/FillLayer.js +94 -0
- package/javascript/components/HeadingIndicator.js +31 -0
- package/javascript/components/HeatmapLayer.js +99 -0
- package/javascript/components/ImageSource.js +82 -0
- package/javascript/components/Images.js +119 -0
- package/javascript/components/Light.js +47 -0
- package/javascript/components/LineLayer.js +94 -0
- package/javascript/components/MapView.js +817 -0
- package/javascript/components/MarkerView.js +87 -0
- package/javascript/components/NativeBridgeComponent.js +86 -0
- package/javascript/components/NativeUserLocation.js +41 -0
- package/javascript/components/PointAnnotation.js +216 -0
- package/javascript/components/RasterLayer.js +95 -0
- package/javascript/components/RasterSource.js +124 -0
- package/javascript/components/ShapeSource.js +357 -0
- package/javascript/components/Style.js +264 -0
- package/javascript/components/SymbolLayer.js +120 -0
- package/javascript/components/UserLocation.js +273 -0
- package/javascript/components/VectorSource.js +200 -0
- package/javascript/components/annotations/Annotation.js +122 -0
- package/javascript/index.js +153 -0
- package/javascript/modules/location/locationManager.js +101 -0
- package/javascript/modules/offline/OfflineCreatePackOptions.js +46 -0
- package/javascript/modules/offline/OfflinePack.js +40 -0
- package/javascript/modules/offline/offlineManager.js +378 -0
- package/javascript/modules/snapshot/SnapshotOptions.js +67 -0
- package/javascript/modules/snapshot/snapshotManager.js +62 -0
- package/javascript/utils/BridgeValue.js +81 -0
- package/javascript/utils/Logger.js +114 -0
- package/javascript/utils/animated/Animated.js +39 -0
- package/javascript/utils/animated/AnimatedCoordinatesArray.js +191 -0
- package/javascript/utils/animated/AnimatedExtractCoordinateFromArray.js +43 -0
- package/javascript/utils/animated/AnimatedPoint.js +126 -0
- package/javascript/utils/animated/AnimatedRouteCoordinatesArray.js +124 -0
- package/javascript/utils/animated/AnimatedShape.js +72 -0
- package/javascript/utils/deprecation.js +25 -0
- package/javascript/utils/filterUtils.js +7 -0
- package/javascript/utils/geoUtils.js +73 -0
- package/javascript/utils/index.js +113 -0
- package/javascript/utils/styleMap.js +1901 -0
- package/maplibre-react-native.podspec +79 -0
- package/package.json +120 -0
- package/plugin/build/withMapbox.d.ts +12 -0
- package/plugin/build/withMapbox.js +119 -0
- package/plugin/install.md +32 -0
- package/react-native.config.js +10 -0
- package/scripts/autogenHelpers/DocJSONBuilder.js +458 -0
- package/scripts/autogenHelpers/JSDocNodeTree.js +131 -0
- package/scripts/autogenHelpers/MarkdownBuilder.js +29 -0
- package/scripts/autogenHelpers/globals.js +507 -0
- package/scripts/autogenerate.js +374 -0
- package/scripts/download-style-spec.sh +15 -0
- package/scripts/templates/RCTMGLStyle.h.ejs +33 -0
- package/scripts/templates/RCTMGLStyle.m.ejs +97 -0
- package/scripts/templates/RCTMGLStyleFactory.java.ejs +107 -0
- package/scripts/templates/component.md.ejs +122 -0
- package/scripts/templates/index.d.ts.ejs +56 -0
- package/scripts/templates/styleMap.js.ejs +115 -0
- package/setup-jest.js +121 -0
- package/style-spec/v8.json +5798 -0
- package/tsconfig.json +65 -0
package/docs/MapView.md
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
<!-- This file was autogenerated from MapView.js do not modify -->
|
|
2
|
+
## <MapboxGL.MapView />
|
|
3
|
+
### MapView backed by Mapbox Native GL
|
|
4
|
+
|
|
5
|
+
### props
|
|
6
|
+
| Prop | Type | Default | Required | Description |
|
|
7
|
+
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
+
| contentInset | `union` | `none` | `false` | The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport. |
|
|
9
|
+
| style | `any` | `none` | `false` | Style for wrapping React Native View |
|
|
10
|
+
| styleURL | `string` | `none` | `false` | Style URL for map - notice, if non is set it _will_ default to `MapboxGL.StyleURL.Street` |
|
|
11
|
+
| styleJSON | `string` | `none` | `false` | StyleJSON for map - according to TileJSON specs: https://github.com/mapbox/tilejson-spec |
|
|
12
|
+
| preferredFramesPerSecond | `number` | `none` | `false` | iOS: The preferred frame rate at which the map view is rendered.<br/>The default value for this property is MGLMapViewPreferredFramesPerSecondDefault,<br/>which will adaptively set the preferred frame rate based on the capability of<br/>the user’s device to maintain a smooth experience. This property can be set to arbitrary integer values.<br/><br/>Android: The maximum frame rate at which the map view is rendered, but it can't excess the ability of device hardware.<br/>This property can be set to arbitrary integer values. |
|
|
13
|
+
| localizeLabels | `bool` | `false` | `false` | Automatically change the language of the map labels to the system’s preferred language,<br/>this is not something that can be toggled on/off |
|
|
14
|
+
| zoomEnabled | `bool` | `none` | `false` | Enable/Disable zoom on the map |
|
|
15
|
+
| scrollEnabled | `bool` | `true` | `false` | Enable/Disable scroll on the map |
|
|
16
|
+
| pitchEnabled | `bool` | `true` | `false` | Enable/Disable pitch on map |
|
|
17
|
+
| rotateEnabled | `bool` | `true` | `false` | Enable/Disable rotation on map |
|
|
18
|
+
| attributionEnabled | `bool` | `true` | `false` | The Mapbox terms of service, which governs the use of Mapbox-hosted vector tiles and styles,<br/>[requires](https://www.mapbox.com/help/how-attribution-works/) these copyright notices to accompany any map that features Mapbox-designed styles, OpenStreetMap data, or other Mapbox data such as satellite or terrain data.<br/>If that applies to this map view, do not hide this view or remove any notices from it.<br/><br/>If this view is hidden, you must implement this setting elsewhere in your app. See our website for [Android](https://www.mapbox.com/android-docs/map-sdk/overview/#telemetry-opt-out) and [iOS](https://www.mapbox.com/ios-sdk/#telemetry_opt_out) for implementation details.<br/><br/>Enable/Disable attribution on map. |
|
|
19
|
+
| attributionPosition | `union` | `none` | `false` | Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map |
|
|
20
|
+
| tintColor | `union` | `none` | `false` | MapView's tintColor |
|
|
21
|
+
| logoEnabled | `bool` | `true` | `false` | Enable/Disable the logo on the map. |
|
|
22
|
+
| logoPosition | `union` | `none` | `false` | Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map |
|
|
23
|
+
| compassEnabled | `bool` | `none` | `false` | Enable/Disable the compass from appearing on the map |
|
|
24
|
+
| compassViewPosition | `number` | `none` | `false` | Change corner of map the compass starts at. 0: TopLeft, 1: TopRight, 2: BottomLeft, 3: BottomRight |
|
|
25
|
+
| compassViewMargins | `object` | `none` | `false` | Add margins to the compass with x and y values |
|
|
26
|
+
| surfaceView | `bool` | `false` | `false` | [Android only] Enable/Disable use of GLSurfaceView insted of TextureView. |
|
|
27
|
+
| onPress | `func` | `none` | `false` | Map press listener, gets called when a user presses the map |
|
|
28
|
+
| onLongPress | `func` | `none` | `false` | Map long press listener, gets called when a user long presses the map |
|
|
29
|
+
| onRegionWillChange | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region is about to change. |
|
|
30
|
+
| onRegionIsChanging | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region is changing. |
|
|
31
|
+
| onRegionDidChange | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region finished changing |
|
|
32
|
+
| onWillStartLoadingMap | `func` | `none` | `false` | This event is triggered when the map is about to start loading a new map style. |
|
|
33
|
+
| onDidFinishLoadingMap | `func` | `none` | `false` | This is triggered when the map has successfully loaded a new map style. |
|
|
34
|
+
| onDidFailLoadingMap | `func` | `none` | `false` | This event is triggered when the map has failed to load a new map style. |
|
|
35
|
+
| onWillStartRenderingFrame | `func` | `none` | `false` | This event is triggered when the map will start rendering a frame. |
|
|
36
|
+
| onDidFinishRenderingFrame | `func` | `none` | `false` | This event is triggered when the map finished rendering a frame. |
|
|
37
|
+
| onDidFinishRenderingFrameFully | `func` | `none` | `false` | This event is triggered when the map fully finished rendering a frame. |
|
|
38
|
+
| onWillStartRenderingMap | `func` | `none` | `false` | This event is triggered when the map will start rendering the map. |
|
|
39
|
+
| onDidFinishRenderingMap | `func` | `none` | `false` | This event is triggered when the map finished rendering the map. |
|
|
40
|
+
| onDidFinishRenderingMapFully | `func` | `none` | `false` | This event is triggered when the map fully finished rendering the map. |
|
|
41
|
+
| onUserLocationUpdate | `func` | `none` | `false` | This event is triggered when the user location is updated. |
|
|
42
|
+
| onDidFinishLoadingStyle | `func` | `none` | `false` | This event is triggered when a style has finished loading. |
|
|
43
|
+
| regionWillChangeDebounceTime | `number` | `10` | `false` | The emitted frequency of regionwillchange events |
|
|
44
|
+
| regionDidChangeDebounceTime | `number` | `500` | `false` | The emitted frequency of regiondidchange events |
|
|
45
|
+
|
|
46
|
+
### methods
|
|
47
|
+
#### getPointInView(coordinate)
|
|
48
|
+
|
|
49
|
+
Converts a geographic coordinate to a point in the given view’s coordinate system.
|
|
50
|
+
|
|
51
|
+
##### arguments
|
|
52
|
+
| Name | Type | Required | Description |
|
|
53
|
+
| ---- | :--: | :------: | :----------: |
|
|
54
|
+
| `coordinate` | `Array` | `Yes` | A point expressed in the map view's coordinate system. |
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
```javascript
|
|
59
|
+
const pointInView = await this._map.getPointInView([-37.817070, 144.949901]);
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
#### getCoordinateFromView(point)
|
|
64
|
+
|
|
65
|
+
Converts a point in the given view’s coordinate system to a geographic coordinate.
|
|
66
|
+
|
|
67
|
+
##### arguments
|
|
68
|
+
| Name | Type | Required | Description |
|
|
69
|
+
| ---- | :--: | :------: | :----------: |
|
|
70
|
+
| `point` | `Array` | `Yes` | A point expressed in the given view’s coordinate system. |
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
const coordinate = await this._map.getCoordinateFromView([100, 100]);
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
#### getVisibleBounds()
|
|
80
|
+
|
|
81
|
+
The coordinate bounds(ne, sw) visible in the users’s viewport.
|
|
82
|
+
|
|
83
|
+
##### arguments
|
|
84
|
+
| Name | Type | Required | Description |
|
|
85
|
+
| ---- | :--: | :------: | :----------: |
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
```javascript
|
|
91
|
+
const visibleBounds = await this._map.getVisibleBounds();
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
#### queryRenderedFeaturesAtPoint(coordinate[, filter][, layerIDs])
|
|
96
|
+
|
|
97
|
+
Returns an array of rendered map features that intersect with a given point.
|
|
98
|
+
|
|
99
|
+
##### arguments
|
|
100
|
+
| Name | Type | Required | Description |
|
|
101
|
+
| ---- | :--: | :------: | :----------: |
|
|
102
|
+
| `coordinate` | `Array` | `Yes` | A point expressed in the map view’s coordinate system. |
|
|
103
|
+
| `filter` | `Array` | `No` | 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. |
|
|
104
|
+
| `layerIDs` | `Array` | `No` | A array of layer id's to filter the features by |
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
```javascript
|
|
109
|
+
this._map.queryRenderedFeaturesAtPoint([30, 40], ['==', 'type', 'Point'], ['id1', 'id2'])
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
#### queryRenderedFeaturesInRect(bbox[, filter][, layerIDs])
|
|
114
|
+
|
|
115
|
+
Returns an array of rendered map features that intersect with the given rectangle,<br/>restricted to the given style layers and filtered by the given predicate.
|
|
116
|
+
|
|
117
|
+
##### arguments
|
|
118
|
+
| Name | Type | Required | Description |
|
|
119
|
+
| ---- | :--: | :------: | :----------: |
|
|
120
|
+
| `bbox` | `Array` | `Yes` | A rectangle expressed in the map view’s coordinate system. |
|
|
121
|
+
| `filter` | `Array` | `No` | 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. |
|
|
122
|
+
| `layerIDs` | `Array` | `No` | A array of layer id's to filter the features by |
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
```javascript
|
|
127
|
+
this._map.queryRenderedFeaturesInRect([30, 40, 20, 10], ['==', 'type', 'Point'], ['id1', 'id2'])
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
#### setCamera()
|
|
132
|
+
|
|
133
|
+
Map camera will perform updates based on provided config. Deprecated use Camera#setCamera.
|
|
134
|
+
|
|
135
|
+
##### arguments
|
|
136
|
+
| Name | Type | Required | Description |
|
|
137
|
+
| ---- | :--: | :------: | :----------: |
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
#### takeSnap([writeToDisk])
|
|
142
|
+
|
|
143
|
+
Takes snapshot of map with current tiles and returns a URI to the image
|
|
144
|
+
|
|
145
|
+
##### arguments
|
|
146
|
+
| Name | Type | Required | Description |
|
|
147
|
+
| ---- | :--: | :------: | :----------: |
|
|
148
|
+
| `writeToDisk` | `Boolean` | `No` | If true will create a temp file, otherwise it is in base64 |
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
#### getZoom()
|
|
152
|
+
|
|
153
|
+
Returns the current zoom of the map view.
|
|
154
|
+
|
|
155
|
+
##### arguments
|
|
156
|
+
| Name | Type | Required | Description |
|
|
157
|
+
| ---- | :--: | :------: | :----------: |
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
```javascript
|
|
163
|
+
const zoom = await this._map.getZoom();
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
#### getCenter()
|
|
168
|
+
|
|
169
|
+
Returns the map's geographical centerpoint
|
|
170
|
+
|
|
171
|
+
##### arguments
|
|
172
|
+
| Name | Type | Required | Description |
|
|
173
|
+
| ---- | :--: | :------: | :----------: |
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
```javascript
|
|
179
|
+
const center = await this._map.getCenter();
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
#### setSourceVisibility(visible, sourceId[, sourceLayerId])
|
|
184
|
+
|
|
185
|
+
Sets the visibility of all the layers referencing the specified `sourceLayerId` and/or `sourceId`
|
|
186
|
+
|
|
187
|
+
##### arguments
|
|
188
|
+
| Name | Type | Required | Description |
|
|
189
|
+
| ---- | :--: | :------: | :----------: |
|
|
190
|
+
| `visible` | `boolean` | `Yes` | Visibility of the layers |
|
|
191
|
+
| `sourceId` | `String` | `Yes` | Identifier of the target source (e.g. 'composite') |
|
|
192
|
+
| `sourceLayerId` | `String` | `No` | Identifier of the target source-layer (e.g. 'building') |
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
```javascript
|
|
197
|
+
await this._map.setSourceVisibility(false, 'composite', 'building')
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
#### showAttribution()
|
|
202
|
+
|
|
203
|
+
Show the attribution and telemetry action sheet.<br/>If you implement a custom attribution button, you should add this action to the button.
|
|
204
|
+
|
|
205
|
+
##### arguments
|
|
206
|
+
| Name | Type | Required | Description |
|
|
207
|
+
| ---- | :--: | :------: | :----------: |
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
package/docs/MapboxGL.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
## MapboxGL
|
|
2
|
+
###
|
|
3
|
+
|
|
4
|
+
### methods
|
|
5
|
+
#### setAccessToken(accessToken)
|
|
6
|
+
|
|
7
|
+
##### arguments
|
|
8
|
+
| Name | Type | Required | Description |
|
|
9
|
+
| ---- | :--: | :------: | :----------: |
|
|
10
|
+
| `accessToken` | `String` | `Yes` | required acessToken to pull mapbox tiles, can be `null` if other tiles are used |
|
|
11
|
+
|
|
12
|
+
##### Description
|
|
13
|
+
sets the accessToken, which is required when you want to use mapbox tiles
|
|
14
|
+
not required when using other tiles
|
|
15
|
+
|
|
16
|
+
#### getAccessToken()
|
|
17
|
+
|
|
18
|
+
##### arguments
|
|
19
|
+
| Name | Type | Required | Description |
|
|
20
|
+
| ---- | :--: | :------: | :----------: |
|
|
21
|
+
| `accessToken` | `String` | `Yes` | required acessToken to pull mapbox tiles, can be `null` if other tiles are used |
|
|
22
|
+
|
|
23
|
+
##### Description
|
|
24
|
+
gets the accessToken
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
#### addCustomHeader(headerName, headerValue)
|
|
28
|
+
|
|
29
|
+
##### arguments
|
|
30
|
+
| Name | Type | Required | Description |
|
|
31
|
+
| ---- | :--: | :------: | :----------: |
|
|
32
|
+
| `headerName` | `String` | `Yes` | name for customHeader |
|
|
33
|
+
| `headerValue` | `String` | `Yes` | value for customHeader |
|
|
34
|
+
|
|
35
|
+
##### Description
|
|
36
|
+
also see [CustomHttpHeaders](/docs/CustomHttpHeaders.md)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
#### removeCustomHeader(headerName)
|
|
40
|
+
|
|
41
|
+
##### arguments
|
|
42
|
+
| Name | Type | Required | Description |
|
|
43
|
+
| ---- | :--: | :------: | :----------: |
|
|
44
|
+
| `headerName` | `String` | `Yes` | name of customHeader to be removed |
|
|
45
|
+
|
|
46
|
+
##### Description
|
|
47
|
+
also see [CustomHttpHeaders](/docs/CustomHttpHeaders.md)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Android only
|
|
51
|
+
#### requestAndroidLocationPermissions()
|
|
52
|
+
##### Description
|
|
53
|
+
Opens Android Location Permission prompt.
|
|
54
|
+
Returns a Promise which resolves into a boolean.
|
|
55
|
+
Either permission was granted or denied.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
#### setConnected(connected)
|
|
59
|
+
##### arguments
|
|
60
|
+
| Name | Type | Required | Description |
|
|
61
|
+
| ---- | :--: | :------: | :----------: |
|
|
62
|
+
| `connected` | `Boolean` | `Yes` | whether or not mapbox is told to be connected or not |
|
|
63
|
+
|
|
64
|
+
#### Description
|
|
65
|
+
If you want to fully block online map - maybe to force offline maps
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- This file was autogenerated from MarkerView.js do not modify -->
|
|
2
|
+
## <MapboxGL.MarkerView />
|
|
3
|
+
### MarkerView allows you to place a interactive react native marker to the map.<br/><br/>If you have static view consider using PointAnnotation or SymbolLayer they'll offer much better performance<br/>.<br/>This is based on [MakerView plugin](https://docs.mapbox.com/android/plugins/overview/markerview/) on Android<br/>and PointAnnotation on iOS.
|
|
4
|
+
|
|
5
|
+
### props
|
|
6
|
+
| Prop | Type | Default | Required | Description |
|
|
7
|
+
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
+
| coordinate | `array` | `none` | `true` | The center point (specified as a map coordinate) of the marker.<br/>See also #anchor. |
|
|
9
|
+
| anchor | `shape` | `{x: 0.5, y: 0.5}` | `false` | Specifies the anchor being set on a particular point of the annotation.<br/>The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],<br/>where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.<br/>Note this is only for custom annotations not the default pin view.<br/>Defaults to the center of the view. |
|
|
10
|
+
| x | `number` | `none` | `true` | `x` of anchor |
|
|
11
|
+
| y | `number` | `none` | `true` | `y` of anchor |
|
|
12
|
+
| children | `element` | `none` | `true` | Expects one child - can be container with multiple elements |
|
|
13
|
+
|
|
14
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- This file was autogenerated from NativeUserLocation.js do not modify -->
|
|
2
|
+
## <MapboxGL.NativeUserLocation />
|
|
3
|
+
###
|
|
4
|
+
|
|
5
|
+
### props
|
|
6
|
+
| Prop | Type | Default | Required | Description |
|
|
7
|
+
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
+
| androidRenderMode | `enum` | `none` | `false` | Android render mode.<br/><br/> - normal: just a circle<br/> - compass: triangle with heading<br/> - gps: large arrow<br/><br/>@platform android |
|
|
9
|
+
| iosShowsUserHeadingIndicator | `bool` | `none` | `false` | iOS only. A Boolean value indicating whether the user location annotation may display a permanent heading indicator.<br/><br/>@platform ios |
|
|
10
|
+
|
|
11
|
+
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
<!-- This file was autogenerated from offlineManager.js do not modify -->
|
|
2
|
+
## <MapboxGL.offlineManager />
|
|
3
|
+
### OfflineManager implements a singleton (shared object) that manages offline packs.<br/>All of this class’s instance methods are asynchronous, reflecting the fact that offline resources are stored in a database.<br/>The shared object maintains a canonical collection of offline packs.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### methods
|
|
7
|
+
#### createPack(options[, progressListener][, errorListener])
|
|
8
|
+
|
|
9
|
+
Creates and registers an offline pack that downloads the resources needed to use the given region offline.
|
|
10
|
+
|
|
11
|
+
##### arguments
|
|
12
|
+
| Name | Type | Required | Description |
|
|
13
|
+
| ---- | :--: | :------: | :----------: |
|
|
14
|
+
| `options` | `OfflineCreatePackOptions` | `Yes` | Create options for a offline pack that specifices zoom levels, style url, and the region to download. |
|
|
15
|
+
| `progressListener` | `Callback` | `No` | Callback that listens for status events while downloading the offline resource. |
|
|
16
|
+
| `errorListener` | `Callback` | `No` | Callback that listens for status events while downloading the offline resource. |
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
```javascript
|
|
21
|
+
const progressListener = (offlineRegion, status) => console.log(offlineRegion, status);
|
|
22
|
+
const errorListener = (offlineRegion, err) => console.log(offlineRegion, err);
|
|
23
|
+
|
|
24
|
+
await MapboxGL.offlineManager.createPack({
|
|
25
|
+
name: 'offlinePack',
|
|
26
|
+
styleURL: 'mapbox://...',
|
|
27
|
+
minZoom: 14,
|
|
28
|
+
maxZoom: 20,
|
|
29
|
+
bounds: [[neLng, neLat], [swLng, swLat]]
|
|
30
|
+
}, progressListener, errorListener)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
#### invalidatePack(name)
|
|
35
|
+
|
|
36
|
+
Invalidates the specified offline pack. This method checks that the tiles in the specified offline pack match those from the server. Local tiles that do not match the latest version on the server are updated.This is more efficient than deleting the offline pack and downloading it again. If the data stored locally matches that on the server, new data will not be downloaded.
|
|
37
|
+
|
|
38
|
+
##### arguments
|
|
39
|
+
| Name | Type | Required | Description |
|
|
40
|
+
| ---- | :--: | :------: | :----------: |
|
|
41
|
+
| `name` | `String` | `Yes` | Name of the offline pack. |
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
```javascript
|
|
46
|
+
await MapboxGL.offlineManager.invalidatePack('packName')
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
#### deletePack(name)
|
|
51
|
+
|
|
52
|
+
Unregisters the given offline pack and allows resources that are no longer required by any remaining packs to be potentially freed.
|
|
53
|
+
|
|
54
|
+
##### arguments
|
|
55
|
+
| Name | Type | Required | Description |
|
|
56
|
+
| ---- | :--: | :------: | :----------: |
|
|
57
|
+
| `name` | `String` | `Yes` | Name of the offline pack. |
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
```javascript
|
|
62
|
+
await MapboxGL.offlineManager.deletePack('packName')
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
#### invalidateAmbientCache()
|
|
67
|
+
|
|
68
|
+
Forces a revalidation of the tiles in the ambient cache and downloads a fresh version of the tiles from the tile server.<br/>This is the recommend method for clearing the cache.<br/>This is the most efficient method because tiles in the ambient cache are re-downloaded to remove outdated data from a device.<br/>It does not erase resources from the ambient cache or delete the database, which can be computationally expensive operations that may carry unintended side effects.
|
|
69
|
+
|
|
70
|
+
##### arguments
|
|
71
|
+
| Name | Type | Required | Description |
|
|
72
|
+
| ---- | :--: | :------: | :----------: |
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
```javascript
|
|
78
|
+
await MapboxGL.offlineManager.invalidateAmbientCache();
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
#### clearAmbientCache()
|
|
83
|
+
|
|
84
|
+
Erases resources from the ambient cache.<br/>This method clears the cache and decreases the amount of space that map resources take up on the device.
|
|
85
|
+
|
|
86
|
+
##### arguments
|
|
87
|
+
| Name | Type | Required | Description |
|
|
88
|
+
| ---- | :--: | :------: | :----------: |
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
```javascript
|
|
94
|
+
await MapboxGL.offlineManager.clearAmbientCache();
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
#### setMaximumAmbientCacheSize(size)
|
|
99
|
+
|
|
100
|
+
Sets the maximum size of the ambient cache in bytes. Disables the ambient cache if set to 0.<br/>This method may be computationally expensive because it will erase resources from the ambient cache if its size is decreased.
|
|
101
|
+
|
|
102
|
+
##### arguments
|
|
103
|
+
| Name | Type | Required | Description |
|
|
104
|
+
| ---- | :--: | :------: | :----------: |
|
|
105
|
+
| `size` | `Number` | `Yes` | Size of ambient cache. |
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
```javascript
|
|
110
|
+
await MapboxGL.offlineManager.setMaximumAmbientCacheSize(5000000);
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
#### resetDatabase()
|
|
115
|
+
|
|
116
|
+
Deletes the existing database, which includes both the ambient cache and offline packs, then reinitializes it.
|
|
117
|
+
|
|
118
|
+
##### arguments
|
|
119
|
+
| Name | Type | Required | Description |
|
|
120
|
+
| ---- | :--: | :------: | :----------: |
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
```javascript
|
|
126
|
+
await MapboxGL.offlineManager.resetDatabase();
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
#### getPacks()
|
|
131
|
+
|
|
132
|
+
Retrieves all the current offline packs that are stored in the database.
|
|
133
|
+
|
|
134
|
+
##### arguments
|
|
135
|
+
| Name | Type | Required | Description |
|
|
136
|
+
| ---- | :--: | :------: | :----------: |
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
```javascript
|
|
142
|
+
const offlinePacks = await MapboxGL.offlineManager.getPacks();
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
#### getPack(name)
|
|
147
|
+
|
|
148
|
+
Retrieves an offline pack that is stored in the database by name.
|
|
149
|
+
|
|
150
|
+
##### arguments
|
|
151
|
+
| Name | Type | Required | Description |
|
|
152
|
+
| ---- | :--: | :------: | :----------: |
|
|
153
|
+
| `name` | `String` | `Yes` | Name of the offline pack. |
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
```javascript
|
|
158
|
+
const offlinePack = await MapboxGL.offlineManager.getPack();
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
#### mergeOfflineRegions(path)
|
|
163
|
+
|
|
164
|
+
Sideloads offline db
|
|
165
|
+
|
|
166
|
+
##### arguments
|
|
167
|
+
| Name | Type | Required | Description |
|
|
168
|
+
| ---- | :--: | :------: | :----------: |
|
|
169
|
+
| `path` | `String` | `Yes` | Path to offline tile db on file system. |
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
```javascript
|
|
174
|
+
await MapboxGL.offlineManager.mergeOfflineRegions(path);
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
#### setTileCountLimit(limit)
|
|
179
|
+
|
|
180
|
+
Sets the maximum number of Mapbox-hosted tiles that may be downloaded and stored on the current device.<br/>The Mapbox Terms of Service prohibit changing or bypassing this limit without permission from Mapbox.
|
|
181
|
+
|
|
182
|
+
##### arguments
|
|
183
|
+
| Name | Type | Required | Description |
|
|
184
|
+
| ---- | :--: | :------: | :----------: |
|
|
185
|
+
| `limit` | `Number` | `Yes` | Map tile limit count. |
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
```javascript
|
|
190
|
+
MapboxGL.offlineManager.setTileCountLimit(1000);
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
#### setProgressEventThrottle(throttleValue)
|
|
195
|
+
|
|
196
|
+
Sets the period at which download status events will be sent over the React Native bridge.<br/>The default is 500ms.
|
|
197
|
+
|
|
198
|
+
##### arguments
|
|
199
|
+
| Name | Type | Required | Description |
|
|
200
|
+
| ---- | :--: | :------: | :----------: |
|
|
201
|
+
| `throttleValue` | `Number` | `Yes` | event throttle value in ms. |
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
```javascript
|
|
206
|
+
MapboxGL.offlineManager.setProgressEventThrottle(500);
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
#### subscribe(packName, progressListener, errorListener)
|
|
211
|
+
|
|
212
|
+
Subscribe to download status/error events for the requested offline pack.<br/>Note that createPack calls this internally if listeners are provided.
|
|
213
|
+
|
|
214
|
+
##### arguments
|
|
215
|
+
| Name | Type | Required | Description |
|
|
216
|
+
| ---- | :--: | :------: | :----------: |
|
|
217
|
+
| `packName` | `String` | `Yes` | Name of the offline pack. |
|
|
218
|
+
| `progressListener` | `Callback` | `Yes` | Callback that listens for status events while downloading the offline resource. |
|
|
219
|
+
| `errorListener` | `Callback` | `Yes` | Callback that listens for status events while downloading the offline resource. |
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
```javascript
|
|
224
|
+
const progressListener = (offlinePack, status) => console.log(offlinePack, status)
|
|
225
|
+
const errorListener = (offlinePack, err) => console.log(offlinePack, err)
|
|
226
|
+
MapboxGL.offlineManager.subscribe('packName', progressListener, errorListener)
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
#### unsubscribe(packName)
|
|
231
|
+
|
|
232
|
+
Unsubscribes any listeners associated with the offline pack.<br/>It's a good idea to call this on componentWillUnmount.
|
|
233
|
+
|
|
234
|
+
##### arguments
|
|
235
|
+
| Name | Type | Required | Description |
|
|
236
|
+
| ---- | :--: | :------: | :----------: |
|
|
237
|
+
| `packName` | `String` | `Yes` | Name of the offline pack. |
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
```javascript
|
|
242
|
+
MapboxGL.offlineManager.unsubscribe('packName')
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!-- This file was autogenerated from PointAnnotation.js do not modify -->
|
|
2
|
+
## <MapboxGL.PointAnnotation />
|
|
3
|
+
### PointAnnotation represents a one-dimensional shape located at a single geographical coordinate.<br/><br/>Consider using ShapeSource and SymbolLayer instead, if you have many points and you have static images,<br/>they'll offer much better performance<br/><br/>.<br/>If you need interctive views please use MarkerView,<br/>as with PointAnnotation on Android child views are rendered onto a bitmap for better performance.
|
|
4
|
+
|
|
5
|
+
### props
|
|
6
|
+
| Prop | Type | Default | Required | Description |
|
|
7
|
+
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
+
| id | `string` | `none` | `true` | A string that uniquely identifies the annotation |
|
|
9
|
+
| title | `string` | `none` | `false` | The string containing the annotation’s title. Note this is required to be set if you want to see a callout appear on iOS. |
|
|
10
|
+
| snippet | `string` | `none` | `false` | The string containing the annotation’s snippet(subtitle). Not displayed in the default callout. |
|
|
11
|
+
| selected | `bool` | `none` | `false` | Manually selects/deselects annotation<br/>@type {[type]} |
|
|
12
|
+
| draggable | `bool` | `false` | `false` | Enable or disable dragging. Defaults to false. |
|
|
13
|
+
| coordinate | `array` | `none` | `true` | The center point (specified as a map coordinate) of the annotation. |
|
|
14
|
+
| anchor | `shape` | `{x: 0.5, y: 0.5}` | `false` | Specifies the anchor being set on a particular point of the annotation.<br/>The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],<br/>where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.<br/>Note this is only for custom annotations not the default pin view.<br/>Defaults to the center of the view. |
|
|
15
|
+
| x | `number` | `none` | `true` | See anchor |
|
|
16
|
+
| y | `number` | `none` | `true` | See anchor |
|
|
17
|
+
| onSelected | `func` | `none` | `false` | This callback is fired once this annotation is selected. Returns a Feature as the first param. |
|
|
18
|
+
| onDeselected | `func` | `none` | `false` | This callback is fired once this annotation is deselected. |
|
|
19
|
+
| onDragStart | `func` | `none` | `false` | This callback is fired once this annotation has started being dragged. |
|
|
20
|
+
| onDragEnd | `func` | `none` | `false` | This callback is fired once this annotation has stopped being dragged. |
|
|
21
|
+
| onDrag | `func` | `none` | `false` | This callback is fired while this annotation is being dragged. |
|
|
22
|
+
|
|
23
|
+
### methods
|
|
24
|
+
#### refresh()
|
|
25
|
+
|
|
26
|
+
On android point annotation is rendered offscreen with a canvas into an image.<br/>To rerender the image from the current state of the view call refresh.<br/>Call this for example from Image#onLoad.
|
|
27
|
+
|
|
28
|
+
##### arguments
|
|
29
|
+
| Name | Type | Required | Description |
|
|
30
|
+
| ---- | :--: | :------: | :----------: |
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|