|
|
|
@ -502,23 +502,12 @@ class _LocationMap extends State<LocationMap> 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分钟"; |
|
|
|
|