<script type="text/javascript" src="@/assets/GeoUtils.js"></script>
const pointA = new BMap.Point(this.wodeWz.lng, this.wodeWz.lat) //我的定位
const point = new BMap.Point(this.shlng, this.shlat)
const juli = (map.getDistance(pointA, point) / 1000).toFixed(2) //计算距离
let distance = juli * 1000
let qaz = []
this.asyncObject.forEach(item => {
var ply = new BMap.Point(item.lng, item.lat)
qaz.push(ply)
})
var polygon2 = new this.BMap.Polygon(qaz)
var result = BMapLib.GeoUtils.isPointInPolygon(point, polygon2) //判断是否在多边形区域内
此方法需要引入GeoUtils.js