Compare commits

..

2 Commits

Author SHA1 Message Date
5d6679d919 Merge branch 'develop' of http://xny.yj-3d.com:3000/zh/sdk4.0 into develop 2025-08-26 21:54:27 +08:00
41c132e506 修改 2025-08-26 21:54:24 +08:00

View File

@ -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,