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 map center and zoom map update #168

Merged
merged 3 commits into from
Dec 22, 2023

Conversation

patrontheo
Copy link
Contributor

Fixes #154.

@blackary the solution you proposed in #154 to change the widget key works, but it triggers a widget reloading (map quickly disappearing and appearing again). This can be avoided by using setView instead of manually setting the zoom and the center separately (see leafleat issue 170.

I couldn't add tests since (to the best of my knowledge) playwright doesn't allow to interact with the map (change center and zoom). But you can test it on your side with the same sample code as in #154 and it works fine.

Tests were passing on my side.

Copy link
Collaborator

@blackary blackary left a comment

Choose a reason for hiding this comment

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

I'm also not sure how to make an automated test for this, but manually testing seems like it works great! Thanks!

Added a nit that I think would make it slightly more clear, but it's not a big dea.

@randyzwitch
Copy link
Owner

Since it's not clear how to automate a test, let's go with it for now and write a test later when it becomes more obvious

@randyzwitch randyzwitch merged commit 51f3346 into randyzwitch:master Dec 22, 2023
4 checks passed
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.

Dynamically updating center and zoom of the map does not work properly
3 participants