@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/index.d.ts
ADDED
|
@@ -0,0 +1,953 @@
|
|
|
1
|
+
declare module 'react-native-mapbox-gl__maps';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Component,
|
|
5
|
+
ReactNode,
|
|
6
|
+
SyntheticEvent,
|
|
7
|
+
} from 'react';
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
ViewProps,
|
|
11
|
+
ViewStyle,
|
|
12
|
+
StyleProp,
|
|
13
|
+
TextStyle,
|
|
14
|
+
ImageSourcePropType,
|
|
15
|
+
} from 'react-native';
|
|
16
|
+
import ReactNative from 'react-native';
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
Geometry,
|
|
20
|
+
Properties,
|
|
21
|
+
Position,
|
|
22
|
+
Feature,
|
|
23
|
+
LineString,
|
|
24
|
+
Coord,
|
|
25
|
+
Units,
|
|
26
|
+
BBox,
|
|
27
|
+
Id,
|
|
28
|
+
FeatureCollection,
|
|
29
|
+
} from '@turf/helpers';
|
|
30
|
+
|
|
31
|
+
// prettier-ignore
|
|
32
|
+
type ExpressionName =
|
|
33
|
+
// Types
|
|
34
|
+
| 'array' | 'boolean' | 'collator' | 'format' | 'literal' | 'number' | 'object' | 'string'
|
|
35
|
+
| 'to-boolean' | 'to-color' | 'to-number' | 'to-string' | 'typeof'
|
|
36
|
+
// Feature data
|
|
37
|
+
| 'feature-state' | 'geometry-type' | 'id' | 'line-progress' | 'properties'
|
|
38
|
+
// Lookup
|
|
39
|
+
| 'at' | 'get' | 'has' | 'length'
|
|
40
|
+
// Decision
|
|
41
|
+
| '!' | '!=' | '<' | '<=' | '==' | '>' | '>=' | 'all' | 'any' | 'case' | 'match' | 'coalesce'
|
|
42
|
+
// Ramps, scales, curves
|
|
43
|
+
| 'interpolate' | 'interpolate-hcl' | 'interpolate-lab' | 'step'
|
|
44
|
+
// Variable binding
|
|
45
|
+
| 'let' | 'var'
|
|
46
|
+
// String
|
|
47
|
+
| 'concat' | 'downcase' | 'is-supported-script' | 'resolved-locale' | 'upcase'
|
|
48
|
+
// Color
|
|
49
|
+
| 'rgb' | 'rgba'
|
|
50
|
+
// Math
|
|
51
|
+
| '-' | '*' | '/' | '%' | '^' | '+' | 'abs' | 'acos' | 'asin' | 'atan' | 'ceil' | 'cos' | 'e'
|
|
52
|
+
| 'floor' | 'ln' | 'ln2' | 'log10' | 'log2' | 'max' | 'min' | 'pi' | 'round' | 'sin' | 'sqrt' | 'tan'
|
|
53
|
+
// Zoom, Heatmap
|
|
54
|
+
| 'zoom' | 'heatmap-density';
|
|
55
|
+
|
|
56
|
+
type ExpressionField =
|
|
57
|
+
| string
|
|
58
|
+
| number
|
|
59
|
+
| boolean
|
|
60
|
+
| Expression
|
|
61
|
+
| ExpressionField[]
|
|
62
|
+
| {[key: string]: ExpressionField};
|
|
63
|
+
|
|
64
|
+
export type Expression = [ExpressionName, ...ExpressionField[]];
|
|
65
|
+
|
|
66
|
+
type Anchor =
|
|
67
|
+
| 'center'
|
|
68
|
+
| 'left'
|
|
69
|
+
| 'right'
|
|
70
|
+
| 'top'
|
|
71
|
+
| 'bottom'
|
|
72
|
+
| 'top-left'
|
|
73
|
+
| 'top-right'
|
|
74
|
+
| 'bottom-left'
|
|
75
|
+
| 'bottom-right';
|
|
76
|
+
type Visibility = 'visible' | 'none';
|
|
77
|
+
type Alignment = 'map' | 'viewport';
|
|
78
|
+
type AutoAlignment = Alignment | 'auto';
|
|
79
|
+
|
|
80
|
+
type NamedStyles<T> = {
|
|
81
|
+
[P in keyof T]:
|
|
82
|
+
| SymbolLayerStyle
|
|
83
|
+
| RasterLayerStyle
|
|
84
|
+
| LineLayerStyle
|
|
85
|
+
| FillLayerStyle
|
|
86
|
+
| FillExtrusionLayerStyle
|
|
87
|
+
| CircleLayerStyle
|
|
88
|
+
| BackgroundLayerStyle;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export type MapboxGLEvent<
|
|
92
|
+
T extends string,
|
|
93
|
+
P = GeoJSON.Feature,
|
|
94
|
+
V = Element
|
|
95
|
+
> = SyntheticEvent<V, { type: T; payload: P }>;
|
|
96
|
+
|
|
97
|
+
export type OnPressEvent = {
|
|
98
|
+
features: Array<GeoJSON.Feature>;
|
|
99
|
+
coordinates: {
|
|
100
|
+
latitude: number;
|
|
101
|
+
longitude: number;
|
|
102
|
+
};
|
|
103
|
+
point: {
|
|
104
|
+
x: number;
|
|
105
|
+
y: number;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
declare namespace MapboxGL {
|
|
110
|
+
function removeCustomHeader(headerName: string): void;
|
|
111
|
+
function addCustomHeader(headerName: string, headerValue: string): void;
|
|
112
|
+
function setAccessToken(accessToken: string | null): void;
|
|
113
|
+
function getAccessToken(): Promise<string>;
|
|
114
|
+
function setConnected(connected: boolean): void;
|
|
115
|
+
function requestAndroidLocationPermissions(): Promise<boolean>;
|
|
116
|
+
|
|
117
|
+
const offlineManager: OfflineManager;
|
|
118
|
+
const snapshotManager: SnapshotManager;
|
|
119
|
+
const locationManager: LocationManager;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* GeoUtils
|
|
123
|
+
*/
|
|
124
|
+
interface UnitsOptions {
|
|
125
|
+
units?: Units;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
interface PositionsOptions {
|
|
129
|
+
bbox?: BBox;
|
|
130
|
+
id?: Id;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
namespace geoUtils {
|
|
134
|
+
function makePoint<P = Properties>(coordinates: Position, properties?: P, options?: PositionsOptions): Feature<GeoJSON.Point, P>;
|
|
135
|
+
function makeLineString<P = Properties>(coordinates: Position[], properties?: P, options?: PositionsOptions): Feature<LineString, P>;
|
|
136
|
+
function makeLatLngBounds<G = Geometry, P = Properties>(northEastCoordinates: Position[], southWestCoordinates: Position[]): FeatureCollection<G, P>;
|
|
137
|
+
function makeFeature<G = Geometry, P = Properties>(geometry: G, properties?: P): Feature<G, P>;
|
|
138
|
+
function makeFeatureCollection<G = Geometry, P = Properties>(features: Array<Feature<G, P>>, options?: PositionsOptions): FeatureCollection<G, P>;
|
|
139
|
+
function addToFeatureCollection<G = Geometry, P = Properties>(newFeatureCollection: Array<FeatureCollection<G, P>>, newFeature: Feature<G, P>): FeatureCollection<G, P>;
|
|
140
|
+
function calculateDistance(origin: Coord, dest: Coord, options?: UnitsOptions): number;
|
|
141
|
+
function pointAlongLine(newLineString: Feature<LineString> | LineString, distAlong: number, options?: UnitsOptions): Feature<GeoJSON.Point>;
|
|
142
|
+
function getOrCalculateVisibleRegion(coord: { lon: number; lat: number }, zoomLevel: number, width: number, height: number, nativeRegion: { properties: { visibleBounds: number[] }; visibleBounds: number[] }): void;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
namespace Animated {
|
|
146
|
+
// sources
|
|
147
|
+
class ShapeSource extends Component<ShapeSourceProps> { }
|
|
148
|
+
class ImageSource extends Component<ImageSourceProps> { }
|
|
149
|
+
|
|
150
|
+
// layers
|
|
151
|
+
class FillLayer extends Component<FillLayerProps> { }
|
|
152
|
+
class FillExtrusionLayer extends Component<FillExtrusionLayerProps> { }
|
|
153
|
+
class LineLayer extends Component<LineLayerProps> { }
|
|
154
|
+
class CircleLayer extends Component<CircleLayerProps> { }
|
|
155
|
+
class SymbolLayer extends Component<SymbolLayerProps> { }
|
|
156
|
+
class RasterLayer extends Component<RasterLayerProps> { }
|
|
157
|
+
class BackgroundLayer extends Component<BackgroundLayerProps> { }
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Classes
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
class AnimatedPoint {
|
|
165
|
+
constructor(point?: GeoJSON.Point);
|
|
166
|
+
longitude: ReactNative.Animated.Value<number>;
|
|
167
|
+
latitude: ReactNative.Animated.Value<number>;
|
|
168
|
+
setValue: (point: GeoJSON.Point) => void;
|
|
169
|
+
setOffset: (point: GeoJSON.Point) => void;
|
|
170
|
+
flattenOffset: () => void;
|
|
171
|
+
stopAnimation: (cb?: () => GeoJSON.Point) => void;
|
|
172
|
+
addListener: (cb?: () => GeoJSON.Point) => void;
|
|
173
|
+
removeListener: (id: string) => void;
|
|
174
|
+
spring: (config: Record<string, any>) => ReactNative.Animated.CompositeAnimation;
|
|
175
|
+
timing: (config: Record<string, any>) => ReactNative.Animated.CompositeAnimation;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Components
|
|
180
|
+
*/
|
|
181
|
+
class MapView extends Component<MapViewProps> {
|
|
182
|
+
getPointInView(coordinate: GeoJSON.Position): Promise<GeoJSON.Position>;
|
|
183
|
+
getCoordinateFromView(point: GeoJSON.Position): Promise<GeoJSON.Position>;
|
|
184
|
+
getVisibleBounds(): Promise<GeoJSON.Position[]>;
|
|
185
|
+
queryRenderedFeaturesAtPoint(
|
|
186
|
+
coordinate: GeoJSON.Position,
|
|
187
|
+
filter?: Expression,
|
|
188
|
+
layerIds?: Array<string>,
|
|
189
|
+
): Promise<GeoJSON.FeatureCollection | undefined>;
|
|
190
|
+
queryRenderedFeaturesInRect(
|
|
191
|
+
coordinate: GeoJSON.Position,
|
|
192
|
+
filter?: Expression,
|
|
193
|
+
layerIds?: Array<string>,
|
|
194
|
+
): Promise<GeoJSON.FeatureCollection | undefined>;
|
|
195
|
+
takeSnap(writeToDisk?: boolean): Promise<string>;
|
|
196
|
+
getZoom(): Promise<number>;
|
|
197
|
+
getCenter(): Promise<GeoJSON.Position>;
|
|
198
|
+
showAttribution(): void;
|
|
199
|
+
setSourceVisibility(visible: Boolean, sourceId: string, sourceLayerId?: string): void;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
type Padding = number | [number, number] | [number, number, number, number];
|
|
203
|
+
class Camera extends Component<CameraProps> {
|
|
204
|
+
fitBounds(
|
|
205
|
+
northEastCoordinates: GeoJSON.Position,
|
|
206
|
+
southWestCoordinates: GeoJSON.Position,
|
|
207
|
+
padding?: Padding,
|
|
208
|
+
duration?: number,
|
|
209
|
+
): void;
|
|
210
|
+
flyTo(coordinates: GeoJSON.Position, duration?: number): void;
|
|
211
|
+
moveTo(coordinates: GeoJSON.Position, duration?: number): void;
|
|
212
|
+
zoomTo(zoomLevel: number, duration?: number): void;
|
|
213
|
+
setCamera(config: CameraSettings): void;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
class UserLocation extends Component<UserLocationProps> { }
|
|
217
|
+
|
|
218
|
+
interface Location {
|
|
219
|
+
coords: Coordinates;
|
|
220
|
+
timestamp?: number;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
interface Coordinates {
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* The heading (measured in degrees) relative to true north.
|
|
227
|
+
* Heading is used to describe the direction the device is pointing to (the value of the compass).
|
|
228
|
+
* Note that on Android this is incorrectly reporting the course value as mentioned in issue https://github.com/rnmapbox/maps/issues/1213.
|
|
229
|
+
* This is more likely to get fixed in MapLibre upstream if someone makes them aware of the issue.
|
|
230
|
+
*/
|
|
231
|
+
heading?: number;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* The direction in which the device is traveling, measured in degrees and relative to due north.
|
|
235
|
+
* The course refers to the direction the device is actually moving (not the same as heading).
|
|
236
|
+
*/
|
|
237
|
+
course?: number;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* The instantaneous speed of the device, measured in meters per second.
|
|
241
|
+
*/
|
|
242
|
+
speed?: number;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The latitude in degrees.
|
|
246
|
+
*/
|
|
247
|
+
latitude: number;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* The longitude in degrees.
|
|
251
|
+
*/
|
|
252
|
+
longitude: number;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* The radius of uncertainty for the location, measured in meters.
|
|
256
|
+
*/
|
|
257
|
+
accuracy?: number;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* The altitude, measured in meters.
|
|
261
|
+
*/
|
|
262
|
+
altitude?: number;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
class Light extends Component<LightProps> { }
|
|
266
|
+
|
|
267
|
+
class StyleSheet extends Component {
|
|
268
|
+
static create<T extends NamedStyles<T> | NamedStyles<any>>(styles: T): T;
|
|
269
|
+
camera(
|
|
270
|
+
stops: { [key: number]: string },
|
|
271
|
+
interpolationMode?: InterpolationMode,
|
|
272
|
+
): void;
|
|
273
|
+
source(
|
|
274
|
+
stops: { [key: number]: string },
|
|
275
|
+
attributeName: string,
|
|
276
|
+
interpolationMode?: InterpolationMode,
|
|
277
|
+
): void;
|
|
278
|
+
composite(
|
|
279
|
+
stops: { [key: number]: string },
|
|
280
|
+
attributeName: string,
|
|
281
|
+
interpolationMode?: InterpolationMode,
|
|
282
|
+
): void;
|
|
283
|
+
|
|
284
|
+
identity(attributeName: string): number;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
class PointAnnotation extends Component<PointAnnotationProps> {
|
|
288
|
+
refresh(): void;
|
|
289
|
+
}
|
|
290
|
+
class MarkerView extends Component<MarkerViewProps> { }
|
|
291
|
+
class Callout extends Component<CalloutProps> { }
|
|
292
|
+
interface Style extends React.FC<StyleProps> { }
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Sources
|
|
296
|
+
*/
|
|
297
|
+
class VectorSource extends Component<VectorSourceProps> { }
|
|
298
|
+
class ShapeSource extends Component<ShapeSourceProps> {
|
|
299
|
+
features(filter?: Expression): Promise<FeatureCollection<Geometry, Properties>>
|
|
300
|
+
|
|
301
|
+
getClusterExpansionZoom(feature: Feature<Geometry, Properties> | number): Promise<number>
|
|
302
|
+
/**
|
|
303
|
+
* Returns all the leaves of a cluster with pagination support.
|
|
304
|
+
* @param cluster feature cluster
|
|
305
|
+
* @param limit the number of leaves to return
|
|
306
|
+
* @param offset the amount of points to skip (for pagination)
|
|
307
|
+
*/
|
|
308
|
+
getClusterLeaves: (feature: Feature<Geometry, Properties> | number, limit: number, offset: number ) => Promise<FeatureCollection<Geometry, Properties>>
|
|
309
|
+
/**
|
|
310
|
+
* Returns the children of a cluster (on the next zoom level).
|
|
311
|
+
* @param cluster feature cluster
|
|
312
|
+
*/
|
|
313
|
+
getClusterChildren: (feature: Feature<Geometry, Properties> | number) => Promise<FeatureCollection<Geometry, Properties>>
|
|
314
|
+
}
|
|
315
|
+
class RasterSource extends Component<RasterSourceProps> { }
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Layers
|
|
319
|
+
*/
|
|
320
|
+
class BackgroundLayer extends Component<BackgroundLayerProps> { }
|
|
321
|
+
class CircleLayer extends Component<CircleLayerProps> { }
|
|
322
|
+
class FillExtrusionLayer extends Component<FillExtrusionLayerProps> { }
|
|
323
|
+
class FillLayer extends Component<FillLayerProps> { }
|
|
324
|
+
class LineLayer extends Component<LineLayerProps> { }
|
|
325
|
+
class RasterLayer extends Component<RasterLayerProps> { }
|
|
326
|
+
class SymbolLayer extends Component<SymbolLayerProps> { }
|
|
327
|
+
class HeatmapLayer extends Component<HeatmapLayerProps> { }
|
|
328
|
+
class Images extends Component<ImagesProps> { }
|
|
329
|
+
class ImageSource extends Component<ImageSourceProps> { }
|
|
330
|
+
|
|
331
|
+
class LocationManager extends Component {
|
|
332
|
+
start(displacement?: number): void;
|
|
333
|
+
stop(): void;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Offline
|
|
338
|
+
*/
|
|
339
|
+
class OfflineManager extends Component {
|
|
340
|
+
createPack(
|
|
341
|
+
options: OfflineCreatePackOptions,
|
|
342
|
+
progressListener?: (pack: OfflinePack, status: OfflineProgressStatus) => void,
|
|
343
|
+
errorListener?: (pack: OfflinePack, err: OfflineProgressError) => void
|
|
344
|
+
): Promise<void>;
|
|
345
|
+
deletePack(name: string): Promise<void>;
|
|
346
|
+
invalidatePack(name: string): Promise<void>;
|
|
347
|
+
getPacks(): Promise<Array<OfflinePack>>;
|
|
348
|
+
getPack(name: string): Promise<OfflinePack | undefined>;
|
|
349
|
+
invalidateAmbientCache(): Promise<void>;
|
|
350
|
+
clearAmbientCache(): Promise<void>;
|
|
351
|
+
setMaximumAmbientCacheSize(size: number): Promise<void>;
|
|
352
|
+
resetDatabase(): Promise<void>;
|
|
353
|
+
setTileCountLimit(limit: number): void;
|
|
354
|
+
setProgressEventThrottle(throttleValue: number): void;
|
|
355
|
+
subscribe(
|
|
356
|
+
packName: string,
|
|
357
|
+
progressListener: (pack: OfflinePack, status: object) => void,
|
|
358
|
+
errorListener?: (pack: OfflinePack, err: object) => void
|
|
359
|
+
): void;
|
|
360
|
+
unsubscribe(packName: string): void;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
class SnapshotManager {
|
|
364
|
+
static takeSnap(options: SnapshotOptions): Promise<string>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
interface OfflineProgressStatus {
|
|
368
|
+
name: string;
|
|
369
|
+
state: number;
|
|
370
|
+
percentage: number;
|
|
371
|
+
completedResourceSize: number;
|
|
372
|
+
completedTileCount: number;
|
|
373
|
+
completedResourceCount: number;
|
|
374
|
+
requiredResourceCount: number;
|
|
375
|
+
completedTileSize: number;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
interface OfflineProgressError {
|
|
379
|
+
message: string;
|
|
380
|
+
name: string;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
interface OfflinePack {
|
|
384
|
+
name: string,
|
|
385
|
+
bounds: [GeoJSON.Position, GeoJSON.Position];
|
|
386
|
+
metadata: any;
|
|
387
|
+
status: () => Promise<OfflinePackStatus>,
|
|
388
|
+
resume: () => Promise<void>,
|
|
389
|
+
pause: () => Promise<void>,
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
interface OfflinePackStatus {
|
|
393
|
+
name: string,
|
|
394
|
+
state: number,
|
|
395
|
+
percentage: number,
|
|
396
|
+
completedResourceCount: number,
|
|
397
|
+
completedResourceSize: number,
|
|
398
|
+
completedTileSize: number,
|
|
399
|
+
completedTileCount: number,
|
|
400
|
+
requiredResourceCount: number,
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Constants
|
|
405
|
+
*/
|
|
406
|
+
enum UserTrackingModes {
|
|
407
|
+
Follow = 'normal',
|
|
408
|
+
FollowWithHeading = 'compass',
|
|
409
|
+
FollowWithCourse = 'course',
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
enum InterpolationMode {
|
|
413
|
+
Exponential = 0,
|
|
414
|
+
Categorical = 1,
|
|
415
|
+
Interval = 2,
|
|
416
|
+
Identity = 3,
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
enum StyleURL {
|
|
420
|
+
Street = 'mapbox://styles/mapbox/streets-v11',
|
|
421
|
+
Dark = 'mapbox://styles/mapbox/dark-v10',
|
|
422
|
+
Light = 'mapbox://styles/mapbox/light-v10',
|
|
423
|
+
Outdoors = 'mapbox://styles/mapbox/outdoors-v11',
|
|
424
|
+
Satellite = 'mapbox://styles/mapbox/satellite-v9',
|
|
425
|
+
SatelliteStreet = 'mapbox://styles/mapbox/satellite-streets-v11',
|
|
426
|
+
TrafficDay = 'mapbox://styles/mapbox/navigation-preview-day-v4',
|
|
427
|
+
TrafficNight = 'mapbox://styles/mapbox/navigation-preview-night-v4',
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export type AttributionPosition =
|
|
432
|
+
| { top: number; left: number }
|
|
433
|
+
| { top: number; right: number }
|
|
434
|
+
| { bottom: number; left: number }
|
|
435
|
+
| { bottom: number; right: number };
|
|
436
|
+
|
|
437
|
+
export type LogoPosition =
|
|
438
|
+
| { top: number; left: number }
|
|
439
|
+
| { top: number; right: number }
|
|
440
|
+
| { bottom: number; left: number }
|
|
441
|
+
| { bottom: number; right: number };
|
|
442
|
+
|
|
443
|
+
export interface RegionPayload {
|
|
444
|
+
zoomLevel: number;
|
|
445
|
+
heading: number;
|
|
446
|
+
animated: boolean;
|
|
447
|
+
isUserInteraction: boolean;
|
|
448
|
+
visibleBounds: GeoJSON.Position[];
|
|
449
|
+
pitch: number;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export interface MapViewProps extends ViewProps {
|
|
453
|
+
animated?: boolean;
|
|
454
|
+
userTrackingMode?: MapboxGL.UserTrackingModes;
|
|
455
|
+
userLocationVerticalAlignment?: number;
|
|
456
|
+
contentInset?: Array<number>;
|
|
457
|
+
style?: StyleProp<ViewStyle>;
|
|
458
|
+
styleURL?: string;
|
|
459
|
+
styleJSON?: string;
|
|
460
|
+
preferredFramesPerSecond?: number;
|
|
461
|
+
localizeLabels?: boolean;
|
|
462
|
+
zoomEnabled?: boolean;
|
|
463
|
+
scrollEnabled?: boolean;
|
|
464
|
+
pitchEnabled?: boolean;
|
|
465
|
+
rotateEnabled?: boolean;
|
|
466
|
+
attributionEnabled?: boolean;
|
|
467
|
+
attributionPosition?: AttributionPosition;
|
|
468
|
+
logoEnabled?: boolean;
|
|
469
|
+
logoPosition?: LogoPosition;
|
|
470
|
+
compassEnabled?: boolean;
|
|
471
|
+
compassViewPosition?: number;
|
|
472
|
+
compassViewMargins?: Point;
|
|
473
|
+
surfaceView?: boolean;
|
|
474
|
+
regionWillChangeDebounceTime?: number;
|
|
475
|
+
regionDidChangeDebounceTime?: number;
|
|
476
|
+
tintColor?: string;
|
|
477
|
+
|
|
478
|
+
onPress?: (feature: GeoJSON.Feature) => void;
|
|
479
|
+
onLongPress?: (feature: GeoJSON.Feature) => void;
|
|
480
|
+
onRegionWillChange?: (
|
|
481
|
+
feature: GeoJSON.Feature<GeoJSON.Point, RegionPayload>,
|
|
482
|
+
) => void;
|
|
483
|
+
onRegionIsChanging?: (
|
|
484
|
+
feature: GeoJSON.Feature<GeoJSON.Point, RegionPayload>,
|
|
485
|
+
) => void;
|
|
486
|
+
onRegionDidChange?: (
|
|
487
|
+
feature: GeoJSON.Feature<GeoJSON.Point, RegionPayload>,
|
|
488
|
+
) => void;
|
|
489
|
+
onUserLocationUpdate?: (feature: MapboxGL.Location) => void;
|
|
490
|
+
onWillStartLoadingMap?: () => void;
|
|
491
|
+
onDidFinishLoadingMap?: () => void;
|
|
492
|
+
onDidFailLoadingMap?: () => void;
|
|
493
|
+
onWillStartRenderingFrame?: () => void;
|
|
494
|
+
onDidFinishRenderingFrame?: () => void;
|
|
495
|
+
onDidFinishRenderingFrameFully?: () => void;
|
|
496
|
+
onWillStartRenderingMap?: () => void;
|
|
497
|
+
onDidFinishRenderingMap?: () => void;
|
|
498
|
+
onDidFinishRenderingMapFully?: () => void;
|
|
499
|
+
onDidFinishLoadingStyle?: () => void;
|
|
500
|
+
onUserTrackingModeChange?: () => void;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export interface CameraProps extends CameraSettings, ViewProps {
|
|
504
|
+
allowUpdates?: boolean;
|
|
505
|
+
animationDuration?: number;
|
|
506
|
+
animationMode?: 'flyTo' | 'easeTo' | 'linearTo' | 'moveTo';
|
|
507
|
+
defaultSettings?: CameraSettings;
|
|
508
|
+
minZoomLevel?: number;
|
|
509
|
+
maxZoomLevel?: number;
|
|
510
|
+
maxBounds?: { ne: [number, number]; sw: [number, number] };
|
|
511
|
+
followUserLocation?: boolean;
|
|
512
|
+
followUserMode?: 'normal' | 'compass' | 'course';
|
|
513
|
+
followZoomLevel?: number;
|
|
514
|
+
followPitch?: number;
|
|
515
|
+
followHeading?: number;
|
|
516
|
+
triggerKey?: any;
|
|
517
|
+
alignment?: number[];
|
|
518
|
+
onUserTrackingModeChange?: (
|
|
519
|
+
event: MapboxGLEvent<
|
|
520
|
+
'usertrackingmodechange',
|
|
521
|
+
{
|
|
522
|
+
followUserLocation: boolean;
|
|
523
|
+
followUserMode: 'normal' | 'compass' | 'course' | null;
|
|
524
|
+
}
|
|
525
|
+
>,
|
|
526
|
+
) => void;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
export interface CameraPadding {
|
|
530
|
+
paddingLeft?: number;
|
|
531
|
+
paddingRight?: number;
|
|
532
|
+
paddingTop?: number;
|
|
533
|
+
paddingBottom?: number;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
export interface CameraSettings {
|
|
537
|
+
centerCoordinate?: GeoJSON.Position;
|
|
538
|
+
heading?: number;
|
|
539
|
+
pitch?: number;
|
|
540
|
+
padding?: CameraPadding;
|
|
541
|
+
bounds?: CameraPadding & {
|
|
542
|
+
ne: GeoJSON.Position;
|
|
543
|
+
sw: GeoJSON.Position;
|
|
544
|
+
};
|
|
545
|
+
zoomLevel?: number;
|
|
546
|
+
animationDuration?: number;
|
|
547
|
+
animationMode?: 'flyTo' | 'easeTo' | 'linearTo' | 'moveTo';
|
|
548
|
+
stops?: CameraSettings[];
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
export interface UserLocationProps {
|
|
552
|
+
androidRenderMode?: 'normal' | 'compass' | 'gps'
|
|
553
|
+
animated?: boolean;
|
|
554
|
+
children?: ReactNode;
|
|
555
|
+
minDisplacement?: number;
|
|
556
|
+
onPress?: () => void;
|
|
557
|
+
onUpdate?: (location: MapboxGL.Location) => void;
|
|
558
|
+
renderMode?: 'normal' | 'native';
|
|
559
|
+
showsUserHeadingIndicator?: boolean,
|
|
560
|
+
visible?: boolean;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export type WithExpression<T> = {
|
|
564
|
+
[P in keyof T]: T[P] | Expression;
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
export interface LightStyle {
|
|
568
|
+
anchor?: Alignment | Expression;
|
|
569
|
+
position?: GeoJSON.Position | Expression;
|
|
570
|
+
positionTransition?: Transition | Expression;
|
|
571
|
+
color?: string | Expression;
|
|
572
|
+
colorTransition?: Transition | Expression;
|
|
573
|
+
intensity?: number | Expression;
|
|
574
|
+
intensityTransition?: Transition | Expression;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export interface Transition {
|
|
578
|
+
duration: number;
|
|
579
|
+
delay: number;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
export interface BackgroundLayerStyle {
|
|
583
|
+
visibility?: Visibility | Expression;
|
|
584
|
+
backgroundColor?: string | Expression;
|
|
585
|
+
backgroundColorTransition?: Transition | Expression;
|
|
586
|
+
backgroundPattern?: string | Expression;
|
|
587
|
+
backgroundPatternTransition?: Transition | Expression;
|
|
588
|
+
backgroundOpacity?: number | Expression;
|
|
589
|
+
backgroundOpacityTransition?: Transition | Expression;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
export interface CircleLayerStyle {
|
|
593
|
+
visibility?: Visibility | Expression;
|
|
594
|
+
circleRadius?: number | Expression;
|
|
595
|
+
circleRadiusTransition?: Transition | Expression;
|
|
596
|
+
circleColor?: string | Expression;
|
|
597
|
+
circleColorTransition?: Transition | Expression;
|
|
598
|
+
circleBlur?: number | Expression;
|
|
599
|
+
circleBlurTransition?: Transition | Expression;
|
|
600
|
+
circleOpacity?: number | Expression;
|
|
601
|
+
circleOpacityTransition?: Transition | Expression;
|
|
602
|
+
circleTranslate?: Array<number> | Expression;
|
|
603
|
+
circleTranslateTransition?: Transition | Expression;
|
|
604
|
+
circleTranslateAnchor?: Alignment | Expression;
|
|
605
|
+
circlePitchScale?: Alignment | Expression;
|
|
606
|
+
circlePitchAlignment?: Alignment | Expression;
|
|
607
|
+
circleStrokeWidth?: number | Expression;
|
|
608
|
+
circleStrokeWidthTransition?: Transition | Expression;
|
|
609
|
+
circleStrokeColor?: string | Expression;
|
|
610
|
+
circleStrokeColorTransition?: Transition | Expression;
|
|
611
|
+
circleStrokeOpacity?: number | Expression;
|
|
612
|
+
circleStrokeOpacityTransition?: Transition | Expression;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
export interface FillExtrusionLayerStyle {
|
|
616
|
+
visibility?: Visibility | Expression;
|
|
617
|
+
fillExtrusionOpacity?: number | Expression;
|
|
618
|
+
fillExtrusionOpacityTransition?: Transition | Expression;
|
|
619
|
+
fillExtrusionColor?: string | Expression;
|
|
620
|
+
fillExtrusionColorTransition?: Transition | Expression;
|
|
621
|
+
fillExtrusionTranslate?: Array<number> | Expression;
|
|
622
|
+
fillExtrusionTranslateTransition?: Transition | Expression;
|
|
623
|
+
fillExtrusionTranslateAnchor?: Alignment | Expression;
|
|
624
|
+
fillExtrusionPattern?: string | Expression;
|
|
625
|
+
fillExtrusionPatternTransition?: Transition | Expression;
|
|
626
|
+
fillExtrusionHeight?: number | Expression;
|
|
627
|
+
fillExtrusionHeightTransition?: Transition | Expression;
|
|
628
|
+
fillExtrusionBase?: number | Expression;
|
|
629
|
+
fillExtrusionBaseTransition?: Transition | Expression;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
export interface FillLayerStyle {
|
|
633
|
+
visibility?: Visibility | Expression;
|
|
634
|
+
fillAntialias?: boolean | Expression;
|
|
635
|
+
fillOpacity?: number | Expression;
|
|
636
|
+
fillExtrusionOpacityTransition?: Transition | Expression;
|
|
637
|
+
fillColor?: string | Expression;
|
|
638
|
+
fillColorTransition?: Transition | Expression;
|
|
639
|
+
fillOutlineColor?: string | Expression;
|
|
640
|
+
fillOutlineColorTransition?: Transition | Expression;
|
|
641
|
+
fillTranslate?: Array<number> | Expression;
|
|
642
|
+
fillTranslateTransition?: Transition | Expression;
|
|
643
|
+
fillTranslateAnchor?: Alignment | Expression;
|
|
644
|
+
fillPattern?: string | Expression;
|
|
645
|
+
fillPatternTransition?: Transition | Expression;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
export interface LineLayerStyle {
|
|
649
|
+
lineCap?: 'butt' | 'round' | 'square' | Expression;
|
|
650
|
+
lineJoin?: 'bevel' | 'round' | 'miter' | Expression;
|
|
651
|
+
lineMiterLimit?: number | Expression;
|
|
652
|
+
lineRoundLimit?: number | Expression;
|
|
653
|
+
visibility?: Visibility | Expression;
|
|
654
|
+
lineOpacity?: number | Expression;
|
|
655
|
+
lineOpacityTransition?: Transition | Expression;
|
|
656
|
+
lineColor?: string | Expression;
|
|
657
|
+
lineColorTransition?: Transition | Expression;
|
|
658
|
+
lineTranslate?: Array<number> | Expression;
|
|
659
|
+
lineTranslateTransition?: Transition | Expression;
|
|
660
|
+
lineTranslateAnchor?: Alignment | Expression;
|
|
661
|
+
lineWidth?: number | Expression;
|
|
662
|
+
lineWidthTransition?: Transition | Expression;
|
|
663
|
+
lineGapWidth?: number | Expression;
|
|
664
|
+
lineGapWidthTransition?: Transition | Expression;
|
|
665
|
+
lineOffset?: number | Expression;
|
|
666
|
+
lineOffsetTransition?: Transition | Expression;
|
|
667
|
+
lineBlur?: number | Expression;
|
|
668
|
+
lineBlurTransition?: Transition | Expression;
|
|
669
|
+
lineDasharray?: Array<number> | Expression;
|
|
670
|
+
lineDasharrayTransition?: Transition | Expression;
|
|
671
|
+
linePattern?: string | Expression;
|
|
672
|
+
linePatternTransition?: Transition | Expression;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
export interface RasterLayerStyle {
|
|
676
|
+
visibility?: Visibility | Expression;
|
|
677
|
+
rasterOpacity?: number | Expression;
|
|
678
|
+
rasterOpacityTransition?: Transition | Expression;
|
|
679
|
+
rasterHueRotate?: Expression;
|
|
680
|
+
rasterHueRotateTransition?: Transition | Expression;
|
|
681
|
+
rasterBrightnessMin?: number | Expression;
|
|
682
|
+
rasterBrightnessMinTransition?: Transition | Expression;
|
|
683
|
+
rasterBrightnessMax?: number | Expression;
|
|
684
|
+
rasterBrightnessMaxTransition?: Transition | Expression;
|
|
685
|
+
rasterSaturation?: number | Expression;
|
|
686
|
+
rasterSaturationTransition?: Transition | Expression;
|
|
687
|
+
rasterContrast?: number | Expression;
|
|
688
|
+
rasterContrastTransition?: Transition | Expression;
|
|
689
|
+
rasterFadeDuration?: number | Expression;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
export type TextVariableAnchorValues = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
693
|
+
|
|
694
|
+
export interface SymbolLayerStyle {
|
|
695
|
+
symbolPlacement?: 'point' | 'line' | Expression;
|
|
696
|
+
symbolSpacing?: number | Expression;
|
|
697
|
+
symbolAvoidEdges?: boolean | Expression;
|
|
698
|
+
symbolSortKey?: number | Expression;
|
|
699
|
+
symbolZOrder?: 'auto' | 'viewport-y' | 'source' | Expression;
|
|
700
|
+
iconAllowOverlap?: boolean | Expression;
|
|
701
|
+
iconIgnorePlacement?: boolean | Expression;
|
|
702
|
+
iconOptional?: boolean | Expression;
|
|
703
|
+
iconRotationAlignment?: AutoAlignment | Expression;
|
|
704
|
+
iconSize?: number | Expression;
|
|
705
|
+
iconTextFit?: 'none' | 'width' | 'height' | 'both' | Expression;
|
|
706
|
+
iconTextFitPadding?: Array<number> | Expression;
|
|
707
|
+
iconImage?: string | Expression;
|
|
708
|
+
iconRotate?: number | Expression;
|
|
709
|
+
iconPadding?: number | Expression;
|
|
710
|
+
iconKeepUpright?: boolean | Expression;
|
|
711
|
+
iconOffset?: Array<number> | Expression;
|
|
712
|
+
iconAnchor?: Anchor | Expression;
|
|
713
|
+
iconPitchAlignment?: AutoAlignment | Expression;
|
|
714
|
+
textPitchAlignment?: AutoAlignment | Expression;
|
|
715
|
+
textRotationAlignment?: AutoAlignment | Expression;
|
|
716
|
+
textField?: string | Expression;
|
|
717
|
+
textFont?: Array<string> | Expression;
|
|
718
|
+
textSize?: number | Expression;
|
|
719
|
+
textMaxWidth?: number | Expression;
|
|
720
|
+
textLineHeight?: number | Expression;
|
|
721
|
+
textLetterSpacing?: number | Expression;
|
|
722
|
+
textJustify?: 'left' | 'center' | 'right' | Expression;
|
|
723
|
+
textAnchor?: Anchor | Expression;
|
|
724
|
+
textMaxAngle?: number | Expression;
|
|
725
|
+
textRotate?: number | Expression;
|
|
726
|
+
textPadding?: number | Expression;
|
|
727
|
+
textKeepUpright?: boolean | Expression;
|
|
728
|
+
textTransform?: 'none' | 'uppercase' | 'lowercase' | Expression;
|
|
729
|
+
textOffset?: Array<number> | Expression;
|
|
730
|
+
textAllowOverlap?: boolean | Expression;
|
|
731
|
+
textIgnorePlacement?: boolean | Expression;
|
|
732
|
+
textOptional?: boolean | Expression;
|
|
733
|
+
textVariableAnchor?: Array<TextVariableAnchorValues>;
|
|
734
|
+
textRadialOffset?: number | Expression;
|
|
735
|
+
visibility?: Visibility | Expression;
|
|
736
|
+
iconOpacity?: number | Expression;
|
|
737
|
+
iconOpacityTransition?: Transition | Expression;
|
|
738
|
+
iconColor?: string | Expression;
|
|
739
|
+
iconColorTransition?: Transition | Expression;
|
|
740
|
+
iconHaloColor?: string | Expression;
|
|
741
|
+
iconHaloColorTransition?: Transition | Expression;
|
|
742
|
+
iconHaloWidth?: number | Expression;
|
|
743
|
+
iconHaloWidthTransition?: Transition | Expression;
|
|
744
|
+
iconHaloBlur?: number | Expression;
|
|
745
|
+
iconHaloBlurTransition?: Transition | Expression;
|
|
746
|
+
iconTranslate?: Array<number> | Expression;
|
|
747
|
+
iconTranslateTransition?: Transition | Expression;
|
|
748
|
+
iconTranslateAnchor?: Alignment | Expression;
|
|
749
|
+
textOpacity?: number | Expression;
|
|
750
|
+
textOpacityTransition?: Transition | Expression;
|
|
751
|
+
textColor?: string | Expression;
|
|
752
|
+
textColorTransition?: Transition | Expression;
|
|
753
|
+
textHaloColor?: string | Expression;
|
|
754
|
+
textHaloColorTransition?: Transition | Expression;
|
|
755
|
+
textHaloWidth?: number | Expression;
|
|
756
|
+
textHaloWidthTransition?: Transition | Expression;
|
|
757
|
+
textHaloBlur?: number | Expression;
|
|
758
|
+
textHaloBlurTransition?: Transition | Expression;
|
|
759
|
+
textTranslate?: Array<number> | Expression;
|
|
760
|
+
textTranslateTransition?: Transition | Expression;
|
|
761
|
+
textTranslateAnchor?: Alignment | Expression;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
export interface HeatmapLayerStyle {
|
|
765
|
+
visibility?: Visibility | Expression;
|
|
766
|
+
heatmapRadius?: number | Expression;
|
|
767
|
+
heatmapRadiusTransition?: Transition | Expression;
|
|
768
|
+
heatmapWeight?: number | Expression;
|
|
769
|
+
heatmapIntensity?: number | Expression;
|
|
770
|
+
heatmapIntensityTransition?: Transition | Expression;
|
|
771
|
+
heatmapColor?: string | Expression;
|
|
772
|
+
heatmapOpacity?: number | Expression;
|
|
773
|
+
heatmapOpacityTransition?: Transition | Expression;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
export interface Point {
|
|
777
|
+
x: number;
|
|
778
|
+
y: number;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
export interface LightProps extends Omit<ViewProps, 'style'> {
|
|
782
|
+
style?: LightStyle;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
export interface PointAnnotationProps {
|
|
786
|
+
id: string;
|
|
787
|
+
title?: string;
|
|
788
|
+
snippet?: string;
|
|
789
|
+
selected?: boolean;
|
|
790
|
+
draggable?: boolean;
|
|
791
|
+
coordinate: GeoJSON.Position;
|
|
792
|
+
anchor?: Point;
|
|
793
|
+
onSelected?: () => void;
|
|
794
|
+
onDeselected?: () => void;
|
|
795
|
+
onDragStart?: () => void;
|
|
796
|
+
onDrag?: () => void;
|
|
797
|
+
onDragEnd?: () => void;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
export interface MarkerViewProps extends PointAnnotationProps {
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
export interface StyleProps {
|
|
804
|
+
json: any
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
export interface CalloutProps extends Omit<ViewProps, 'style'> {
|
|
808
|
+
title?: string;
|
|
809
|
+
style?: StyleProp<WithExpression<ViewStyle>>;
|
|
810
|
+
containerStyle?: StyleProp<WithExpression<ViewStyle>>;
|
|
811
|
+
contentStyle?: StyleProp<WithExpression<ViewStyle>>;
|
|
812
|
+
tipStyle?: StyleProp<WithExpression<ViewStyle>>;
|
|
813
|
+
textStyle?: StyleProp<WithExpression<TextStyle>>;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
export interface TileSourceProps extends ViewProps {
|
|
817
|
+
id: string;
|
|
818
|
+
url?: string;
|
|
819
|
+
tileUrlTemplates?: Array<string>;
|
|
820
|
+
minZoomLevel?: number;
|
|
821
|
+
maxZoomLevel?: number;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
export interface VectorSourceProps extends TileSourceProps {
|
|
825
|
+
onPress?: (event: OnPressEvent) => void;
|
|
826
|
+
hitbox?: {
|
|
827
|
+
width: number;
|
|
828
|
+
height: number;
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
export interface ShapeSourceProps extends ViewProps {
|
|
833
|
+
id: string;
|
|
834
|
+
url?: string;
|
|
835
|
+
shape?: GeoJSON.GeometryCollection | GeoJSON.Feature | GeoJSON.FeatureCollection | GeoJSON.Geometry;
|
|
836
|
+
cluster?: boolean;
|
|
837
|
+
clusterRadius?: number;
|
|
838
|
+
clusterMaxZoomLevel?: number;
|
|
839
|
+
maxZoomLevel?: number;
|
|
840
|
+
buffer?: number;
|
|
841
|
+
tolerance?: number;
|
|
842
|
+
lineMetrics?: boolean;
|
|
843
|
+
images?: { assets?: string[] } & { [key: string]: ImageSourcePropType };
|
|
844
|
+
onPress?: (event: OnPressEvent) => void;
|
|
845
|
+
hitbox?: {
|
|
846
|
+
width: number;
|
|
847
|
+
height: number;
|
|
848
|
+
};
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
export interface RasterSourceProps extends TileSourceProps {
|
|
852
|
+
tileSize?: number;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
export interface LayerBaseProps<T = {}> extends Omit<ViewProps, 'style'> {
|
|
856
|
+
id: string;
|
|
857
|
+
sourceID?: string;
|
|
858
|
+
sourceLayerID?: string;
|
|
859
|
+
aboveLayerID?: string;
|
|
860
|
+
belowLayerID?: string;
|
|
861
|
+
layerIndex?: number;
|
|
862
|
+
filter?: Expression;
|
|
863
|
+
minZoomLevel?: number;
|
|
864
|
+
maxZoomLevel?: number;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
export interface BackgroundLayerProps extends LayerBaseProps {
|
|
868
|
+
style?: StyleProp<BackgroundLayerStyle>;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
export interface CircleLayerProps extends LayerBaseProps {
|
|
872
|
+
style?: StyleProp<CircleLayerStyle>;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
export interface FillExtrusionLayerProps extends Omit<LayerBaseProps, 'id'> {
|
|
876
|
+
id: string;
|
|
877
|
+
style?: StyleProp<FillExtrusionLayerStyle>;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
export interface FillLayerProps extends LayerBaseProps {
|
|
881
|
+
style?: StyleProp<FillLayerStyle>;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
export interface LineLayerProps extends LayerBaseProps {
|
|
885
|
+
style?: StyleProp<LineLayerStyle>;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
export interface RasterLayerProps extends LayerBaseProps {
|
|
889
|
+
style?: StyleProp<RasterLayerStyle>;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
export interface SymbolLayerProps extends LayerBaseProps {
|
|
893
|
+
style?: StyleProp<SymbolLayerStyle>;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
export interface HeatmapLayerProps extends LayerBaseProps {
|
|
897
|
+
style?: StyleProp<HeatmapLayerStyle>;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
export interface ImagesProps extends ViewProps {
|
|
901
|
+
images?: { assets?: string[] } & { [key: string]: ImageSourcePropType };
|
|
902
|
+
nativeAssetImages?: string[]
|
|
903
|
+
onImageMissing?: (imageKey: string) => void
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
export interface ImageSourceProps extends ViewProps {
|
|
907
|
+
id: string;
|
|
908
|
+
url?: number | string;
|
|
909
|
+
coordinates: [
|
|
910
|
+
GeoJSON.Position,
|
|
911
|
+
GeoJSON.Position,
|
|
912
|
+
GeoJSON.Position,
|
|
913
|
+
GeoJSON.Position,
|
|
914
|
+
];
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
export interface OfflineCreatePackOptions {
|
|
918
|
+
name?: string;
|
|
919
|
+
styleURL?: string;
|
|
920
|
+
bounds?: [GeoJSON.Position, GeoJSON.Position];
|
|
921
|
+
minZoom?: number;
|
|
922
|
+
maxZoom?: number;
|
|
923
|
+
metadata?: any;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
export interface SnapshotOptions {
|
|
927
|
+
centerCoordinate?: GeoJSON.Position;
|
|
928
|
+
width?: number;
|
|
929
|
+
height?: number;
|
|
930
|
+
zoomLevel?: number;
|
|
931
|
+
pitch?: number;
|
|
932
|
+
heading?: number;
|
|
933
|
+
styleURL?: string;
|
|
934
|
+
writeToDisk?: boolean;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
// Logger class
|
|
938
|
+
type LogLevel = "error" | "warning" | "info" | "debug" | "verbose";
|
|
939
|
+
|
|
940
|
+
interface LogObject {
|
|
941
|
+
level: LogLevel;
|
|
942
|
+
message: string;
|
|
943
|
+
tag: string;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
type LogCallback = (object: LogObject) => void;
|
|
947
|
+
|
|
948
|
+
export class Logger {
|
|
949
|
+
public static setLogCallback: (cb: LogCallback) => boolean;
|
|
950
|
+
public static setLogLevel: (level: LogLevel) => void;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
export default MapboxGL;
|