From 0c0e76f0186efc7fd18d57e29c32e2c23343045d Mon Sep 17 00:00:00 2001
From: huixiang_app <953969641@qq.com>
Date: Tue, 5 Sep 2023 22:45:06 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BC=A9=E6=94=BE=E9=80=82=E9=85=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/union/location_map_page.dart | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/union/location_map_page.dart b/lib/union/location_map_page.dart
index e145f69a..4ec95009 100644
--- a/lib/union/location_map_page.dart
+++ b/lib/union/location_map_page.dart
@@ -455,7 +455,7 @@ class _LocationMap extends State<LocationMap> with WidgetsBindingObserver {
   }
 
   updateMapLine(List<BMFCoordinate> coordinates, int needHours, int needMinutes,
-      double needDistance) async {
+      double needDistance) {
     try {
       //刪除之前的創建的點和綫
       _mapController.cleanAllMarkers();
@@ -502,12 +502,12 @@ class _LocationMap extends State<LocationMap> with WidgetsBindingObserver {
         draggable: false,
       );
       _mapController.addMarker(terminalBmfMarker);
-      await _mapController.setVisibleMapBounds(
-          BMFCoordinateBounds(
+      _mapController.setVisibleMapRectWithPadding(
+          visibleMapBounds: BMFCoordinateBounds(
               northeast: startLocation, southwest: endLocation),
-          true,);
-      _mapController.setZoomBy(-1);
-      _mapController.setScrollBy(0,-200);
+          animated: true,
+          insets:
+              EdgeInsets.only(top: 500.h, bottom: 200.h, left: 200.w, right: 200.w));
 
       hours = needHours == 0 ? "" : "$needHours小时";
       minutes = needMinutes == 0 ? "" : "$needMinutes分钟";