From e25a51f1e66d054e20a70601f26c8042639756f3 Mon Sep 17 00:00:00 2001 From: taohebin Date: Thu, 17 Oct 2024 10:16:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20map=20=E8=A1=A5=E5=85=85=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/map/map.uvue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pages/component/map/map.uvue b/pages/component/map/map.uvue index 3c53e111..47e64304 100644 --- a/pages/component/map/map.uvue +++ b/pages/component/map/map.uvue @@ -43,7 +43,8 @@ - + + @@ -616,7 +617,20 @@ console.log(error) } }); - }; + }; + + const handleMoveToMyLocation = () => { + mapContext.value?.moveToLocation({ + success: res => { + uni.showModal({ + content: '地图中心已经移动到当前位置' + }) + }, + fail: error => { + console.log(error); + } + }) + } const maptap = (e : UniMapTapEvent) => { // console.log('点击地图时触发',e) -- GitLab