coordinates-parser
v2.0.0
Published
parse coordinates (lat, lon) into DMC (degree, minute, centiminute) and vice versa.
Downloads
22
Readme
coordinates-parser
parse coordinates (lat, lon) into dmc (degree, minute, centiminute) and vice versa.
Usage:
pnpm add coordinates-parser
import { toDmc } from "coordinates-parser";
const coordinates = {
lat: 50.711042,
lng: 4.53381,
};
// 50° 42.66' N 4° 32.2' E
const DMC = toDMC(coordinates);
import { toLatLng } from "coordinates-parser";
const DMC = `50° 42.66' N 4° 32.2' E`;
// { lat: 50.711042, lng: 4.533810 }
const coordinates = toLatLng(DMC);