leaflet-polydraw
Version:
Advanced Leaflet plugin for freehand polygon drawing, with smart merging and powerful editing tools. Compatible with both Leaflet v1.x and v2.x.
31 lines • 1.22 kB
TypeScript
/**
* CoordinateUtils - Handles coordinate conversions and transformations
* This is a small, focused module for coordinate-related operations
*/
import * as L from 'leaflet';
import type { TurfHelper } from './turf-helper';
export declare class CoordinateUtils {
/**
* Convert coordinate arrays to proper format for polygon creation
*/
static convertToCoords(latlngs: L.LatLngLiteral[][], turfHelper: TurfHelper): number[][][];
/**
* Apply offset to polygon coordinates
*/
static offsetPolygonCoordinates(latLngs: L.LatLngLiteral[][], offsetLat: number, offsetLng: number): L.LatLngLiteral[][];
/**
* Get latitude/longitude information string
*/
static getLatLngInfoString(latlng: L.LatLngLiteral): string;
/**
* Convert any coordinate format to L.LatLng
* Supports multiple input formats with smart auto-detection
*/
static convertToLatLng(coordinate: unknown): L.LatLng;
/**
* Convert any coordinate array format to L.LatLng[][][]
* Used by addPredefinedPolygon for flexible input handling
*/
static convertToLatLngArray(geoborders: unknown[][][]): L.LatLng[][][];
}
//# sourceMappingURL=coordinate-utils.d.ts.map