Skip to content

fix: prevent crash on min/max zoom changes and fix zoom on navigation#572

Merged
jokerttu merged 3 commits intomainfrom
fix/android-zoom-level-crash-and-nav-override
Apr 21, 2026
Merged

fix: prevent crash on min/max zoom changes and fix zoom on navigation#572
jokerttu merged 3 commits intomainfrom
fix/android-zoom-level-crash-and-nav-override

Conversation

@jokerttu
Copy link
Copy Markdown
Contributor

@jokerttu jokerttu commented Apr 20, 2026

Android Fabric delivers minZoomLevel and maxZoomLevel prop updates in
arbitrary order, which could create a transient state where min > max,
crashing the app with IllegalArgumentException. Fix by resetting both
zoom preferences before atomically re-applying the pair.

Add zoomLevel parameter to setFollowingPerspective so zoom can be
controlled during active navigation. On Android this uses
FollowMyLocationOptions; on iOS it sets followingZoomLevel on the map
view (or GMSNavigationNoFollowingZoomLevel to reset).

Fixes #570
Fixes #550

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation
  • I added new tests to check the change I am making
  • All existing and new tests are passing.

@jokerttu jokerttu requested a review from illuminati1911 April 20, 2026 13:07
Copy link
Copy Markdown
Contributor

@illuminati1911 illuminati1911 left a comment

Choose a reason for hiding this comment

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

LGTM!

@jokerttu jokerttu marked this pull request as ready for review April 21, 2026 08:15
@jokerttu jokerttu merged commit 92cecf8 into main Apr 21, 2026
13 checks passed
@jokerttu jokerttu deleted the fix/android-zoom-level-crash-and-nav-override branch April 21, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants