Installation
npm install --save @types/formatcoords
Summary
This package contains type definitions for formatcoords (https://github.com/nerik/formatcoords).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/formatcoords.
index.d.ts
interface CoordsFormatOptions {
latLonSeparator?: string;
decimalPlaces?: number;
}
declare function format(options?: CoordsFormatOptions): string;
declare function format(formatString?: string, options?: CoordsFormatOptions): string;
declare function format(formatString: string, latLonSeparator: string): string;
interface LonLatValues {
initValue: number;
degrees: number;
degreesInt: number;
degreesFrac: number;
secondsTotal: number;
minutes: number;
minutesInt: number;
seconds: number;
}
interface CoordsObject {
format: typeof format;
north: boolean;
east: boolean;
latValues: LonLatValues;
lonValues: LonLatValues;
}
declare function formatcoords(lat: number, lon?: number, latlonSwapped?: boolean): CoordsObject;
declare function formatcoords([lat, lon]: [number, number], latlonSwapped?: boolean): CoordsObject;
declare function formatcoords(coords: string | { lat: number; lng: number }): CoordsObject;
export = formatcoords;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
Credits
These definitions were written by Vít Stanislav.