From 46d471ef8fa128d88ecd03c37fde8afbae429c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=93=88=E5=93=88=E5=93=88?= Date: Mon, 9 Aug 2021 15:51:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A8=E9=80=81OK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/address/address_map_page.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/address/address_map_page.dart b/lib/address/address_map_page.dart index 2dc06eae..ec5beee9 100644 --- a/lib/address/address_map_page.dart +++ b/lib/address/address_map_page.dart @@ -83,7 +83,7 @@ class _AddressMapPage extends State { .then((value) { saveLatLng(value); if (_mapController != null) { - this.latLng = value; + this.latLng = Platform.isIOS ? value : latLng; addMarker(); _mapController.updateMapOptions( BMFMapOptions( @@ -284,10 +284,10 @@ class _AddressMapPage extends State { bmfMarker = BMFMarker( position: latLng, - screenPointToLock: BMFPoint(window.physicalSize.width / 2, - window.physicalSize.height / 4), + screenPointToLock: BMFPoint((Platform.isIOS ? MediaQuery.of(context).size.width : window.physicalSize.width) / 2, + Platform.isIOS ? MediaQuery.of(context).size.height : window.physicalSize.height / 4), isLockedToScreen: true, - centerOffset: BMFPoint(1, 1), + centerOffset: BMFPoint(0.5, 0.95), enabled: false, icon: "assets/image/icon_map_marker.png", draggable: false, @@ -296,8 +296,8 @@ class _AddressMapPage extends State { } bmfMarker.updateIsLockedToScreen( true, - BMFPoint(window.physicalSize.width / 2, - window.physicalSize.height / 4)); + BMFPoint((Platform.isIOS ? MediaQuery.of(context).size.width : window.physicalSize.width) / 2, + (Platform.isIOS ? MediaQuery.of(context).size.height : window.physicalSize.height) / 4)); } saveLatLng(BMFCoordinate latLng) async {