import type { LatLng } from './map.types'; /** * Minimal structural GeoJSON types. * * Declared here rather than pulled from `@types/geojson` because the library * ships no runtime dependencies for maps and these are the only shapes the * outline renderer reads. Anything conforming to RFC 7946 satisfies them. */ export type GeoJsonPosition = number[]; export type GeoJsonCoordinates = GeoJsonPosition | GeoJsonCoordinates[]; export interface GeoJsonGeometry { type: string; coordinates?: GeoJsonCoordinates; geometries?: GeoJsonGeometry[]; } export interface GeoJsonFeature { type: 'Feature'; geometry: GeoJsonGeometry | null; properties?: Record | null; id?: string | number; } export interface GeoJsonFeatureCollection { type: 'FeatureCollection'; features: GeoJsonFeature[]; } export type GeoJsonInput = GeoJsonFeatureCollection | GeoJsonFeature | GeoJsonGeometry; /** * A single connected run of coordinates — one polygon ring or one line. * `closed` decides whether the renderer emits a `Z` at the end of the path. */ export interface GeoJsonRing { points: LatLng[]; closed: boolean; } /** Flattens any GeoJSON input into the runs of coordinates needed to draw it. */ export declare function geoJsonRings(input: GeoJsonInput | null | undefined): GeoJsonRing[]; /** Every coordinate in the input, for bounds and fitting. */ export declare function geoJsonPositions(input: GeoJsonInput | null | undefined): LatLng[];