From 9f35d752c2ba55ab881342bf61613fa039e48591 Mon Sep 17 00:00:00 2001 From: zh <972939975@qq.com> Date: Thu, 14 Aug 2025 15:56:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=87=E5=BD=A2=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E7=BC=96=E8=BE=91=E6=97=B6=E6=A0=87=E6=B3=A8=E6=9C=AA?= =?UTF-8?q?=E8=B4=B4=E5=90=88=E5=AE=9E=E4=BD=93=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Obj/Base/SectorObject/index.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Obj/Base/SectorObject/index.js b/src/Obj/Base/SectorObject/index.js index 6d306bc..66e9c1e 100644 --- a/src/Obj/Base/SectorObject/index.js +++ b/src/Obj/Base/SectorObject/index.js @@ -293,7 +293,7 @@ class SectorObject extends Base { return this.options.line.width } set lineWidth(v) { - this.options.line.width = ((v || v === 0) ? v : 3) + this.options.line.width = ((v || v === 0) ? v : 3) this.entity.polyline.width = this.options.line.width this._elms.lineWidth && this._elms.lineWidth.forEach((item) => { item.value = this.options.line.width @@ -1560,7 +1560,7 @@ class SectorObject extends Base { _addRr() { if (this._DialogObject._element.content.getElementsByClassName('vr_add')[0].value) { this.options.attribute.vr.content.push({ - name: '全景图' , + name: '全景图', url: this._DialogObject._element.content.getElementsByClassName('vr_add')[0].value }) this._DialogObject._element.content.getElementsByClassName('vr_add')[0].value = '' @@ -1573,7 +1573,7 @@ class SectorObject extends Base { addAttributeRr(vr) { this.options.attribute.vr.content.push({ - name: '全景图' , + name: '全景图', url: vr }) this.attributeVr = this.options.attribute.vr.content @@ -1922,6 +1922,19 @@ class SectorObject extends Base { that.cartesian3Towgs84(positions[1], that.sdk.viewer), that.cartesian3Towgs84(positions[positions.length - 4], that.sdk.viewer) ] + let objectsToExclude = [...that.sdk.viewer.entities.values] + that + .getClampToHeight({ + lng: that.options.center.lng, + lat: that.options.center.lat + }, objectsToExclude) + .then(height => { + that.label.position = [ + that.options.center.lng, + that.options.center.lat, + height + ] + }) setTimeout(() => { createNodePoints(positions[1], 'sector-start') createNodePoints(positions[positions.length - 4], 'sector-end')