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

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

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

patrickarlt
Copy link
Contributor

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.

@patrickarlt patrickarlt changed the title Fix #29 Fix #29 - allow MapLibre GL JS to move to any latitude Aug 19, 2022
@gavinr
Copy link
Contributor

gavinr commented Aug 19, 2022

Looks great! 👍

@wipfli
Copy link
Member

wipfli commented Aug 19, 2022

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
Copy link
Contributor Author

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
Copy link
Member

wipfli commented Aug 19, 2022

You are right @patrickarlt

Copy link
Member

@wipfli wipfli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is what leaflet does, I think it is good to go. Thanks for the contribution @patrickarlt!

@wipfli wipfli merged commit 434d6e7 into maplibre:main Aug 19, 2022
@wipfli
Copy link
Member

wipfli commented Aug 19, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maplibre-gl-leaflet layer is mis-aligned with map when panning the map off screen
3 participants