Configurable zoom behaviors, desensitize double tap + drag

This commit is contained in:
stopflock
2025-11-07 14:29:08 -06:00
parent 4cdbb9f404
commit b0a4128bb7
4 changed files with 17 additions and 2 deletions
+8
View File
@@ -554,6 +554,14 @@ class MapViewState extends State<MapView> {
initialCenter: _gpsController.currentLocation ?? _positionManager.initialLocation ?? LatLng(37.7749, -122.4194),
initialZoom: _positionManager.initialZoom ?? 15,
maxZoom: (appState.selectedTileType?.maxZoom ?? 18).toDouble(),
interactionOptions: InteractionOptions(
doubleTapDragZoomChangeCalculator: (verticalOffset, camera) {
return verticalOffset * kDoubleTapDragZoomSensitivity;
},
scrollWheelVelocity: kScrollWheelVelocity,
pinchZoomThreshold: kPinchZoomThreshold,
pinchMoveThreshold: kPinchMoveThreshold,
),
onPositionChanged: (pos, gesture) {
setState(() {}); // Instant UI update for zoom, etc.
if (gesture) {