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