//mgrsbymrleblanc101

mgrs

Utility for converting between WGS84 lat/lng and MGRS coordinates

1
0
1
JavaScript

mgrs

Utility for converting between WGS84 lat/long and MGRS coordinates, spunoff from proj4js

Usage

npm install mgrs

ES6:

import { LLtoMGRS, MGRStoLL, MGRStoBBoxLL } from 'mgrs';

const mgrs = LLtoMGRS([-77.03650573264287, 38.89773371566278]);
const [long, lat] = MGRStoLL('18SUJ2339307399');
const boundingLatlong = MGRStoBBoxLL('18SUJ2339307399');

CommonJS:

const mgrs = require('mgrs');

const mgrs = mgrs.LLtoMGRS([-77.03650573264287, 38.89773371566278]);
const [long, lat] = mgrs.MGRStoLL('18SUJ2339307399');
const boundingLatlong = mgrs.MGRStoBBoxLL('18SUJ2339307399');

Contribute

Install dependencies

npm install

Run test

npm test

Build package

npm run build

References


Licensed under the MIT license except:

Portions of this software are based on a port of components from the OpenMap
com.bbn.openmap.proj.coords Java package. An initial port was initially created
by Patrice G. Cappelaere and included in Community Mapbuilder
(http://svn.codehaus.org/mapbuilder/), which is licensed under the LGPL license
as per http://www.gnu.org/copyleft/lesser.html. OpenMap is licensed under the
this license agreement

[beta]v0.14.0