标签:ace max box 调用 app nat class enc col
1,通过@turf/bbox
,获取minX, minY, maxX, maxY(经纬度)
,再转换成平面坐标,最后调用地图的实例方法fitScreenCoordinates
1 const geojson = this.map.getSource(id)._data 2 const bound = bbox(geojson) 3 const min = this.map.project([bound[0], bound[1]]) 4 const max = this.map.project([bound[2], bound[3]]) 5 this.map.fitScreenCoordinates(min, max, this.map.getBearing())
标签:ace max box 调用 app nat class enc col
原文地址:https://www.cnblogs.com/happiness86/p/12773436.html