You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Map is too easy to unintentionally rotate with multi-finger gesture #2232
Unexpected map rotation when zooming on mobile devices
Description
Hello flutter_map team,
I noticed an unexpected behavior when using flutter_map on mobile devices.
When performing a pinch-to-zoom gesture, the map sometimes rotates automatically even though the user did not intend to rotate the map.
Steps to reproduce
Open a Flutter application using flutter_map.
Display a map on an Android or iOS device.
Use two fingers to perform a normal pinch zoom gesture.
Slightly move the fingers during the zoom action.
Expected behavior
The map should only zoom in/out and keep the current rotation unchanged.
Actual behavior
The map rotates during the zoom gesture without an explicit rotation gesture from the user.
Environment
Package: flutter_map
Platform: Android / iOS
Device: Physical mobile device
Flutter version: [add version]
flutter_map version: [add version]
Possible improvement
It could be useful to add a gesture threshold or a configuration option to disable accidental rotation during pinch zoom, especially on mobile devices.
Thank you for your work on this package.
unintentional_rotation._map.mp4
How can we reproduce it?
How can we reproduce it?
Create a Flutter app using flutter_map.
Add a FlutterMap widget with default gesture interactions enabled.
Run the app on a physical mobile device (Android/iOS).
Place two fingers on the map and perform a normal pinch-to-zoom gesture.
While zooming, slightly change the distance/position of the fingers (without intentionally rotating).
The map may start rotating even though no rotation gesture was intended.
changed the title [-]Unintentional rotation of the map when zooming in or out[/-][+]`InteractionOptions.rotationThreshold` is not applied as expected[/+]on Aug 27, 2026
Looks like it's only applied when enableMultiFingerGestureRace is enabled. This seems to have been intentional: none of the thresholds are applied when the race is disabled (which should be the case for most users).
I'm adding the threshold into the non-race handler for rotation, but I don't think it's good to add the other thresholds for move and zoom in as well, it doesn't feel quite right.
changed the title [-]`InteractionOptions.rotationThreshold` is not applied as expected[/-][+]Map is too easy to unintentionally rotate with multi-finger festure[/+]on Sep 3, 2026
changed the title [-]Map is too easy to unintentionally rotate with multi-finger festure[/-][+]Map is too easy to unintentionally rotate with multi-finger gesture[/+]on Sep 3, 2026
Activity
JaffaKetchup commentedon Aug 27, 2026
Hey, thanks for opening this.
InteractionOptions.rotationThresholdshould be the setting to control this (should default to 20 deg), but it looks like it's broken.[-]Unintentional rotation of the map when zooming in or out[/-][+]`InteractionOptions.rotationThreshold` is not applied as expected[/+]JaffaKetchup commentedon Sep 3, 2026
Looks like it's only applied when
enableMultiFingerGestureRaceis enabled. This seems to have been intentional: none of the thresholds are applied when the race is disabled (which should be the case for most users).I'm adding the threshold into the non-race handler for rotation, but I don't think it's good to add the other thresholds for move and zoom in as well, it doesn't feel quite right.
[-]`InteractionOptions.rotationThreshold` is not applied as expected[/-][+]Map is too easy to unintentionally rotate with multi-finger festure[/+][-]Map is too easy to unintentionally rotate with multi-finger festure[/-][+]Map is too easy to unintentionally rotate with multi-finger gesture[/+]