diff --git a/lib/dev_config.dart b/lib/dev_config.dart index 2056495..1a757bd 100644 --- a/lib/dev_config.dart +++ b/lib/dev_config.dart @@ -82,6 +82,13 @@ const int kProximityAlertMinDistance = 50; // meters const int kProximityAlertMaxDistance = 1000; // meters const Duration kProximityAlertCooldown = Duration(minutes: 10); // Cooldown between alerts for same node +// Map interaction configuration +const double kNodeDoubleTapZoomDelta = 1.0; // How much to zoom in when double-tapping nodes (was 1.0) +const double kDoubleTapDragZoomSensitivity = 0.01; // Sensitivity for double-tap-drag zoom (reduced from ~0.002 to make less sensitive) +const double kScrollWheelVelocity = 0.005; // Mouse scroll wheel zoom speed (default 0.005) +const double kPinchZoomThreshold = 0.5; // How much pinch required to start zoom (default 0.5) +const double kPinchMoveThreshold = 40.0; // How much drag required for two-finger pan (default 40.0) + // Tile fetch retry parameters (configurable backoff system) const int kTileFetchMaxAttempts = 16; // Number of retry attempts before giving up const int kTileFetchInitialDelayMs = 500; // Base delay for first retry (1 second) diff --git a/lib/widgets/map/camera_markers.dart b/lib/widgets/map/camera_markers.dart index f0edb34..031f42d 100644 --- a/lib/widgets/map/camera_markers.dart +++ b/lib/widgets/map/camera_markers.dart @@ -49,7 +49,7 @@ class _CameraMapMarkerState extends State { void _onDoubleTap() { _tapTimer?.cancel(); - widget.mapController.move(widget.node.coord, widget.mapController.camera.zoom + 1); + widget.mapController.move(widget.node.coord, widget.mapController.camera.zoom + kNodeDoubleTapZoomDelta); } @override diff --git a/lib/widgets/map/suspected_location_markers.dart b/lib/widgets/map/suspected_location_markers.dart index b74e099..e95d2f4 100644 --- a/lib/widgets/map/suspected_location_markers.dart +++ b/lib/widgets/map/suspected_location_markers.dart @@ -47,7 +47,7 @@ class _SuspectedLocationMapMarkerState extends State void _onDoubleTap() { _tapTimer?.cancel(); - widget.mapController.move(widget.location.centroid, widget.mapController.camera.zoom + 1); + widget.mapController.move(widget.location.centroid, widget.mapController.camera.zoom + kNodeDoubleTapZoomDelta); } @override diff --git a/lib/widgets/map_view.dart b/lib/widgets/map_view.dart index c0ac06d..2416b54 100644 --- a/lib/widgets/map_view.dart +++ b/lib/widgets/map_view.dart @@ -554,6 +554,14 @@ class MapViewState extends State { 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) {