| | |
| | | } |
| | | }, |
| | | handleMenuClick(menu) { |
| | | |
| | | this.currMenu = menu.menuName |
| | | }, |
| | | handlePopoverClick(child) { |
| | |
| | | |
| | | //工程巡视 |
| | | async showPathLine(params) { |
| | | |
| | | this.$bus.$emit("closeLeftAndRightMenu", true) |
| | | |
| | | const line = wktToGeoJSON(params.wkt) |
| | | const position = line.coordinates[0] |
| | | const result = [] |
| | |
| | | pos.push(1000) |
| | | result.push(...pos) |
| | | }) |
| | | // console.log("line", position) |
| | | |
| | | |
| | | window.sgworld.Creator.getFlyData(result, data => { |
| | | data.showPoint = false |
| | |
| | | window.PathAnimationData = { |
| | | flyData: data, |
| | | } |
| | | var that = this |
| | | window.PathAnimationData.winIndex = layer.open({ |
| | | type: 2, |
| | | title: "工程巡视", |
| | |
| | | content: SmartEarthRootUrl + "Workers/path/ProjectPath.html", |
| | | end: function () { |
| | | PathAnimationData.fly && PathAnimationData.fly.exit() |
| | | that.$bus.$emit("closeLeftAndRightMenu", false) |
| | | }, |
| | | }) |
| | | }) |
| | |
| | | //专题展示 |
| | | changeProject(params) { |
| | | this.$bus.$emit("changeProject", params.name) |
| | | var lon, lat, height; |
| | | if (params.name.indexOf("全国") != -1) { |
| | | height = 20000000; |
| | | lon = 110; |
| | | lat = 32; |
| | | window.viewer.camera.flyTo({ |
| | | destination: new Cesium.Cartesian3.fromDegrees(lon, lat, height), |
| | | orientation: { |
| | | heading: Cesium.Math.toRadians(0), |
| | | pitch: Cesium.Math.toRadians(-90), |
| | | }, |
| | | }) |
| | | } else if (params.name.indexOf("全球") != -1) { |
| | | lon = 85; |
| | | lat = 25; |
| | | height = 30000000; |
| | | window.viewer.camera.flyTo({ |
| | | destination: new Cesium.Cartesian3.fromDegrees(lon, lat, height), |
| | | orientation: { |
| | | heading: Cesium.Math.toRadians(0), |
| | | pitch: Cesium.Math.toRadians(-90), |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | handleTree(params) { |
| | | this.showTree = !this.showTree |