maplibre / maplibre-gl-leaflet

This is a binding from MapLibre GL JS to the familiar Leaflet API.
ISC License
135 stars 36 forks source link

Fix #29 - allow MapLibre GL JS to move to any latitude #31

Closed patrickarlt closed 2 years ago

patrickarlt commented 2 years ago

Turns out all we needed to do to fix #29 was allow MapLibre to move the map to any latitude. This also includes a debug folder with an example.

gavinr commented 2 years ago

Looks great! :+1:

wipfli commented 2 years ago

Thanks for taking the time to submit this pull request. I tested it locally and the map and the marker keep the same relative displacement, so it seems to solve the problem in #29.

What I am worried about is the change in behavior that users can now pan the map out of the viewport. Do you think this is problematic?

patrickarlt commented 2 years ago

What I am worried about is the change in behavior that users can now pan the map out of the viewport. Do you think this is problematic?

@wipfli as weird as it is this is actually the expected behavior in Leaflet. I just checked and if you go to the homepage and zoom out all the way you can pan the world right out of the screen. So I think this aligns with the default Leaflet behavior. If a user wants to limit it they can use map.setMaxBounds() in Leaflet to limit it.

2022-08-19_07-26-22

wipfli commented 2 years ago

You are right @patrickarlt

wipfli commented 2 years ago

We forgot the changelog item. Do you mind adding an item in a follow-up pull request @patrickarlt?