From 5021d72f73d8495af3dfaf7cde0042a29d9c6e6a Mon Sep 17 00:00:00 2001 From: taohebin Date: Fri, 11 Oct 2024 17:31:57 +0800 Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=20map=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Conflicts: # pages/component/map/map.uvue --- pages/component/map/map.uvue | 92 +++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/pages/component/map/map.uvue b/pages/component/map/map.uvue index 9c5ad190..9e0c8f72 100644 --- a/pages/component/map/map.uvue +++ b/pages/component/map/map.uvue @@ -15,7 +15,14 @@ - + + + + + + + + @@ -365,10 +372,50 @@ } const showLocation = ref(false); + const enable3D = ref(false); + const showCompass = ref(false); + const enableOverlooking = ref(false); + const enableRotate = ref(false); + const enableZoom = ref(true); + const enableScroll = ref(true); + const enableSatellite = ref(false); + const enableTraffic = ref(false); const change_show_location = (checked : boolean) => { showLocation.value = checked } + const change_enable_3d = (checked : boolean) => { + enable3D.value = checked + } + + const change_show_campass = (checked : boolean) => { + showCompass.value = checked + } + + const change_enable_overlooking = (checked : boolean) => { + enableOverlooking.value = checked + } + + const change_enable_rotate = (checked : boolean) => { + enableRotate.value = checked + } + + const change_enable_zoom = (checked : boolean) => { + enableZoom.value = checked + } + + const change_enable_scroll = (checked : boolean) => { + enableScroll.value = checked + } + + const change_enable_satellite = (checked : boolean) => { + enableSatellite.value = checked + } + + const change_enable_traffic = (checked : boolean) => { + enableTraffic.value = checked + } + const includePoints = ref([] as LocationObject[]); const includePoint = () => { includePoints.value = testIncludePoints; @@ -457,47 +504,6 @@ } }; - - const showCompass = ref(true); - const enable3D = ref(true); - const enableOverlooking = ref(true); - const enableZoom = ref(true); - const enableScroll = ref(true); - const enableRotate = ref(true); - const enableSatellite = ref(false); - const enableTraffic = ref(false); - - const enableThreeD = (e) => { - enable3D.value = e.detail.value; - } - const changeShowCompass = (e) => { - showCompass.value = e.detail.value; - } - const changeEnableOverlooking = (e) => { - enableOverlooking.value = e.detail.value; - }; - - const changeEnableZoom = (e) => { - enableZoom.value = e.detail.value; - }; - - const changeEnableScroll = (e) => { - enableScroll.value = e.detail.value; - }; - - const changeEnableRotate = (e) => { - enableRotate.value = e.detail.value; - }; - - const changeEnableSatellite = (e) => { - enableSatellite.value = e.detail.value; - }; - - const changeEnableTraffic = (e) => { - enableTraffic.value = e.detail.value; - }; - - const handleGetCenterLocation = () => { mapContext.value?.getCenterLocation({ success: ret => { @@ -612,7 +618,7 @@ }); }; - const maptap = (e : UniMapUpdatedEvent) => { + const maptap = (e : UniMapTapEvent) => { // console.log('点击地图时触发',e) uni.showModal({ content: JSON.stringify(e) -- GitLab