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 zooming when Map Bounds are not fitted #442

Merged
merged 9 commits into from
Jan 27, 2025

Conversation

matbmapspeople
Copy link
Contributor

I found out that mapPositionKnown property has two values during its' lifetime: false - when the location is not known and GeoJSON object - when location is known.

To fix it I passed mapPositionKnown as last param to goTo() function and I explicitly check if mapPositionKnown is not false. Then I perform zooming.

Working solution:

Uploading Screen Recording 2025-01-14 at 20.33.42.mov…

@matbmapspeople
Copy link
Contributor Author

Let me know if there are any code suggestions from you @Lucaci-Andrei @ammapspeople
Since we spent some time on it together @Lucaci-Andrei, I would appreciate if you can test it 🙏

@matbmapspeople
Copy link
Contributor Author

Did you manage to find some time checking this possible solution 😄?

@Lucaci-Andrei
Copy link
Contributor

Looks good to me 👍

@matbmapspeople
Copy link
Contributor Author

Did you also manage to test it @Lucaci-Andrei ?

@Lucaci-Andrei
Copy link
Contributor

Did you also manage to test it @Lucaci-Andrei ?

Yes, I tested it on the solution where the issue occured. The bug did not re-appear in my tests

@matbmapspeople
Copy link
Contributor Author

Do you have any opinions about this approach @ammapspeople?

@ammapspeople
Copy link
Contributor

@matbmapspeople My opinion is that this needs to be tested thoroughly.

@matbmapspeople matbmapspeople merged commit 3b61461 into main Jan 27, 2025
@matbmapspeople matbmapspeople deleted the bugfix/fix_start_zoom_level_possible_fix branch January 27, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants