| | |
| | | <mapinfo ref="mapinfo" /> |
| | | <maplayer ref="maplayer" /> |
| | | <queryinfo ref="queryinfo" /> |
| | | <terrainDig ref="terrainDig" /> |
| | | <input |
| | | type="file" |
| | | accept=".kml" |
| | |
| | | import mapinfo from "../Tools/mapinfo.vue"; |
| | | import maplayer from "../Tools/maplayer.vue"; |
| | | import queryinfo from "../Tools/queryinfo.vue"; |
| | | import terrainDig from "../Tools/terrainDig.vue"; |
| | | import $ from "jquery"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import ImageWMS from "ol/source/ImageWMS"; |
| | |
| | | import { geometry } from "@turf/turf"; |
| | | |
| | | export default { |
| | | components: { mapinfo, maplayer, queryinfo }, |
| | | components: { mapinfo, maplayer, queryinfo, terrainDig }, |
| | | data() { |
| | | return { |
| | | showTwoMenuFlag: false, |
| | |
| | | label: "synthesis.layer", |
| | | name: "图层管理", |
| | | css: "twoMenu_imge11", |
| | | }, |
| | | { |
| | | id: "b1", |
| | | label: "synthesis.split", |
| | | name: "分屏", |
| | | css: "twoMenu_imge21", |
| | | }, |
| | | { |
| | | id: "b9", |
| | | label: "synthesis.undergroundMode", |
| | | name: "地下模式", |
| | | css: "twoMenu_imge29", |
| | | }, |
| | | ], |
| | | [ |
| | |
| | | break; |
| | | case "d2": //坡度分析 |
| | | that.isslopeFlag = !that.isslopeFlag; |
| | | var val = { |
| | | name: "Lengend", |
| | | id: res, |
| | | vshow: that.isslopeFlag |
| | | }; |
| | | this.$bus.$emit("mapChangeBox", val); |
| | | window.PDelevationTool = new SmartEarth.ElevationTool(sgworld); //全局变量 |
| | | if (that.isslopeFlag == true) { |
| | | PDelevationTool.type = "slope"; |
| | |
| | | PDelevationTool.type = "none"; |
| | | } |
| | | PDelevationTool.render(); |
| | | |
| | | break; |
| | | case "d3": //路径分析 |
| | | |
| | |
| | | } |
| | | break; |
| | | case "d10": //地面整平 |
| | | if (this.DXZPState != null) { |
| | | this.DXZPState.drawHandler && this.DXZPState.drawHandler.destroy(); |
| | | Viewer._container.style.cursor = "default"; |
| | | this.DXZPState.tooltip && this.DXZPState.tooltip.show(false); |
| | | if (window.DXTerrainFlattening != null) { |
| | | DXTerrainFlattening.remove(); |
| | | } |
| | | window.DXTerrainFlattening = null; |
| | | this.DXZPState = null; |
| | | } else { |
| | | this.DXZPState = sgworld.Creator.createSimpleGraphic( |
| | | "polygon", |
| | | { |
| | | clampToGround: true, |
| | | }, |
| | | function (entity) { |
| | | let positions = entity.polygon.hierarchy.getValue().positions; |
| | | sgworld.Creator.SimpleGraphic.remove(entity.id); |
| | | window.DXTerrainFlattening = |
| | | sgworld.Creator.createTerrainModifier( |
| | | "地形压平", |
| | | positions, |
| | | 10, |
| | | {} |
| | | ); |
| | | } |
| | | ); |
| | | } |
| | | var val = { |
| | | name: "Trrain", |
| | | id: res, |
| | | }; |
| | | this.$bus.$emit("mapChangeBox", val); |
| | | // if (this.DXZPState != null) { |
| | | // this.DXZPState.drawHandler && this.DXZPState.drawHandler.destroy(); |
| | | // Viewer._container.style.cursor = "default"; |
| | | // this.DXZPState.tooltip && this.DXZPState.tooltip.show(false); |
| | | // if (window.DXTerrainFlattening != null) { |
| | | // DXTerrainFlattening.remove(); |
| | | // } |
| | | // window.DXTerrainFlattening = null; |
| | | // this.DXZPState = null; |
| | | // } else { |
| | | // this.DXZPState = sgworld.Creator.createSimpleGraphic( |
| | | // "polygon", |
| | | // { |
| | | // clampToGround: true, |
| | | // }, |
| | | // function (entity) { |
| | | // let positions = entity.polygon.hierarchy.getValue().positions; |
| | | // sgworld.Creator.SimpleGraphic.remove(entity.id); |
| | | // window.DXTerrainFlattening = |
| | | // sgworld.Creator.createTerrainModifier( |
| | | // "地形压平", |
| | | // positions, |
| | | // 10, |
| | | // {} |
| | | // ); |
| | | // } |
| | | // ); |
| | | // } |
| | | |
| | | break; |
| | | |
| | | case "d11": //地形开挖 |
| | | if (window.Excavation) { |
| | | window.Excavation.drawHandler && |
| | | window.Excavation.drawHandler.destroy(); |
| | | Viewer._container.style.cursor = "default"; |
| | | window.Excavation.tooltip && window.Excavation.tooltip.show(false); |
| | | window.Excavation.clear(); |
| | | window.Excavation = null; |
| | | } else { |
| | | window.Excavation = sgworld.Analysis.TerrainExcavation( |
| | | 10, |
| | | {}, |
| | | function () { } |
| | | ); |
| | | } |
| | | this.$refs && |
| | | this.$refs.terrainDig && |
| | | this.$refs.terrainDig.open("管道空间分析", null, { |
| | | close: () => { |
| | | |
| | | }, |
| | | }); |
| | | // if (window.Excavation) { |
| | | // window.Excavation.drawHandler && |
| | | // window.Excavation.drawHandler.destroy(); |
| | | // Viewer._container.style.cursor = "default"; |
| | | // window.Excavation.tooltip && window.Excavation.tooltip.show(false); |
| | | // window.Excavation.clear(); |
| | | // window.Excavation = null; |
| | | // } else { |
| | | // window.Excavation = sgworld.Analysis.TerrainExcavation( |
| | | // 10, |
| | | // {}, |
| | | // function () { } |
| | | // ); |
| | | // } |
| | | break; |
| | | |
| | | case "d12": //通视分析 |
| | |
| | | pointSelect: true, |
| | | spood: 20, |
| | | GroupID: 0, |
| | | url: "/SmartEarthSDK/Workers/image/waterNormals.jpg", |
| | | url: "/SmartEarthSDK/Workers/image/33.gif", |
| | | }; |
| | | window.AnalysisFlood = sgworld.Command.execute( |
| | | 2, |
| | |
| | | .menu_Box { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | margin: 0; |
| | | padding: 0; |
| | | overflow-y: auto; |