From a96998dacde61c8d63d3affa1fe5cc14c629c3b7 Mon Sep 17 00:00:00 2001 From: zjc <1034206993@qq.com> Date: Thu, 20 Feb 2025 15:27:03 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=AE=8C=E5=96=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/map.js | 21 --- .../{big-car-ship-map.vue => big-map.vue} | 140 +++++++++++++----- src/views/scenic/components/box-2.vue | 80 ++++++---- 3 files changed, 152 insertions(+), 89 deletions(-) rename src/views/scenic/components/{big-car-ship-map.vue => big-map.vue} (62%) diff --git a/src/hooks/map.js b/src/hooks/map.js index 05751a4..05e9e46 100644 --- a/src/hooks/map.js +++ b/src/hooks/map.js @@ -28,27 +28,6 @@ export function useMap() { // 创建标注对象并添加到地图 marker.value = new BMapGL.Marker(point, { icon: iconPath }) map.value.addOverlay(marker.value) - // marker.value.addEventListener('click', (e) => { - // console.log(e, '===') - // if (!infoBox.value) { - // setInfoBox(e.latLng) - // } else { - // if (lastInfoBox.value) lastInfoBox.value?.close() - // infoBox.value.open(e.latLng) - // lastInfoBox.value = infoBox.value - // } - // // const content = ` - // //
- // //

标题

- // //

这里是详细信息

- // //
- // // ` - // // var infoWindow = new BMapGL.InfoWindow(content) // 创建信息窗口对象 - // // console.log(map.value.getCenter()) - // // map.value.openInfoWindow(infoWindow, e.latLng) // 打开信息窗口 - // // const infoWindow = new BMapGL.InfoWindow('这里是一些信息') // 创建信息窗口对象 - // // marker.value.openInfoWindow(infoWindow) // 打开信息窗口 - // }) } // 清除覆盖物 diff --git a/src/views/scenic/components/big-car-ship-map.vue b/src/views/scenic/components/big-map.vue similarity index 62% rename from src/views/scenic/components/big-car-ship-map.vue rename to src/views/scenic/components/big-map.vue index e41425f..fbb6800 100644 --- a/src/views/scenic/components/big-car-ship-map.vue +++ b/src/views/scenic/components/big-map.vue @@ -8,6 +8,7 @@