| | |
| | | gl = null |
| | | this.viewer?.destroy() // 销毁Viewer实例 |
| | | this.viewer = null |
| | | var cesiumContainer = document.getElementById(this.viewerDom) |
| | | if (cesiumContainer && removeDom) { |
| | | cesiumContainer.remove() // 移除与地图相关的DOM元素 |
| | | this.viewerDom = null |
| | | } |
| | | // var cesiumContainer = document.getElementById(this.viewerDom) |
| | | // if (cesiumContainer && removeDom) { |
| | | // cesiumContainer.remove() // 移除与地图相关的DOM元素 |
| | | // this.viewerDom = null |
| | | // } |
| | | this.viewerDom = null |
| | | } |
| | | } |
| | | |
| | |
| | | async switchContour (open) { |
| | | if (open) { |
| | | await this.boundary?.openContour() |
| | | |
| | | |
| | | } else { |
| | | this.boundary?.closeContour() |
| | | } |
| | |
| | | Cesium.Cartesian3.subtract(a, this.viewer?.camera.position, a), |
| | | Cesium.Cartesian3.normalize(r, r), |
| | | Cesium.Cartesian3.normalize(a, a)) : (r = c.direction, |
| | | a = h.direction) |
| | | a = h.direction) |
| | | let d = Cesium.Cartesian3.dot(r, a) |
| | | , p = 0 |
| | | return d < 1 && (p = Math.acos(d)), |
| | |
| | | , r = Cesium.Math.acosClamped(-e) |
| | | a > 0 && a > r && (a = r - Cesium.Math.EPSILON4), |
| | | r = Cesium.Math.acosClamped(e), |
| | | a < 0 && -a > r && (a = -r + Cesium.Math.EPSILON4) |
| | | a < 0 && -a > r && (a = -r + Cesium.Math.EPSILON4) |
| | | } |
| | | return a |
| | | } |