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) => {
|
Draw && Draw.start((a, positions) => {
|
||||||
this.options.positions = positions;
|
this.options.positions = positions;
|
||||||
//判断范围是否过大
|
//判断范围是否过大
|
||||||
|
if (positions) {
|
||||||
if (options.type == '面') {
|
if (options.type == '面') {
|
||||||
let posi = positions.map(v => {
|
let posi = positions.map(v => {
|
||||||
return Cesium.Cartesian3.fromDegrees(v.lng, v.lat)
|
return Cesium.Cartesian3.fromDegrees(v.lng, v.lat)
|
||||||
@ -101,6 +102,7 @@ class BatchModel extends Base {
|
|||||||
}
|
}
|
||||||
// this.callback(this.options);
|
// this.callback(this.options);
|
||||||
(this.options.positions.length || this.options.positions.lng) && BatchModel.computeDis(this)
|
(this.options.positions.length || this.options.positions.lng) && BatchModel.computeDis(this)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -115,6 +117,7 @@ class BatchModel extends Base {
|
|||||||
let posiArr = []
|
let posiArr = []
|
||||||
let array = []
|
let array = []
|
||||||
if (that.options.type == '面') {
|
if (that.options.type == '面') {
|
||||||
|
if (that.options.positions.length != 0) {
|
||||||
that.options.positions.forEach(item => {
|
that.options.positions.forEach(item => {
|
||||||
fromDegreesArray.push(item.lng, item.lat)
|
fromDegreesArray.push(item.lng, item.lat)
|
||||||
})
|
})
|
||||||
@ -135,7 +138,9 @@ class BatchModel extends Base {
|
|||||||
alt: height
|
alt: height
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
} else if (that.options.type == '线') {
|
} else if (that.options.type == '线') {
|
||||||
|
if (that.options.positions.length != 0) {
|
||||||
that.options.positions.forEach(item => {
|
that.options.positions.forEach(item => {
|
||||||
fromDegreesArray.push(item.lng, item.lat)
|
fromDegreesArray.push(item.lng, item.lat)
|
||||||
})
|
})
|
||||||
@ -155,12 +160,17 @@ class BatchModel extends Base {
|
|||||||
alt: height
|
alt: height
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
} else if (that.options.type == '点') {
|
} 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 })
|
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 = [{ lng: that.options.positions.lng, lat: that.options.positions.lat, alt: height }]
|
||||||
// posiArr = [that.options.positions]
|
// posiArr = [that.options.positions]
|
||||||
that.pointArr = posiArr
|
that.pointArr = posiArr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
let params = {
|
let params = {
|
||||||
type: that.options.type,
|
type: that.options.type,
|
||||||
positions: posiArr,
|
positions: posiArr,
|
||||||
|
Reference in New Issue
Block a user