[BUG] pinchZoomWinGestures, rotationThreshold (etc.?) not working
What is the bug?
Based on the default options (see below), I would expect that when I pinch-zoom, the map doesn't rotate (because of pinchZoomWinGestures: MultiFingerGesture.pinchZoom | MultiFingerGesture.pinchMove) and that when I pinch-rotate, I need to rotate at least 20° before rotation starts (because of rotationThreshold: 20.0).
However, these settings don't seem to be respected as it's practically impossible to zoom the map without rotating it.
I'm doubting myself because 6.1.0 is 5 months old. This is super basic, and it would surely have been noticed and fixed, but I can't find an open issue.
How can we reproduce it?
flutter_map: 6.1.0
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
void main() async {
runApp(
MaterialApp(
builder: (context, child) => FlutterMap(
options: const MapOptions(
// These are the default options
interactionOptions: InteractionOptions(
flags: InteractiveFlag.all,
debugMultiFingerGestureWinner: false,
enableMultiFingerGestureRace: false,
rotationThreshold: 20.0,
rotationWinGestures: MultiFingerGesture.rotate,
pinchZoomThreshold: 0.5,
pinchZoomWinGestures:
MultiFingerGesture.pinchZoom | MultiFingerGesture.pinchMove,
pinchMoveThreshold: 40.0,
pinchMoveWinGestures:
MultiFingerGesture.pinchZoom | MultiFingerGesture.pinchMove,
enableScrollWheel: false,
scrollWheelVelocity: 0.005,
cursorKeyboardRotationOptions: CursorKeyboardRotationOptions(),
),
),
children: [
TileLayer(
urlTemplate: "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
userAgentPackageName: "com.example",
),
],
),
),
);
}
- Run on Android
- Try zooming without rotating the map
Do you have a potential solution?
No response
Platforms
Android 13 (Galaxy A51)
Severity
Obtrusive: Prevents normal functioning but causes no errors in the console
You need to set enableMultiFingerGestureRace to true
If this issue still persists after setting enableMultiFingerGestureRace, please ping me! I'll try to remember to document this somewhere.