leaflet-grids icon indicating copy to clipboard operation
leaflet-grids copied to clipboard

MGRS coords labeling - bug?

Open oncoma opened this issue 9 years ago • 5 comments

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

)?

oncoma avatar Mar 31 '17 08:03 oncoma

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 avatar Mar 31 '17 11:03 JesseCrocker

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

JesseCrocker avatar Mar 31 '17 11:03 JesseCrocker

This can be fixed?

oncoma avatar Apr 01 '17 05:04 oncoma

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.

JesseCrocker avatar Apr 03 '17 15:04 JesseCrocker

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

oncoma avatar Apr 03 '17 20:04 oncoma