diff --git a/lib/union/location_map_page.dart b/lib/union/location_map_page.dart index 4e28dac3..fc8fe52b 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分钟";