vue 高德地图获取可视区域四角的坐标

获取高德地图可视区域四角的坐标
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,'西南')
  }
}
image.png

你可能感兴趣的:(vue 高德地图获取可视区域四角的坐标)