<div @click="getDirections()">获取高德地图可视区域四角的坐标</div>
data(){
return{
ch_AMap_Map:''
}
}
methods: {
getDirections(){
this.ch_AMap_Map = new AMap.Map('container', {
showLabel: true,
center: [106.122082, 33.719192],
zoom: 4
}
let northWest = this.ch_AMap_Map.getBounds().getNorthWest()
let southEast = this.ch_AMap_Map.getBounds().getSouthEast()
let northEast = this.ch_AMap_Map.getBounds().getNorthEast()
let southWest = this.ch_AMap_Map.getBounds().getSouthWest()
console.log(northWest,'西北',southEast,'东南',northEast,'东北',southWest,'西南')
}
}