import type {TurboModule} from 'react-native'; import {TurboModuleRegistry} from 'react-native'; import type {Double} from 'react-native/Libraries/Types/CodegenTypes'; import type {Camera} from './NativeComponentMapView'; import type {Address} from '../MapView.types'; type LatLng = { latitude: Double; longitude: Double; }; type Point = Readonly<{ x: Double; // Non-nullable Double for x y: Double; // Non-nullable Double for y }>; export type Region = Readonly< LatLng & { latitudeDelta: Double; // Non-nullable Double for latitudeDelta longitudeDelta: Double; // Non-nullable Double for longitudeDelta } >; export type MapBoundaries = {northEast: LatLng; southWest: LatLng}; export interface Spec extends TurboModule { getCamera(tag: Double): Promise; getMarkersFrames(tag: Double, onlyVisible: boolean): Promise; getMapBoundaries(tag: Double): Promise; takeSnapshot(tag: Double, config: string): Promise; getAddressFromCoordinates(tag: Double, coordinate: LatLng): Promise
; getPointForCoordinate(tag: Double, coordinate: LatLng): Promise; getCoordinateForPoint(tag: Double, point: Point): Promise; } export default TurboModuleRegistry.getEnforcing('RNMapsAirModule');