UNPKG

expo-osm-sdk

Version:

OpenStreetMap component for React Native with Expo

62 lines 2.15 kB
import { Coordinate, MarkerConfig, MarkerIcon, MarkerAnimation } from '../types'; /** * Validates if a coordinate is within valid geographic bounds */ export declare const isValidCoordinate: (coordinate: Coordinate | null | undefined) => boolean; /** * Validates and normalizes a coordinate */ export declare const validateCoordinate: (coordinate: Coordinate) => Coordinate; /** * Normalizes a coordinate to valid ranges */ export declare const normalizeCoordinate: (coordinate: Coordinate) => Coordinate; /** * Converts coordinate to string representation */ export declare const coordinateToString: (coordinate: Coordinate, precision?: number) => string; /** * Calculates the distance between two coordinates using the Haversine formula * Returns distance in meters */ export declare const calculateDistance: (from: Coordinate, to: Coordinate) => number; /** * Calculates the bearing (direction) from one coordinate to another * Returns bearing in degrees (0-360) */ export declare const calculateBearing: (from: Coordinate, to: Coordinate) => number; /** * Calculates the midpoint between two coordinates */ export declare const calculateMidpoint: (from: Coordinate, to: Coordinate) => Coordinate; /** * Checks if a coordinate is within a bounding box */ export declare const isWithinBounds: (coordinate: Coordinate, bounds: { north: number; south: number; east: number; west: number; }) => boolean; /** * Calculates a bounding box around a coordinate with given radius */ export declare const calculateBoundingBox: (center: Coordinate, radiusMeters: number) => { north: number; south: number; east: number; west: number; }; /** * Validates a marker icon configuration */ export declare const validateMarkerIcon: (icon: MarkerIcon | undefined) => boolean; /** * Validates a marker animation configuration */ export declare const validateMarkerAnimation: (animation: MarkerAnimation | undefined) => boolean; /** * Validates a complete marker configuration */ export declare const validateMarkerConfig: (marker: MarkerConfig, propName?: string) => void; //# sourceMappingURL=coordinate.d.ts.map