leaflet
Version:
JavaScript library for mobile-friendly interactive maps
24 lines (23 loc) • 995 B
TypeScript
import { CRS } from './CRS.js';
import type { LatLng } from '../LatLng.js';
/** @import {LatLng} from '../LatLng.js' */
/**
* Serves as the base for CRS that are global such that they cover the earth. Can only be used as the base for other
* CRS and cannot be used directly, since it does not have a `code`, `projection` or `transformation`. `distance()`
* returns meters.
*/
export declare class EarthCRS extends CRS {
/** @type {[number, number]} */
static wrapLng: [number, number];
/**
* The mean Earth radius in meters used by [`distance`](#earthcrs-distance), as recommended by the International
* Union of Geodesy and Geophysics (see https://rosettacode.org/wiki/Haversine_formula).
*/
static R: number;
/**
* Returns the distance in meters between two geographical points, using the Haversine approximation.
* @param {LatLng} latlng1
* @param {LatLng} latlng2
*/
static distance(latlng1: LatLng, latlng2: LatLng): number;
}