广告牌高程计算忽略三维扫描
This commit is contained in:
		| @ -1812,7 +1812,13 @@ class BillboardObject extends Base { | |||||||
|           case '2': |           case '2': | ||||||
|           case 3: |           case 3: | ||||||
|           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.alt = Number(h.toFixed(2)) | ||||||
|               heightElm.value = this.alt |               heightElm.value = this.alt | ||||||
|             }) |             }) | ||||||
| @ -1876,7 +1882,13 @@ class BillboardObject extends Base { | |||||||
|                     break |                     break | ||||||
|                   case 3: |                   case 3: | ||||||
|                   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.alt = Number(h.toFixed(2)) | ||||||
|                     }) |                     }) | ||||||
|                     this.heightMode = 3 |                     this.heightMode = 3 | ||||||
| @ -2330,9 +2342,14 @@ class BillboardObject extends Base { | |||||||
|       this.options.positions.lat, |       this.options.positions.lat, | ||||||
|       10000000000000 |       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]) { |     if (updatedCartesians && updatedCartesians[0]) { | ||||||
|       height = this.cartesian3Towgs84(updatedCartesians[0], this.sdk.viewer).alt |       height = this.cartesian3Towgs84(updatedCartesians[0], this.sdk.viewer).alt | ||||||
|     } |     } | ||||||
| @ -2471,7 +2488,13 @@ class BillboardObject extends Base { | |||||||
|       } |       } | ||||||
|       // 如果没有高度值,则获取紧贴高度计算 |       // 如果没有高度值,则获取紧贴高度计算 | ||||||
|       if (!position.hasOwnProperty('alt')) { |       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 |       lng = this.options.customView.relativePosition.lng + position.lng | ||||||
|       lat = this.options.customView.relativePosition.lat + position.lat |       lat = this.options.customView.relativePosition.lat + position.lat | ||||||
| @ -2482,7 +2505,13 @@ class BillboardObject extends Base { | |||||||
|         orientation: orientation |         orientation: orientation | ||||||
|       }) |       }) | ||||||
|     } else { |     } 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({ |       this.sdk.viewer.camera.flyTo({ | ||||||
|         orientation: options.orientation, |         orientation: options.orientation, | ||||||
|         destination: Cesium.Cartesian3.fromDegrees( |         destination: Cesium.Cartesian3.fromDegrees( | ||||||
| @ -2650,7 +2679,13 @@ class BillboardObject extends Base { | |||||||
|       } |       } | ||||||
|       // 如果没有高度值,则获取紧贴高度计算 |       // 如果没有高度值,则获取紧贴高度计算 | ||||||
|       if (!position.hasOwnProperty('alt')) { |       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 = { |       relativePosition = { | ||||||
|         lng: cameraPosition84.lng - position.lng, |         lng: cameraPosition84.lng - position.lng, | ||||||
|  | |||||||
| @ -86,6 +86,10 @@ class RadarScanStereoscopic extends Base { | |||||||
|     RadarScanStereoscopic.radarSolidScan(this) |     RadarScanStereoscopic.radarSolidScan(this) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   get type() { | ||||||
|  |     return 'RadarScanStereoscopic' | ||||||
|  |   } | ||||||
|  |  | ||||||
|   static radarSolidScan(that) { |   static radarSolidScan(that) { | ||||||
|     let viewer = that.sdk.viewer |     let viewer = that.sdk.viewer | ||||||
|     let options = that.options |     let options = that.options | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user