| | |
| | | // let pois = [0, 0,0] |
| | | let holdingPosition; |
| | | let rightKeyMove = false |
| | | let distance = 100; |
| | | let distance = 25; |
| | | export default { |
| | | props: { |
| | | towerUrl: { |
| | |
| | | default() { |
| | | return '' |
| | | } |
| | | }, |
| | | deviceData: { |
| | | type: Object, |
| | | }, |
| | | }, |
| | | data(){ |
| | |
| | | }, |
| | | mounted(){ |
| | | this.initCesium(); |
| | | console.log(this.deviceData) |
| | | }, |
| | | computed: { |
| | | boxWidth() { |
| | |
| | | "longitude": Cesium.Math.toDegrees(Cesium.Cartographic.fromCartesian(tagert).longitude), |
| | | } |
| | | //塔的距离和观测点的距离 |
| | | const point1 = Cesium.Cartesian3.fromDegrees(0, 0, 50); |
| | | console.log(_this.deviceData) |
| | | const point1 = Cesium.Cartesian3.fromDegrees(0, 0, _this.deviceData?.modelHeight || 45); |
| | | // const point1 = Cesium.Cartesian3.fromDegrees(0, 0, 45); |
| | | const point2 = Cesium.Cartesian3.fromDegrees(Cesium.Math.toDegrees(Cesium.Cartographic.fromCartesian(tagert).longitude), Cesium.Math.toDegrees(Cesium.Cartographic.fromCartesian(tagert).latitude), Cesium.Cartographic.fromCartesian(tagert).height); |
| | | |
| | | // 计算距离(单位:米) |
| | |
| | | const heading = Cesium.Math.toDegrees(camera.heading); |
| | | const pitch = Cesium.Math.toDegrees(camera.pitch); |
| | | const roll = Cesium.Math.toDegrees(camera.roll); |
| | | const point1 = Cesium.Cartesian3.fromDegrees(0, 0, 50); |
| | | const point1 = Cesium.Cartesian3.fromDegrees(0, 0, this.deviceData?.modelHeight || 45); |
| | | const point2 = Cesium.Cartesian3.fromDegrees(Cesium.Math.toDegrees(position.longitude),Cesium.Math.toDegrees(position.latitude),position.height) |
| | | |
| | | var camResult = |