Leaflet.MousePosition icon indicating copy to clipboard operation
Leaflet.MousePosition copied to clipboard

Coordinates incorrect at or beyond -85, -180, 85, 180

Open dankarran opened this issue 10 years ago • 1 comments

When moving the mouse above or below the latitude bounds (85º for Mercator maps), the latitude value should probably be capped at 85º.

When moving the mouse east or west beyond 180º, the longitude value should show the correct longitude for that copy of the world rather than continuing past 180º or -180º.

dankarran avatar Mar 05 '14 14:03 dankarran

I've added a fixLng method which seems to do the trick for longitude values: https://github.com/dankarran/Leaflet.MousePosition/commit/d006373b2053a47cf69e46d3b4acf432420ba4bd

dankarran avatar Mar 05 '14 16:03 dankarran