Merge branch 'develop' of http://xny.yj-3d.com:3000/zh/sdk4.0 into develop
This commit is contained in:
@ -74,6 +74,7 @@ class BatchModel extends Base {
|
||||
Draw && Draw.start((a, positions) => {
|
||||
this.options.positions = positions;
|
||||
//判断范围是否过大
|
||||
if (positions) {
|
||||
if (options.type == '面') {
|
||||
let posi = positions.map(v => {
|
||||
return Cesium.Cartesian3.fromDegrees(v.lng, v.lat)
|
||||
@ -101,6 +102,7 @@ class BatchModel extends Base {
|
||||
}
|
||||
// this.callback(this.options);
|
||||
(this.options.positions.length || this.options.positions.lng) && BatchModel.computeDis(this)
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
@ -115,6 +117,7 @@ class BatchModel extends Base {
|
||||
let posiArr = []
|
||||
let array = []
|
||||
if (that.options.type == '面') {
|
||||
if (that.options.positions.length != 0) {
|
||||
that.options.positions.forEach(item => {
|
||||
fromDegreesArray.push(item.lng, item.lat)
|
||||
})
|
||||
@ -135,7 +138,9 @@ class BatchModel extends Base {
|
||||
alt: height
|
||||
})
|
||||
})
|
||||
}
|
||||
} else if (that.options.type == '线') {
|
||||
if (that.options.positions.length != 0) {
|
||||
that.options.positions.forEach(item => {
|
||||
fromDegreesArray.push(item.lng, item.lat)
|
||||
})
|
||||
@ -155,12 +160,17 @@ class BatchModel extends Base {
|
||||
alt: height
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
} else if (that.options.type == '点') {
|
||||
if (that.options.positions.lng) {
|
||||
let height = await that.getClampToHeight({ lng: that.options.positions.lng, lat: that.options.positions.lat })
|
||||
posiArr = [{ lng: that.options.positions.lng, lat: that.options.positions.lat, alt: height }]
|
||||
// posiArr = [that.options.positions]
|
||||
that.pointArr = posiArr
|
||||
}
|
||||
|
||||
}
|
||||
let params = {
|
||||
type: that.options.type,
|
||||
positions: posiArr,
|
||||
|
Reference in New Issue
Block a user