| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { transform } from 'ol/proj'; |
| | | import mapinfo from '../Tools/mapinfo.vue'; |
| | | import maplayer from '../Tools/maplayer.vue'; |
| | |
| | | methods: { |
| | | //二級菜单点击切换 |
| | | setChangeTwoMenu(res) { |
| | | |
| | | this.$store.state.mapMenuBoolean = false; |
| | | this.$store.state.mapMenuBoxFlag = null; |
| | | this.$store.state.mapPopBoolean = false; |
| | |
| | | window.model.deleteObject(); |
| | | window.model = null; |
| | | } |
| | | sgworld.Analysis.clearCurtainContrast(); |
| | | if (this.isMenuFlag == "d") { |
| | | this.clearAllAnalsy(); |
| | | } |
| | | if (this.isMenuFlag != res.id) { |
| | | if (this.isMenuFlag !=val) { |
| | | sgworld.Creator.SimpleGraphic.clear(); |
| | | this.isMenuFlag = val; |
| | | if (this.entityaLayers.length != 0) { |
| | |
| | | this.showTwoMenuFlag = res.id; |
| | | |
| | | switch (val) { |
| | | |
| | | |
| | | |
| | | case 'a': //图层管理 |
| | | |
| | | this.setCoverage(res.id); |
| | |
| | | this.entityaLayers.push(line) |
| | | break; |
| | | case 'label': |
| | | debugger |
| | | const label = Viewer.entities.add({ |
| | | position: Cesium.Cartesian3.fromDegrees(wkt.coordinates[0], wkt.coordinates[1]), |
| | | label: { |
| | |
| | | break; |
| | | case 'd2': |
| | | that.isslopeFlag = !that.isslopeFlag; |
| | | window.PDelevationTool= new SmartEarth.ElevationTool(sgworld);//全局变量 |
| | | if (that.isslopeFlag == true) { |
| | | elevationTool.type = 'slope'; |
| | | PDelevationTool.type = 'slope'; |
| | | PDelevationTool.tf = this.checked; |
| | | } else { |
| | | elevationTool.type = 'none'; |
| | | PDelevationTool.type = 'none'; |
| | | } |
| | | elevationTool.render(); |
| | | PDelevationTool.render(); |
| | | break; |
| | | case 'd3': |
| | | var value = { |
| | |
| | | var that = this; |
| | | window.model = sgworld.Creator.create3DTilesets( |
| | | '', |
| | | modelUrl, |
| | | modelUrl+'/SN/tileset.json', |
| | | {}, |
| | | {}, |
| | | '0', |
| | |
| | | } |
| | | break; |
| | | case 'd10': |
| | | if (window.TerrainFlattening) { |
| | | window.TerrainFlattening.remove(); |
| | | window.TerrainFlattening = null; |
| | | } else { |
| | | sgworld.Creator.createSimpleGraphic( |
| | | 'polygon', |
| | | { |
| | | clampToGround: true, |
| | | }, |
| | | function (entity) { |
| | | var positions = entity.polygon.hierarchy.getValue().positions; |
| | | sgworld.Creator.SimpleGraphic.remove(entity.id); |
| | | window.TerrainFlattening = |
| | | sgworld.Creator.createTerrainModifier( |
| | | '地形压平', |
| | | positions, |
| | | 10, |
| | | {} |
| | | ); |
| | | } |
| | | ); |
| | | |
| | | if(window.DXTerrainFlattening!=null){ |
| | | DXTerrainFlattening.remove(); |
| | | } |
| | | sgworld.Creator.createSimpleGraphic( |
| | | 'polygon', |
| | | { |
| | | clampToGround: true, |
| | | }, |
| | | function (entity) { |
| | | let positions = entity.polygon.hierarchy.getValue().positions; |
| | | console.log(positions); |
| | | sgworld.Creator.SimpleGraphic.remove(entity.id); |
| | | |
| | | window.DXTerrainFlattening = sgworld.Creator.createTerrainModifier("地形压平", positions, 10, {}); |
| | | } |
| | | ); |
| | | break; |
| | | |
| | | case 'd11': |
| | |
| | | break; |
| | | |
| | | case "d12": |
| | | if (window.Excavation) { |
| | | window.Excavation.deleteObject() |
| | | window.Excavation = null |
| | | if (window.TSExcavation!=null) { |
| | | window.TSExcavation.deleteObject() |
| | | window.TSExcavation = null |
| | | } else { |
| | | window.Excavation = sgworld.Analysis.createSightLine({ |
| | | window.TSExcavation = sgworld.Analysis.createSightLine({ |
| | | type: "default", |
| | | }) |
| | | } |
| | |
| | | this.$refs && this.$refs.maplayer && this.$refs.maplayer.open(); |
| | | this.$store.state.layerMnage = true; |
| | | } else if (this.$store.state.layerMnage == true) { |
| | | this.$bus.$emit("treeDataCopy","true"); |
| | | this.$refs && this.$refs.maplayer && this.$refs.maplayer.closeAll(); |
| | | this.$store.state.layerMnage = false; |
| | | |
| | | } |
| | | |
| | | break; |
| | |
| | | margin: 0; |
| | | padding: 0; |
| | | overflow-y: auto; |
| | | text-align: center; |
| | | // text-align: center; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | align-content: flex-start; |
| | |
| | | margin-left: 10px; |
| | | margin-top: 10px; |
| | | border-radius: 5px; |
| | | text-align: center; |
| | | } |
| | | .leftMen_div:hover { |
| | | background: rgba(64, 158, 255, 0.4); |