5

I am looking for a utility to calculate MGRS grid lines, or at least an algorithm. I would like to draw MGRS grid lines on a google or leaflet map.

Seems like most of what I find are shapefiles/vector data. Problem is this won't work if I don't have a connection. I would like to be able to draw the line dynamically.

Any ideas?

1
  • MGRS is based on UTM (WGS84). Please edit your question to specify the level of resolution required, since MGRS was developed for placement of military assets and artillery bombardment, and therfore has a range of potential scales. – Vince Nov 4 '16 at 23:29
6

There's a rough start to drawing MGRS grids in the leaflet-grids plugin.

If you just need the algorithms, mgrs.js should cover that.

2
0

How to draw mgrs grid lines on leaflet, googlemaps, apple maps, etc?

a leaflet sample: https://www.simplegrg.com/?grid=18SVF0944087193

there are 3 steps to do so

  1. Conversion LatLng to/from MGRS
  2. Draw lines
  3. Add labels

Step 1 :

http://www.fleyo.com/ge/help_usng.html

usng.js file on github

https://github.com/codice/usng.js

Step 2, 3, you need to do it use leaflet javascript api

Step 2: The grid lines are Leaflet polylines.

Step 3: The labels at the bottom edge and left edge of the screen are Leaflet divIcons.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.