import type { LatLng } from './map.types'; /** * Latitude beyond which the Mercator projection diverges. Web Mercator clamps * here (it is the value that makes the projected world square). */ export declare const MAX_MERCATOR_LAT = 85.05112878; /** * Mercator's horizontal coordinate: longitude in radians. * * Radians, not degrees — `mercatorY` is a natural log and therefore already in * radian-scale units. Mixing degrees on one axis with log-radians on the other * stretches the map by a factor of about 57. */ export declare function mercatorX(lng: number): number; /** Mercator's vertical coordinate. */ export declare function mercatorY(lat: number): number; export interface MapProjection { /** Projects a coordinate to a pixel position inside the container. */ project(point: LatLng): { x: number; y: number; }; width: number; height: number; } /** * Builds a Web Mercator projection that fits `points` into a pixel box. * * @description * This is what lets the map plot data with no Google Maps script at all. The * scale is uniform on both axes — the smaller of the horizontal and vertical * fits wins — so the geography keeps its true shape instead of being stretched * to the container. A reference outline drawn through the same projection stays * registered with the points on top of it. * * Returns `null` when there is nothing to fit or the box has no area, which the * caller should treat as "not ready to draw yet". * * @param padding - Pixels of margin kept clear on every side. */ export declare function createMercatorProjection(points: LatLng[], width: number, height: number, padding?: number): MapProjection | null;