@rr0/place
Version:
Place representation API
28 lines (27 loc) • 818 B
TypeScript
import { PlaceContext } from "../PlaceContext.js";
export type DMS = {
deg: number;
min: number;
sec: number;
positive: boolean;
};
export declare class PlaceLocation {
readonly lat: number;
readonly lng: number;
static readonly DMS_PATTERN: RegExp;
/**
*
* @param {float} lat Latitude in decimal degrees. North is positive.
* @param {float} lng Longitude in decimal degrees. East is positive.
*/
constructor(lat: number, lng: number);
/**
*
* @param dms A string with deg°minutes"seconds'N|S|E|O format
*/
static fromDMS(dms: string): PlaceLocation;
static fromDouble(double: number): DMS;
protected static toDouble(m: RegExpExecArray, offset: number): number;
toDMS(context: PlaceContext): string;
toString(): string;
}