| | |
| | | popper-class="item_tooltip" |
| | | > |
| | | <div class="legend-bg" @click="fovViewer"> |
| | | <img class="dwImg" src="@/assets/img/new/location.png" /> |
| | | <img class="dwImg" src="@/assets/img/new/mapSplit.png" /> |
| | | </div> |
| | | </el-tooltip> |
| | | </div> |
| | |
| | | let _index = 0; |
| | | import rightLegend from "./right-legend"; |
| | | import Bus from "../tools/Bus"; |
| | | import { mapState, mapMutations } from "vuex"; |
| | | export default { |
| | | name: "right-bottom", |
| | | components: { |
| | |
| | | isActive: true, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapState(["viewer1Show", "isLand", "yqfk", "qyEchartsShow"]), |
| | | }, |
| | | mounted() { |
| | | |
| | | //关闭我的资源弹窗 |
| | | Bus.$on("closeLegendPop", (data) => { |
| | | if (data) { |
| | |
| | | Bus.$off("closeLegendPop"); |
| | | }, |
| | | methods: { |
| | | ...mapMutations(["setViewer1Show", "setqyEchartsShow"]), |
| | | // 相机参数 |
| | | getcamera() { |
| | | let p = sgworld.Navigate.getCameraInfo(); |
| | |
| | | } |
| | | }, |
| | | fovViewer() { |
| | | this.isWideAngle = !this.isWideAngle; |
| | | if (this.isWideAngle) { |
| | | this.wideAngle = window.Viewer.camera.frustum.fov; |
| | | window.Viewer.camera.frustum.fov = 2; |
| | | } else { |
| | | window.Viewer.camera.frustum.fov = this.wideAngle; |
| | | } |
| | | this.setViewer1Show(!this.viewer1Show); |
| | | // this.isWideAngle = !this.isWideAngle; |
| | | // if (this.isWideAngle) { |
| | | // this.wideAngle = window.Viewer.camera.frustum.fov; |
| | | // window.Viewer.camera.frustum.fov = 2; |
| | | // } else { |
| | | // window.Viewer.camera.frustum.fov = this.wideAngle; |
| | | // } |
| | | }, |
| | | flyBack() { |
| | | sgworld.Navigate.flyToPointsInterest({ |
| | | destination: new Cesium.Cartesian3.fromDegrees( |
| | | this.camera.position[0], |
| | | this.camera.position[1], |
| | | this.camera.position[2] |
| | | ), |
| | | orientation: { |
| | | heading: Cesium.Math.toRadians(this.camera.orientation.heading), |
| | | pitch: Cesium.Math.toRadians(this.camera.orientation.pitch), |
| | | roll: Cesium.Math.toRadians(this.camera.orientation.roll), |
| | | }, |
| | | }); |
| | | destination: { |
| | | "x": -2739326.5749705257, |
| | | "y": 4699172.613682586, |
| | | "z": 3363231.4711036524 |
| | | }, orientation: new Cesium.HeadingPitchRoll(0.20701194045518534, -1.2462306958113518, 0.00000112321019862804), |
| | | duration: 7, //飞行时间8s |
| | | }); |
| | | |
| | | |
| | | // sgworld.Navigate.flyToPointsInterest({ |
| | | // destination: new Cesium.Cartesian3.fromDegrees( |
| | | // this.camera.position[0], |
| | | // this.camera.position[1], |
| | | // this.camera.position[2] |
| | | // ), |
| | | // orientation: { |
| | | // heading: Cesium.Math.toRadians(this.camera.orientation.heading), |
| | | // pitch: Cesium.Math.toRadians(this.camera.orientation.pitch), |
| | | // roll: Cesium.Math.toRadians(this.camera.orientation.roll), |
| | | // }, |
| | | // }); |
| | | }, |
| | | fullScreen() { |
| | | this.isActive = !this.isActive; |