diff --git a/src/Obj/Base/BillboardObject/index.js b/src/Obj/Base/BillboardObject/index.js index c836256..eab4a3d 100644 --- a/src/Obj/Base/BillboardObject/index.js +++ b/src/Obj/Base/BillboardObject/index.js @@ -1812,7 +1812,13 @@ class BillboardObject extends Base { case '2': case 3: case '3': - this.getClampToHeight(this.options.positions).then(h => { + let objectsToExclude = [] + for (let [key, value] of this.sdk.entityMap) { + if (value.type === 'RadarScanStereoscopic' && value.entity) { + objectsToExclude.push(value.entity) + } + } + this.getClampToHeight(this.options.positions, objectsToExclude).then(h => { this.alt = Number(h.toFixed(2)) heightElm.value = this.alt }) @@ -1876,7 +1882,13 @@ class BillboardObject extends Base { break case 3: case '3': - this.getClampToHeight(this.options.positions).then(h => { + let objectsToExclude = [] + for (let [key, value] of this.sdk.entityMap) { + if (value.type === 'RadarScanStereoscopic' && value.entity) { + objectsToExclude.push(value.entity) + } + } + this.getClampToHeight(this.options.positions, objectsToExclude).then(h => { this.alt = Number(h.toFixed(2)) }) this.heightMode = 3 @@ -2330,9 +2342,14 @@ class BillboardObject extends Base { this.options.positions.lat, 10000000000000 ) - let updatedCartesians = await this.sdk.viewer.scene.clampToHeightMostDetailed( - [point1] - ) + + let objectsToExclude = [] + for (let [key, value] of this.sdk.entityMap) { + if (value.type === 'RadarScanStereoscopic' && value.entity) { + objectsToExclude.push(value.entity) + } + } + let updatedCartesians = await this.sdk.viewer.scene.clampToHeightMostDetailed([point1], objectsToExclude) if (updatedCartesians && updatedCartesians[0]) { height = this.cartesian3Towgs84(updatedCartesians[0], this.sdk.viewer).alt } @@ -2471,7 +2488,13 @@ class BillboardObject extends Base { } // 如果没有高度值,则获取紧贴高度计算 if (!position.hasOwnProperty('alt')) { - position.alt = await this.getClampToHeight(position) + let objectsToExclude = [] + for (let [key, value] of this.sdk.entityMap) { + if (value.type === 'RadarScanStereoscopic' && value.entity) { + objectsToExclude.push(value.entity) + } + } + position.alt = await this.getClampToHeight(position, objectsToExclude) } lng = this.options.customView.relativePosition.lng + position.lng lat = this.options.customView.relativePosition.lat + position.lat @@ -2482,7 +2505,13 @@ class BillboardObject extends Base { orientation: orientation }) } else { - let height = await this.getClampToHeight(this.options.positions) + let objectsToExclude = [] + for (let [key, value] of this.sdk.entityMap) { + if (value.type === 'RadarScanStereoscopic' && value.entity) { + objectsToExclude.push(value.entity) + } + } + let height = await this.getClampToHeight(this.options.positions, objectsToExclude) this.sdk.viewer.camera.flyTo({ orientation: options.orientation, destination: Cesium.Cartesian3.fromDegrees( @@ -2650,7 +2679,13 @@ class BillboardObject extends Base { } // 如果没有高度值,则获取紧贴高度计算 if (!position.hasOwnProperty('alt')) { - position.alt = await this.getClampToHeight(position) + let objectsToExclude = [] + for (let [key, value] of this.sdk.entityMap) { + if (value.type === 'RadarScanStereoscopic' && value.entity) { + objectsToExclude.push(value.entity) + } + } + position.alt = await this.getClampToHeight(position, objectsToExclude) } relativePosition = { lng: cameraPosition84.lng - position.lng, diff --git a/src/Obj/Base/RadarScanStereoscopic/index.js b/src/Obj/Base/RadarScanStereoscopic/index.js index f3bace4..605a9d6 100644 --- a/src/Obj/Base/RadarScanStereoscopic/index.js +++ b/src/Obj/Base/RadarScanStereoscopic/index.js @@ -86,6 +86,10 @@ class RadarScanStereoscopic extends Base { RadarScanStereoscopic.radarSolidScan(this) } + get type() { + return 'RadarScanStereoscopic' + } + static radarSolidScan(that) { let viewer = that.sdk.viewer let options = that.options