From 487e8cd8f38944a2e2db87a16dab02e33f8e19fd Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Wed, 11 Mar 2026 09:44:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BB=98=E5=88=B6=E7=82=B9?= =?UTF-8?q?=E5=81=8F=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/presentation/widgets/map/testmap_pages.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/features/home/presentation/widgets/map/testmap_pages.dart b/lib/features/home/presentation/widgets/map/testmap_pages.dart index 506be9e5..e719c06b 100644 --- a/lib/features/home/presentation/widgets/map/testmap_pages.dart +++ b/lib/features/home/presentation/widgets/map/testmap_pages.dart @@ -1140,7 +1140,7 @@ class _MapPageEnterpriseState extends State { options: MapOptions( initialCenter: __isValidLatLng(_currentLatLng) ? _currentLatLng! : initCenter, initialZoom: 18, - maxZoom: 18, + maxZoom: 22, minZoom: 3, enableScrollWheel: true, // 🔥 视觉放大:通过缩放系数实现"伪20级"显示(无空白) @@ -1798,6 +1798,12 @@ class _MapPageEnterpriseState extends State { return work_area_model.Position(lat: wgs84Point.latitude, lon: wgs84Point.longitude); }).toList(); } + gcjOuterPoints = outerPositions.map((point) { + double wgs84Lat = point.lat; + double wgs84Lon = point.lon; + final gcjPoint = wgs84ToGcj02(wgs84Lat, wgs84Lon); + return LatLng(gcjPoint.latitude, gcjPoint.longitude); + }).toList(); final outerBoundary = work_area_model.OuterBoundary(position: outerPositions, sideWidth: _workDistance); @@ -1894,7 +1900,7 @@ class _MapPageEnterpriseState extends State { return LatLng(gcjPoint.latitude, gcjPoint.longitude); }).toList(); // 外边界保持原有逻辑 - gcjOuterPoints = List.from(_markedPoints); + //gcjOuterPoints = List.from(_markedPoints); }); _saveDataToLocal(); moveMapToPointsCenter(gcjPathPoints); @@ -2307,7 +2313,7 @@ LatLng convertWGS84ToGCJ02(double lat, double lon) { /// ======================================================= /// 坐标转换:WGS84 -> GCJ02(国内高德/腾讯通用) /// ======================================================= -const double _pi = 3.14159265358979324; +const double _pi = 3.1415926535897932384626; const double _a = 6378245.0; const double _ee = 0.00669342162296594323;