import type { DynamicMapOptions } from "./dynamicMapTypes"; /** * Represents a geographic point with latitude and longitude */ export interface Point { /** Latitude in degrees (-90 to 90) */ lat: number; /** Longitude in degrees (-180 to 180) */ lon: number; } /** * Represents a marker on the map with optional styling */ export interface MapMarker extends Point { /** Optional label for the marker */ label?: string; /** Color in hex or rgba format */ color?: string; /** Display priority for label visibility */ priority?: "critical" | "high" | "normal" | "low"; } /** * Represents a polygon with styling options */ export interface MapPolygon { /** Type of shape */ type: "polygon" | "circle"; /** Optional label for the polygon */ label?: string; /** Fill color in rgba format */ fillColor?: string; /** Stroke color in hex format */ strokeColor?: string; /** Stroke width in pixels */ strokeWidth?: number; /** For type='polygon': Array of [longitude, latitude] coordinates */ coordinates?: [number, number][]; /** For type='circle': Center point */ center?: Point; /** For type='circle': Radius in meters */ radius?: number; } /** * Represents geographic bounds */ export interface Bounds { /** Northern latitude bound */ north: number; /** Southern latitude bound */ south: number; /** Eastern longitude bound */ east: number; /** Western longitude bound */ west: number; } /** * Result of bounds calculation including center and zoom */ export interface BoundsResult { /** Calculated bounds with padding */ bounds: Bounds; /** Center point [longitude, latitude] */ center: [number, number]; /** Calculated optimal zoom level */ zoom: number; } /** * Generate points to approximate a circle using great circle calculations */ export declare function generateCirclePoints(centerLat: number, centerLon: number, radiusMeters: number, numPoints?: number): Point[]; /** * Compute the centroid of a polygon from its exterior coordinate ring. * Uses the shoelace/Green's theorem formula for geometric accuracy — * a simple coordinate average can place the centroid outside irregular shapes. */ export declare function computePolygonCentroid(coordinates: [number, number][]): { lon: number; lat: number; }; /** * Calculate optimal zoom level for the given bounds and map dimensions */ export declare function calculateOptimalZoom(bounds: Bounds, mapWidth: number, mapHeight: number, paddingPixels?: number): number; type RoutePoint = { lat: number; lon: number; }; type RouteData = RoutePoint[] | { points?: RoutePoint[]; }; /** * Calculate enhanced bounds with buffer for a set of points */ export declare function calculateEnhancedBounds(markers: NonNullable, routes: RouteData[], mapWidth: number, mapHeight: number, polygons?: NonNullable): BoundsResult; /** * Extract and validate coordinates from various formats */ export declare function extractCoordinates(item: unknown, index: number | string, type?: string): Point | null; export {};