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 @@