declare module 'react-native-mapbox-gl__maps'; import { Component, ReactNode } from 'react'; import { ViewProps, ViewStyle, StyleProp, TextStyle, ImageSourcePropType, } from 'react-native'; import ReactNative from 'react-native'; import { Geometry, Properties, Position, Feature, LineString, Coord, Units, BBox, Id, FeatureCollection, } from '@turf/helpers'; import { Camera as _Camera, CameraStop as _CameraStop, CameraFollowConfig as _CameraFollowConfig, CameraMinMaxConfig as _CameraMinMaxConfig, CameraBounds as _CameraBounds, CameraPadding as _CameraPadding, CameraBoundsWithPadding as _CameraBoundsWithPadding, CameraStops as _CameraStops, CameraAnimationMode as _CameraAnimationMode, } from './javascript/components/Camera'; import { Atmosphere as _Atmosphere } from './javascript/components/Atmosphere'; import type { MapboxGLEvent as _MapboxGLEvent, UserTrackingMode as _UserTrackingMode, UserTrackingModeChangeCallback as _UserTrackingModeChangeCallback, AnimatedPoint as _AnimatedPoint, AnimatedLineString as _AnimatedLineString, } from './javascript/types/index'; import type { requestAndroidLocationPermissions as _requestAndroidLocationPermissions } from './javascript/requestAndroidLocationPermissions'; // prettier-ignore type ExpressionName = // Types | 'array' | 'boolean' | 'collator' | 'format' | 'image' | 'literal' | 'number' | 'number-format' | 'object' | 'string' | 'to-boolean' | 'to-color' | 'to-number' | 'to-string' | 'typeof' // Feature data | 'accumulated' | 'feature-state' | 'geometry-type' | 'id' | 'line-progress' | 'properties' // Lookup | 'at' | 'get' | 'has' | 'in' | 'index-of' | 'length' | 'slice' // Decision | '!' | '!=' | '<' | '<=' | '==' | '>' | '>=' | 'all' | 'any' | 'case' | 'match' | 'coalesce' | 'within' // Ramps, scales, curves | 'interpolate' | 'interpolate-hcl' | 'interpolate-lab' | 'step' // Variable binding | 'let' | 'var' // String | 'concat' | 'downcase' | 'is-supported-script' | 'resolved-locale' | 'upcase' // Color | 'rgb' | 'rgba' | 'to-rgba' // Math | '-' | '*' | '/' | '%' | '^' | '+' | 'abs' | 'acos' | 'asin' | 'atan' | 'ceil' | 'cos' | 'distance' | 'e' | 'floor' | 'ln' | 'ln2' | 'log10' | 'log2' | 'max' | 'min' | 'pi' | 'round' | 'sin' | 'sqrt' | 'tan' // Zoom, Heatmap | 'zoom' | 'heatmap-density'; type ExpressionField = | string | number | boolean | Expression | ExpressionField[] | { [key: string]: ExpressionField }; export type Expression = [ExpressionName, ...ExpressionField[]]; type Anchor = | 'center' | 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; type Visibility = 'visible' | 'none'; type Alignment = 'map' | 'viewport'; type AutoAlignment = Alignment | 'auto'; type NamedStyles = { [P in keyof T]: | SymbolLayerStyle | RasterLayerStyle | LineLayerStyle | FillLayerStyle | FillExtrusionLayerStyle | CircleLayerStyle | BackgroundLayerStyle; }; export type OnPressEvent = { features: Array; coordinates: { latitude: number; longitude: number; }; point: { x: number; y: number; }; }; declare namespace MapboxGL { function removeCustomHeader(headerName: string): void; function addCustomHeader(headerName: string, headerValue: string): void; function setAccessToken(accessToken: string | null): void; function setWellKnownTileServer(tileServer: string): void; function getAccessToken(): Promise; function setTelemetryEnabled(telemetryEnabled: boolean): void; function setConnected(connected: boolean): void; const requestAndroidLocationPermissions = _requestAndroidLocationPermissions; const Camera = _Camera; type Camera = _Camera; type CameraStop = _CameraStop; type CameraFollowConfig = _CameraFollowConfig; type CameraMinMaxConfig = _CameraMinMaxConfig; type CameraBounds = _CameraBounds; type CameraPadding = _CameraPadding; type CameraBoundsWithPadding = _CameraBoundsWithPadding; type CameraStops = _CameraStops; type CameraAnimationMode = _CameraAnimationMode; const Atmosphere = _Atmosphere; type MapboxGLEvent = _MapboxGLEvent; type UserTrackingMode = _UserTrackingMode; type UserTrackingModeChangeCallback = _UserTrackingModeChangeCallback; const offlineManager: OfflineManager; const snapshotManager: SnapshotManager; const locationManager: LocationManager; /** * GeoUtils */ interface UnitsOptions { units?: Units; } interface PositionsOptions { bbox?: BBox; id?: Id; } namespace geoUtils { function makePoint

( coordinates: Position, properties?: P, options?: PositionsOptions, ): Feature; function makeLineString

( coordinates: Position[], properties?: P, options?: PositionsOptions, ): Feature; function makeLatLngBounds( northEastCoordinates: Position[], southWestCoordinates: Position[], ): FeatureCollection; function makeFeature( geometry: G, properties?: P, ): Feature; function makeFeatureCollection( features: Array>, options?: PositionsOptions, ): FeatureCollection; function addToFeatureCollection( newFeatureCollection: Array>, newFeature: Feature, ): FeatureCollection; function calculateDistance( origin: Coord, dest: Coord, options?: UnitsOptions, ): number; function pointAlongLine( newLineString: Feature | LineString, distAlong: number, options?: UnitsOptions, ): Feature; function getOrCalculateVisibleRegion( coord: { lon: number; lat: number }, zoomLevel: number, width: number, height: number, nativeRegion: { properties: { visibleBounds: number[] }; visibleBounds: number[]; }, ): void; class AnimatedPoint { constructor(point?: AnimatedPoint); longitude: ReactNative.Animated.Value; latitude: ReactNative.Animated.Value; setValue: (point: GeoJSON.Point) => void; setOffset: (point: GeoJSON.Point) => void; flattenOffset: () => void; stopAnimation: (cb?: () => GeoJSON.Point) => void; addListener: (cb?: () => GeoJSON.Point) => void; removeListener: (id: string) => void; spring: ( config: Record, ) => ReactNative.Animated.CompositeAnimation; timing: ( config: Record, ) => ReactNative.Animated.CompositeAnimation; } class AnimatedShape { constructor(shape: AnimatedLineString); } } namespace Animated { // sources class ShapeSource extends Component {} class ImageSource extends Component {} // layers class FillLayer extends Component {} class FillExtrusionLayer extends Component {} class LineLayer extends Component {} class CircleLayer extends Component {} class SymbolLayer extends Component {} class RasterLayer extends Component {} class BackgroundLayer extends Component {} } /** * Components */ export class MapView extends Component { getPointInView(coordinate: GeoJSON.Position): Promise; getCoordinateFromView(point: GeoJSON.Position): Promise; getVisibleBounds(): Promise; queryRenderedFeaturesAtPoint( coordinate: GeoJSON.Position, filter?: Expression, layerIds?: Array, ): Promise; queryRenderedFeaturesInRect( coordinate: GeoJSON.Position, filter?: Expression, layerIds?: Array, ): Promise; takeSnap(writeToDisk?: boolean): Promise; getZoom(): Promise; getCenter(): Promise; showAttribution(): void; setSourceVisibility( visible: boolean, sourceId: string, sourceLayerId?: string, ): void; } type Padding = number | [number, number] | [number, number, number, number]; class UserLocation extends Component {} interface Location { coords: Coordinates; timestamp?: number; } interface Coordinates { /** * The heading (measured in degrees) relative to true north. * Heading is used to describe the direction the device is pointing to (the value of the compass). * Note that on Android this is incorrectly reporting the course value as mentioned in issue https://github.com/rnmapbox/maps/issues/1213 * and will be corrected in a future update. */ heading?: number; /** * The direction in which the device is traveling, measured in degrees and relative to due north. * The course refers to the direction the device is actually moving (not the same as heading). */ course?: number; /** * The instantaneous speed of the device, measured in meters per second. */ speed?: number; /** * The latitude in degrees. */ latitude: number; /** * The longitude in degrees. */ longitude: number; /** * The radius of uncertainty for the location, measured in meters. */ accuracy?: number; /** * The altitude, measured in meters. */ altitude?: number; } class Light extends Component {} class StyleSheet extends Component { static create | NamedStyles>(styles: T): T; camera( stops: { [key: number]: string }, interpolationMode?: InterpolationMode, ): void; source( stops: { [key: number]: string }, attributeName: string, interpolationMode?: InterpolationMode, ): void; composite( stops: { [key: number]: string }, attributeName: string, interpolationMode?: InterpolationMode, ): void; identity(attributeName: string): number; } class PointAnnotation extends Component { refresh(): void; } class MarkerView extends Component {} class Callout extends Component {} type Style = React.FC; /** * Sources */ class VectorSource extends Component {} class ShapeSource extends Component { features( filter?: Expression, ): Promise>; getClusterExpansionZoom( feature: Feature | number, ): Promise; /** * Returns all the leaves of a cluster with pagination support. * @param cluster feature cluster * @param limit the number of leaves to return * @param offset the amount of points to skip (for pagination) */ getClusterLeaves: ( feature: Feature | number, limit: number, offset: number, ) => Promise>; /** * Returns the children of a cluster (on the next zoom level). * @param cluster feature cluster */ getClusterChildren: ( feature: Feature | number, ) => Promise>; } class RasterSource extends Component {} class RasterDemSource extends Component {} /** * Layers */ class BackgroundLayer extends Component {} class CircleLayer extends Component {} class FillExtrusionLayer extends Component {} class FillLayer extends Component {} class LineLayer extends Component {} class RasterLayer extends Component {} class SymbolLayer extends Component {} class HeatmapLayer extends Component {} class Images extends Component {} class ImageSource extends Component {} class SkyLayer extends Component {} class LocationManager extends Component { start(displacement?: number): void; stop(): void; } /** * Offline */ class OfflineManager extends Component { clearAmbientCache(): Promise; createPack( options: OfflineCreatePackOptions, progressListener?: ( pack: OfflinePack, status: OfflineProgressStatus, ) => void, errorListener?: (pack: OfflinePack, err: OfflineProgressError) => void, ): Promise; deletePack(name: string): Promise; getPack(name: string): Promise; getPacks(): Promise>; invalidateAmbientCache(): Promise; invalidatePack(name: string): Promise; migrateOfflineCache(): Promise; resetDatabase(): Promise; setMaximumAmbientCacheSize(size: number): Promise; setProgressEventThrottle(throttleValue: number): void; setTileCountLimit(limit: number): void; subscribe( packName: string, progressListener: (pack: OfflinePack, status: object) => void, errorListener?: (pack: OfflinePack, err: object) => void, ): void; unsubscribe(packName: string): void; } class SnapshotManager { static takeSnap(options: SnapshotOptions): Promise; } interface OfflineProgressStatus { name: string; state: number; percentage: number; completedResourceSize: number; completedTileCount: number; completedResourceCount: number; requiredResourceCount: number; completedTileSize: number; } interface OfflineProgressError { message: string; name: string; } interface OfflinePack { name: string; bounds: [GeoJSON.Position, GeoJSON.Position]; metadata: any; status: () => Promise; resume: () => Promise; pause: () => Promise; } interface OfflinePackStatus { name: string; state: number; percentage: number; completedResourceCount: number; completedResourceSize: number; completedTileSize: number; completedTileCount: number; requiredResourceCount: number; } /** * Constants */ enum UserTrackingModes { Follow = 'normal', FollowWithHeading = 'compass', FollowWithCourse = 'course', } enum InterpolationMode { Exponential = 0, Categorical = 1, Interval = 2, Identity = 3, } enum StyleURL { Street = 'mapbox://styles/mapbox/streets-v11', Dark = 'mapbox://styles/mapbox/dark-v10', Light = 'mapbox://styles/mapbox/light-v10', Outdoors = 'mapbox://styles/mapbox/outdoors-v11', Satellite = 'mapbox://styles/mapbox/satellite-v9', SatelliteStreet = 'mapbox://styles/mapbox/satellite-streets-v11', TrafficDay = 'mapbox://styles/mapbox/navigation-preview-day-v4', TrafficNight = 'mapbox://styles/mapbox/navigation-preview-night-v4', } } export type OrnamentPosition = | { top: number; left: number } | { top: number; right: number } | { bottom: number; left: number } | { bottom: number; right: number }; export interface RegionPayload { zoomLevel: number; heading: number; animated: boolean; isUserInteraction: boolean; visibleBounds: GeoJSON.Position[]; pitch: number; } /** * v10 only - experimental */ export interface MapState { properties: { center: GeoJSON.Position; bounds: { ne: GeoJSON.Position; sw: GeoJSON.Position; }; zoom: number; heading: number; pitch: number; }; gestures: { isGestureActive: boolean; isAnimatingFromGesture: boolean; }; } export interface MapViewProps extends ViewProps { animated?: boolean; userTrackingMode?: MapboxGL.UserTrackingModes; userLocationVerticalAlignment?: number; contentInset?: Array; style?: StyleProp; styleURL?: string; styleJSON?: string; preferredFramesPerSecond?: number; localizeLabels?: boolean; zoomEnabled?: boolean; scrollEnabled?: boolean; pitchEnabled?: boolean; rotateEnabled?: boolean; attributionEnabled?: boolean; attributionPosition?: OrnamentPosition; logoEnabled?: boolean; logoPosition?: OrnamentPosition; compassEnabled?: boolean; compassFadeWhenNorth?: boolean; compassPosition?: OrnamentPosition; compassViewPosition?: number; compassViewMargins?: Point; scaleBarEnabled?: boolean; scaleBarPosition?: OrnamentPosition; surfaceView?: boolean; regionWillChangeDebounceTime?: number; regionDidChangeDebounceTime?: number; tintColor?: string; onPress?: (feature: GeoJSON.Feature) => void; onLongPress?: (feature: GeoJSON.Feature) => void; onRegionWillChange?: ( feature: GeoJSON.Feature, ) => void; onRegionIsChanging?: ( feature: GeoJSON.Feature, ) => void; onRegionDidChange?: ( feature: GeoJSON.Feature, ) => void; onCameraChanged?: (state: MapState) => void; onMapIdle?: (state: MapState) => void; onUserLocationUpdate?: (feature: MapboxGL.Location) => void; onWillStartLoadingMap?: () => void; onDidFinishLoadingMap?: () => void; onDidFailLoadingMap?: () => void; onWillStartRenderingFrame?: () => void; onDidFinishRenderingFrame?: () => void; onDidFinishRenderingFrameFully?: () => void; onWillStartRenderingMap?: () => void; onDidFinishRenderingMap?: () => void; onDidFinishRenderingMapFully?: () => void; onDidFinishLoadingStyle?: () => void; onUserTrackingModeChange?: () => void; } export interface UserLocationProps { androidRenderMode?: 'normal' | 'compass' | 'gps'; animated?: boolean; children?: ReactNode; minDisplacement?: number; onPress?: () => void; onUpdate?: (location: MapboxGL.Location) => void; renderMode?: 'normal' | 'native'; showsUserHeadingIndicator?: boolean; visible?: boolean; } export type WithExpression = { [P in keyof T]: T[P] | Expression; }; export interface LightStyle { anchor?: Alignment | Expression; position?: GeoJSON.Position | Expression; positionTransition?: Transition | Expression; color?: string | Expression; colorTransition?: Transition | Expression; intensity?: number | Expression; intensityTransition?: Transition | Expression; } export interface Transition { duration: number; delay: number; } export interface BackgroundLayerStyle { visibility?: Visibility | Expression; backgroundColor?: string | Expression; backgroundColorTransition?: Transition | Expression; backgroundPattern?: string | Expression; backgroundPatternTransition?: Transition | Expression; backgroundOpacity?: number | Expression; backgroundOpacityTransition?: Transition | Expression; } export interface CircleLayerStyle { visibility?: Visibility | Expression; circleRadius?: number | Expression; circleRadiusTransition?: Transition | Expression; circleColor?: string | Expression; circleColorTransition?: Transition | Expression; circleBlur?: number | Expression; circleBlurTransition?: Transition | Expression; circleOpacity?: number | Expression; circleOpacityTransition?: Transition | Expression; circleTranslate?: Array | Expression; circleTranslateTransition?: Transition | Expression; circleTranslateAnchor?: Alignment | Expression; circlePitchScale?: Alignment | Expression; circlePitchAlignment?: Alignment | Expression; circleStrokeWidth?: number | Expression; circleStrokeWidthTransition?: Transition | Expression; circleStrokeColor?: string | Expression; circleStrokeColorTransition?: Transition | Expression; circleStrokeOpacity?: number | Expression; circleStrokeOpacityTransition?: Transition | Expression; } export interface FillExtrusionLayerStyle { visibility?: Visibility | Expression; fillExtrusionOpacity?: number | Expression; fillExtrusionOpacityTransition?: Transition | Expression; fillExtrusionColor?: string | Expression; fillExtrusionColorTransition?: Transition | Expression; fillExtrusionTranslate?: Array | Expression; fillExtrusionTranslateTransition?: Transition | Expression; fillExtrusionTranslateAnchor?: Alignment | Expression; fillExtrusionPattern?: string | Expression; fillExtrusionPatternTransition?: Transition | Expression; fillExtrusionHeight?: number | Expression; fillExtrusionHeightTransition?: Transition | Expression; fillExtrusionBase?: number | Expression; fillExtrusionBaseTransition?: Transition | Expression; } export interface FillLayerStyle { visibility?: Visibility | Expression; fillAntialias?: boolean | Expression; fillOpacity?: number | Expression; fillExtrusionOpacityTransition?: Transition | Expression; fillColor?: string | Expression; fillColorTransition?: Transition | Expression; fillOutlineColor?: string | Expression; fillOutlineColorTransition?: Transition | Expression; fillTranslate?: Array | Expression; fillTranslateTransition?: Transition | Expression; fillTranslateAnchor?: Alignment | Expression; fillPattern?: string | Expression; fillPatternTransition?: Transition | Expression; } export interface SkyLayerStyle { skyType: string | Expression; skyAtmosphereSun?: Array | Expression; skyAtmosphereSunIntensity: number | Expression; } export interface LineLayerStyle { lineCap?: 'butt' | 'round' | 'square' | Expression; lineJoin?: 'bevel' | 'round' | 'miter' | Expression; lineMiterLimit?: number | Expression; lineRoundLimit?: number | Expression; visibility?: Visibility | Expression; lineOpacity?: number | Expression; lineOpacityTransition?: Transition | Expression; lineColor?: string | Expression; lineColorTransition?: Transition | Expression; lineTranslate?: Array | Expression; lineTranslateTransition?: Transition | Expression; lineTranslateAnchor?: Alignment | Expression; lineWidth?: number | Expression; lineWidthTransition?: Transition | Expression; lineGapWidth?: number | Expression; lineGapWidthTransition?: Transition | Expression; lineOffset?: number | Expression; lineOffsetTransition?: Transition | Expression; lineBlur?: number | Expression; lineBlurTransition?: Transition | Expression; lineDasharray?: Array | Expression; lineDasharrayTransition?: Transition | Expression; linePattern?: string | Expression; linePatternTransition?: Transition | Expression; } export interface RasterLayerStyle { visibility?: Visibility | Expression; rasterOpacity?: number | Expression; rasterOpacityTransition?: Transition | Expression; rasterHueRotate?: Expression; rasterHueRotateTransition?: Transition | Expression; rasterBrightnessMin?: number | Expression; rasterBrightnessMinTransition?: Transition | Expression; rasterBrightnessMax?: number | Expression; rasterBrightnessMaxTransition?: Transition | Expression; rasterSaturation?: number | Expression; rasterSaturationTransition?: Transition | Expression; rasterContrast?: number | Expression; rasterContrastTransition?: Transition | Expression; rasterFadeDuration?: number | Expression; } export type TextVariableAnchorValues = | 'center' | 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; export interface SymbolLayerStyle { symbolPlacement?: 'point' | 'line' | Expression; symbolSpacing?: number | Expression; symbolAvoidEdges?: boolean | Expression; symbolSortKey?: number | Expression; symbolZOrder?: 'auto' | 'viewport-y' | 'source' | Expression; iconAllowOverlap?: boolean | Expression; iconIgnorePlacement?: boolean | Expression; iconOptional?: boolean | Expression; iconRotationAlignment?: AutoAlignment | Expression; iconSize?: number | Expression; iconTextFit?: 'none' | 'width' | 'height' | 'both' | Expression; iconTextFitPadding?: Array | Expression; iconImage?: string | Expression; iconRotate?: number | Expression; iconPadding?: number | Expression; iconKeepUpright?: boolean | Expression; iconOffset?: Array | Expression; iconAnchor?: Anchor | Expression; iconPitchAlignment?: AutoAlignment | Expression; textPitchAlignment?: AutoAlignment | Expression; textRotationAlignment?: AutoAlignment | Expression; textField?: string | Expression; textFont?: Array | Expression; textSize?: number | Expression; textMaxWidth?: number | Expression; textLineHeight?: number | Expression; textLetterSpacing?: number | Expression; textJustify?: 'left' | 'center' | 'right' | Expression; textAnchor?: Anchor | Expression; textMaxAngle?: number | Expression; textRotate?: number | Expression; textPadding?: number | Expression; textKeepUpright?: boolean | Expression; textTransform?: 'none' | 'uppercase' | 'lowercase' | Expression; textOffset?: Array | Expression; textAllowOverlap?: boolean | Expression; textIgnorePlacement?: boolean | Expression; textOptional?: boolean | Expression; textVariableAnchor?: Array; textRadialOffset?: number | Expression; visibility?: Visibility | Expression; iconOpacity?: number | Expression; iconOpacityTransition?: Transition | Expression; iconColor?: string | Expression; iconColorTransition?: Transition | Expression; iconHaloColor?: string | Expression; iconHaloColorTransition?: Transition | Expression; iconHaloWidth?: number | Expression; iconHaloWidthTransition?: Transition | Expression; iconHaloBlur?: number | Expression; iconHaloBlurTransition?: Transition | Expression; iconTranslate?: Array | Expression; iconTranslateTransition?: Transition | Expression; iconTranslateAnchor?: Alignment | Expression; textOpacity?: number | Expression; textOpacityTransition?: Transition | Expression; textColor?: string | Expression; textColorTransition?: Transition | Expression; textHaloColor?: string | Expression; textHaloColorTransition?: Transition | Expression; textHaloWidth?: number | Expression; textHaloWidthTransition?: Transition | Expression; textHaloBlur?: number | Expression; textHaloBlurTransition?: Transition | Expression; textTranslate?: Array | Expression; textTranslateTransition?: Transition | Expression; textTranslateAnchor?: Alignment | Expression; } export interface HeatmapLayerStyle { visibility?: Visibility | Expression; heatmapRadius?: number | Expression; heatmapRadiusTransition?: Transition | Expression; heatmapWeight?: number | Expression; heatmapIntensity?: number | Expression; heatmapIntensityTransition?: Transition | Expression; heatmapColor?: string | Expression; heatmapOpacity?: number | Expression; heatmapOpacityTransition?: Transition | Expression; } export interface Point { x: number; y: number; } export interface LightProps extends Omit { style?: LightStyle; } export interface PointAnnotationProps { id: string; title?: string; snippet?: string; selected?: boolean; draggable?: boolean; coordinate: GeoJSON.Position; anchor?: Point; children: JSX.Element; onSelected?: () => void; onDeselected?: () => void; onDragStart?: () => void; onDrag?: () => void; onDragEnd?: () => void; } export type MarkerViewProps = PointAnnotationProps; export interface StyleProps { json: any; } export interface CalloutProps extends Omit { title?: string; style?: StyleProp>; containerStyle?: StyleProp>; contentStyle?: StyleProp>; tipStyle?: StyleProp>; textStyle?: StyleProp>; } export interface TileSourceProps extends ViewProps { id: string; url?: string; tileUrlTemplates?: Array; minZoomLevel?: number; maxZoomLevel?: number; } export interface VectorSourceProps extends TileSourceProps { onPress?: (event: OnPressEvent) => void; hitbox?: { width: number; height: number; }; } export interface ShapeSourceProps extends ViewProps { id: string; url?: string; shape?: | GeoJSON.GeometryCollection | GeoJSON.Feature | GeoJSON.FeatureCollection | GeoJSON.Geometry; cluster?: boolean; clusterRadius?: number; clusterMaxZoomLevel?: number; clusterProperties?: object; maxZoomLevel?: number; buffer?: number; tolerance?: number; lineMetrics?: boolean; images?: { assets?: string[] } & { [key: string]: ImageSourcePropType }; onPress?: (event: OnPressEvent) => void; hitbox?: { width: number; height: number; }; } export interface RasterSourceProps extends TileSourceProps { tileSize?: number; } export interface LayerBaseProps extends Omit { id: string; sourceID?: string; sourceLayerID?: string; aboveLayerID?: string; belowLayerID?: string; layerIndex?: number; filter?: Expression; minZoomLevel?: number; maxZoomLevel?: number; } export interface BackgroundLayerProps extends LayerBaseProps { style?: StyleProp; } export interface CircleLayerProps extends LayerBaseProps { style?: StyleProp; } export interface FillExtrusionLayerProps extends Omit { id: string; style?: StyleProp; } export interface FillLayerProps extends LayerBaseProps { style?: StyleProp; } export interface LineLayerProps extends LayerBaseProps { style?: StyleProp; } export interface RasterLayerProps extends LayerBaseProps { style?: StyleProp; } export interface SymbolLayerProps extends LayerBaseProps { style?: StyleProp; } export interface HeatmapLayerProps extends LayerBaseProps { style?: StyleProp; } export interface ImagesProps extends ViewProps { images?: { assets?: string[] } & { [key: string]: ImageSourcePropType }; nativeAssetImages?: string[]; onImageMissing?: (imageKey: string) => void; } export interface ImageSourceProps extends ViewProps { id: string; url?: number | string; coordinates: [ GeoJSON.Position, GeoJSON.Position, GeoJSON.Position, GeoJSON.Position, ]; } export interface OfflineCreatePackOptions { name?: string; styleURL?: string; bounds?: [GeoJSON.Position, GeoJSON.Position]; minZoom?: number; maxZoom?: number; metadata?: any; } export interface SnapshotOptions { centerCoordinate?: GeoJSON.Position; width?: number; height?: number; zoomLevel?: number; pitch?: number; heading?: number; styleURL?: string; writeToDisk?: boolean; } export interface SkyLayerProps extends LayerBaseProps { id: string; style?: StyleProp; } // Logger class type LogLevel = 'error' | 'warning' | 'info' | 'debug' | 'verbose'; interface LogObject { level: LogLevel; message: string; tag: string; } type LogCallback = (object: LogObject) => void; export class Logger { public static setLogCallback: (cb: LogCallback) => boolean; public static setLogLevel: (level: LogLevel) => void; } export import MapView = MapboxGL.MapView; export import Camera = MapboxGL.Camera; export import CameraStop = MapboxGL.CameraStop; export import CameraFollowConfig = MapboxGL.CameraFollowConfig; export import CameraMinMaxConfig = MapboxGL.CameraMinMaxConfig; export import CameraBounds = MapboxGL.CameraBounds; export import CameraPadding = MapboxGL.CameraPadding; export import CameraBoundsWithPadding = MapboxGL.CameraBoundsWithPadding; export import CameraStops = MapboxGL.CameraStops; export import CameraAnimationMode = MapboxGL.CameraAnimationMode; export import Atmosphere = MapboxGL.Atmosphere; export import Terrain = MapboxGL.Terrain; export import RasterDemSource = MapboxGL.RasterDemSource; export import SkyLayer = MapboxGL.SkyLayer; export import ShapeSource = MapboxGL.ShapeSource; export import CircleLayer = MapboxGL.CircleLayer; export import MapboxGLEvent = MapboxGL.MapboxGLEvent; export import UserTrackingMode = MapboxGL.UserTrackingMode; export import UserTrackingModeChangeCallback = MapboxGL.UserTrackingModeChangeCallback; export import AnimatedPoint = MapboxGL.AnimatedPoint; export import AnimatedShape = MapboxGL.AnimatedShape; export const { offlineManager } = MapboxGL; export default MapboxGL;