diff --git a/pages/component/map/map.uvue b/pages/component/map/map.uvue index 9c5ad1909584985cdd0a7c37f3862c86e3609ca5..9e0c8f727084d21dbc0e5fb54b9b578d15b178fa 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)