Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MGRS coords labeling - bug? #5

Open
oncoma opened this issue Mar 31, 2017 · 5 comments
Open

MGRS coords labeling - bug? #5

oncoma opened this issue Mar 31, 2017 · 5 comments

Comments

@oncoma
Copy link

oncoma commented Mar 31, 2017

Hello,

I would like to ask, if everything is ok with mgrs map coords labeling/or i just missed something? When I compared mgrs leaflet-grid with grid from mappingsupport, coords are different.

..and if there is a way to have more detailed mgrs grid like in example (red lines
mappingsupport
leaflet-mgrs
leaflet-mgrs-grid-example

)?

@JesseCrocker
Copy link
Contributor

Hello,
To get lines like in the last screenshot you posted you could change the spacing between grid lines, by modifying or replacing the _gridspacing method, see https://github.com/trailbehind/leaflet-grids/blob/master/leaflet-grids.js#L311

@JesseCrocker
Copy link
Contributor

As for the label coordinates being wrong, i think you're correct, the labels do appear to be wrong in this location.

@oncoma
Copy link
Author

oncoma commented Apr 1, 2017

This can be fixed?

@JesseCrocker
Copy link
Contributor

Yes, it can be fixed. It's not a high priority for anyone on our team right now, but we will probably get to it eventually. If you would like to try fixing it, we would welcome a pull request.

@oncoma
Copy link
Author

oncoma commented Apr 3, 2017

Yes, i just made a little research and changing (mgrs.js / encode fn line 371 )
"... seasting.substr(0, accuracy) + snorthing.substr(0, accuracy) .."
with
".. seasting.substr(1, accuracy) + snorthing.substr(2, accuracy); "...

is fixing this problem, i wil try do some more tests to check if this/or other methods work properly

solsticedhiver added a commit to solsticedhiver/leaflet-grids that referenced this issue Jun 22, 2018
* import latest mgrs.js from proj4js/mgrs repo and patch it to make it work with the plugin
* Fix issue trailbehind#4 (and trailbehind#5 ?) from original repo
* Move up mgrs.js declaration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants