
vue代码
destroyMap () {
if (this.myMap) {
try {
this.myMap.clearMap()
this.myMap.destroy()
} catch (error) {
console.log("地图销毁出错:", error)
}
this.myMap = null
}
if (this.markers && this.markers.length > 0) {
this.markers = []
}
if (this.polygons && this.polygons.length > 0) {
this.polygons = []
}
},
