diff --git a/lib/map/flight_map.dart b/lib/map/flight_map.dart index 2e8ee6d..a3c8f72 100644 --- a/lib/map/flight_map.dart +++ b/lib/map/flight_map.dart @@ -47,6 +47,11 @@ class _FlightMapState extends State { @override Widget build(BuildContext context) { + final int interactiveFlags = (_centerOnPosition + ? InteractiveFlag.none + : InteractiveFlag.drag | InteractiveFlag.pinchMove) | + InteractiveFlag.pinchZoom; + return Stack( fit: StackFit.expand, children: [ @@ -57,9 +62,7 @@ class _FlightMapState extends State { swPanBoundary: LatLng(41.327326, -5.734863), nePanBoundary: LatLng(51.138001, 9.382324), onLongPress: widget.onLongPress, - interactiveFlags: InteractiveFlag.drag | - InteractiveFlag.pinchZoom | - InteractiveFlag.pinchMove), + interactiveFlags: interactiveFlags), layers: [ TileLayerOptions( urlTemplate: