Utility for converting between WGS84 lat/long and MGRS coordinates, spunoff from proj4js
npm install mgrs
import { LLtoMGRS, MGRStoLL, MGRStoBBoxLL } from 'mgrs';
const mgrs = LLtoMGRS([-77.03650573264287, 38.89773371566278]);
const [long, lat] = MGRStoLL('18SUJ2339307399');
const boundingLatlong = MGRStoBBoxLL('18SUJ2339307399');
const mgrs = require('mgrs');
const mgrs = mgrs.LLtoMGRS([-77.03650573264287, 38.89773371566278]);
const [long, lat] = mgrs.MGRStoLL('18SUJ2339307399');
const boundingLatlong = mgrs.MGRStoBBoxLL('18SUJ2339307399');
Install dependencies
npm install
Run test
npm test
Build package
npm run build
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
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.