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

Wrap longitude #262

Open
johanlahti opened this issue Nov 16, 2016 · 0 comments
Open

Wrap longitude #262

johanlahti opened this issue Nov 16, 2016 · 0 comments
Assignees
Labels

Comments

@johanlahti
Copy link
Contributor

When panning the world east or westwards the map repeats itself to imitate a turning globe. However, the longitude coordinate does not reset at 180 or 0 degrees (expected behaviour in Leaflet). Thus, the after one panning to the east the longitude will be 180< deg and to the west <-180 deg. Apart from weird-looking coordinates (e.g. long==-129381723) it gives problems on e.g. getFeature requests to WMS/WFS services.

The solution is to call .wrap() on all LatLng objects before handling them: http://leafletjs.com/reference.html#latlng-wrap

@johanlahti johanlahti added the bug label Nov 16, 2016
@johanlahti johanlahti added this to the smap-responsive future milestone Nov 16, 2016
@johanlahti johanlahti self-assigned this Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant