Browse Source

缩放适配

dev
huixiang_app 1 year ago
parent
commit
a6e374c034
  1. 21
      lib/union/location_map_page.dart

21
lib/union/location_map_page.dart

@ -502,23 +502,12 @@ class _LocationMap extends State<LocationMap> with WidgetsBindingObserver {
draggable: false, draggable: false,
); );
_mapController.addMarker(terminalBmfMarker); _mapController.addMarker(terminalBmfMarker);
SmartDialog.showToast( await _mapController.setVisibleMapBounds(
"${startLocation.longitude} ${startLocation.latitude} ${endLocation.longitude} ${endLocation.latitude}", BMFCoordinateBounds(
alignment: Alignment.center);
bool tryFlag = await _mapController.setVisibleMapRectWithPadding(
visibleMapBounds: BMFCoordinateBounds(
northeast: startLocation, southwest: endLocation), northeast: startLocation, southwest: endLocation),
animated: true, true,);
insets: _mapController.setZoomBy(-1);
EdgeInsets.only(top: 500, bottom: 200, left: 200, right: 200)); _mapController.setScrollBy(0,-200);
if (!tryFlag) {
tryFlag = await _mapController.setVisibleMapBounds(
BMFCoordinateBounds(northeast: startLocation, southwest: endLocation),
true,
);
if (!tryFlag)
SmartDialog.showToast("还是不行", alignment: Alignment.center);
}
hours = needHours == 0 ? "" : "$needHours小时"; hours = needHours == 0 ? "" : "$needHours小时";
minutes = needMinutes == 0 ? "" : "$needMinutes分钟"; minutes = needMinutes == 0 ? "" : "$needMinutes分钟";

Loading…
Cancel
Save