feat:完善功能

This commit is contained in:
zjc
2025-02-20 15:27:03 +08:00
parent 99860f9b50
commit a96998dacd
3 changed files with 152 additions and 89 deletions

View File

@@ -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 = `
// // <div style="padding: 10px;">
// // <h4>标题</h4>
// // <p>这里是详细信息</p>
// // </div>
// // `
// // 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) // 打开信息窗口
// })
}
// 清除覆盖物