diff --git a/src/Obj/Base/BatchModel/index.js b/src/Obj/Base/BatchModel/index.js index 84045dd..af82c3a 100644 --- a/src/Obj/Base/BatchModel/index.js +++ b/src/Obj/Base/BatchModel/index.js @@ -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) })