修改批量模型绘制

This commit is contained in:
2025-08-21 17:00:34 +08:00
parent 4f57ac3d9e
commit ea80fe325c

View File

@ -107,16 +107,22 @@ class BatchModel extends Base {
// posiArr = [that.options.positions]
that.pointArr = posiArr
}
posiArr.forEach((item, index) => {
let model = new Model(that.sdk, {
id: 'model' + index,
show: that.options.show,
url: that.options.url,
position: item,
rotate: that.options.type == '点' ? undefined : { x: 0, y: 0, z: array[1] && (array[1][index] || array[1]) }
})
that.pointArr.push(model)
})
let params = {
type: that.options.type,
positions: posiArr,
rotate: that.options.type == '点' ? undefined : array[1]
}
that.callback(params)
// posiArr.forEach((item, index) => {
// let model = new Model(that.sdk, {
// id: 'model' + index,
// show: that.options.show,
// url: that.options.url,
// position: item,
// rotate: that.options.type == '点' ? undefined : { x: 0, y: 0, z: array[1] && (array[1][index] || array[1]) }
// })
// that.pointArr.push(model)
// })
}
async linePoint(polygonPositions, spacing) {
let boundaryPoints = [];
@ -399,8 +405,8 @@ class BatchModel extends Base {
break;
}
Draw && Draw.start((a, positions) => {
this.options.positions = positions
this.callback(this.options);
this.options.positions = positions;
// this.callback(this.options);
(this.options.positions.length || this.options.positions.lng) && BatchModel.computeDis(this)
})