From aa30d13b91d697769ec90f16e32aff44a2748526 Mon Sep 17 00:00:00 2001 From: userGyl Date: Thu, 27 Nov 2025 09:30:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ln_jq_app/assets/html/map.html | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/ln_jq_app/assets/html/map.html b/ln_jq_app/assets/html/map.html index 1ec895d..a642ef3 100644 --- a/ln_jq_app/assets/html/map.html +++ b/ln_jq_app/assets/html/map.html @@ -49,17 +49,16 @@ - - + @@ -81,6 +80,25 @@ viewMode: '3D' }); + // --- 新增:添加地图控件 --- + map.addControl(new AMap.Scale()); // 比例尺 + map.addControl(new AMap.ToolBar({ + position: { + bottom: '80px', + right: '10px' + } + })); // 缩放 + + map.addControl(new AMap.Geolocation({ // 定位 + enableHighAccuracy: true, + timeout: 10000, + zoomToAccuracy: true, + position: { + bottom: '20px', + right: '10px' + } + })); + // --- 初始化轿车规划 --- driving = new AMap.Driving({ map: map,