From a6e374c034b5344c6d798869990af70ef05092c8 Mon Sep 17 00:00:00 2001 From: huixiang_app <953969641@qq.com> Date: Tue, 5 Sep 2023 22:02:43 +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 | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/lib/union/location_map_page.dart b/lib/union/location_map_page.dart index 17e5c619..e145f69a 100644 --- a/lib/union/location_map_page.dart +++ b/lib/union/location_map_page.dart @@ -502,23 +502,12 @@ class _LocationMap extends State with WidgetsBindingObserver { draggable: false, ); _mapController.addMarker(terminalBmfMarker); - SmartDialog.showToast( - "${startLocation.longitude} ${startLocation.latitude} ${endLocation.longitude} ${endLocation.latitude}", - alignment: Alignment.center); - bool tryFlag = await _mapController.setVisibleMapRectWithPadding( - visibleMapBounds: BMFCoordinateBounds( + await _mapController.setVisibleMapBounds( + BMFCoordinateBounds( northeast: startLocation, southwest: endLocation), - animated: true, - insets: - EdgeInsets.only(top: 500, bottom: 200, left: 200, right: 200)); - if (!tryFlag) { - tryFlag = await _mapController.setVisibleMapBounds( - BMFCoordinateBounds(northeast: startLocation, southwest: endLocation), - true, - ); - if (!tryFlag) - SmartDialog.showToast("还是不行", alignment: Alignment.center); - } + true,); + _mapController.setZoomBy(-1); + _mapController.setScrollBy(0,-200); hours = needHours == 0 ? "" : "$needHours小时"; minutes = needMinutes == 0 ? "" : "$needMinutes分钟";