| | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <!--坐标点位--> |
| | | <div |
| | | class="coordLocalBox" |
| | | v-if="showCoordLocalBoxDialog" |
| | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <!--地形平整--> |
| | | <div |
| | | class="terrainLevelBox" |
| | | v-if="showTerrainLevelDialog" |
| | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <!-- 路径分析弹窗--> |
| | | <div |
| | | class="pathAnalysisBox" |
| | | v-if="showPathAnalysisBoxDialog" |
| | |
| | | ></div> |
| | | </div> |
| | | </div> |
| | | <!-- 坡度分析弹窗--> |
| | | <div |
| | | class="lengend" |
| | | v-show="showLengendDialog" |
| | |
| | | this.$bus.$on('changemapType', (e) => { |
| | | this.show2DMap = e; |
| | | }); |
| | | this.$bus.$on('closeMenuPop', (e) => { |
| | | //非路径分析 |
| | | if (e != 'd3'){ |
| | | this.showPathAnalysisBoxDialog = false; |
| | | } |
| | | //非坡度分析 |
| | | if (e != 'd2'){ |
| | | this.showLengendDialog = false; |
| | | } |
| | | //非地形平整 |
| | | if (e != 'd10'){ |
| | | this.showTerrainLevelDialog = false; |
| | | } |
| | | }); |
| | | //模型捕捉 |
| | | this.catchmodel() |
| | | }, |
| | |
| | | } else { |
| | | this.showBufferBoxDialog = true; |
| | | } |
| | | } else if (res.name == "Coord") { |
| | | } |
| | | else if (res.name == "Coord") { |
| | | if (res.id == "1") { |
| | | this.showCoordLocalBoxDialog = true; |
| | | this.showToponymicLocalBoxDialog = false; |
| | |
| | | this.showCoordLocalBoxDialog = false; |
| | | this.getToponymicData(); |
| | | } |
| | | } else if (res.name == "Analysis") { |
| | | } |
| | | else if (res.name == "Analysis") { |
| | | if (res.id == "3") { |
| | | if (res.show == true) { |
| | | this.showPathAnalysisBoxDialog = true; |
| | |
| | | this.closeBufferBox(4); |
| | | } |
| | | } |
| | | } else if (res.name == "Trrain") { |
| | | } |
| | | else if (res.name == "Trrain") { |
| | | switch (res.id) { |
| | | case "d10": |
| | | this.showTerrainLevelDialog = !this.showTerrainLevelDialog; |
| | | this.clearTerrainLevel(); |
| | | break; |
| | | } |
| | | |
| | | } else if (res.name == "Lengend") { |
| | | } |
| | | else if (res.name == "Lengend") { |
| | | switch (res.id) { |
| | | case "d2": |
| | | |
| | | this.showLengendDialog = res.vshow; |
| | | |
| | | break; |
| | | } |
| | | |
| | | } |
| | | }, |
| | | handleSizeChange(val) { |
| | |
| | | break; |
| | | case 2: |
| | | this.showCoordLocalBoxDialog = false; |
| | | sgworld.Creator.DeleteObject(this.imagePoint); |
| | | break; |
| | | case 3: |
| | | this.showToponymicLocalBoxDialog = false; |
| | |
| | | Y: lat, |
| | | Altitude: 2000, |
| | | }; |
| | | if (this.imagePoint != null) { |
| | | sgworld.Creator.DeleteObject(this.imagePoint); |
| | | this.imagePoint = null; |
| | | } |
| | | this.imagePoint = sgworld.Creator.CreateLabel( |
| | | position, |
| | | "", |
| | |
| | | }, |
| | | async showMouseLeftClick(res) { |
| | | if (res == 3) { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return false; |
| | | this.$refs.form.validate(async (valid) => { |
| | | if (valid) { |
| | | this.clearPathAll(5); |
| | | var start = this.pathFrom.lon.split(","); |
| | | var end = this.pathFrom.lat.split(","); |
| | | var startData = { |
| | | x1: parseFloat(start[0]), |
| | | y1: parseFloat(start[1]), |
| | | x2: parseFloat(end[0]), |
| | | y2: parseFloat(end[1]), |
| | | }; |
| | | const data = await comprehensive_selectRoute(startData); |
| | | if (data.code != 200) { |
| | | return this.$message.error("数据请求失败"); |
| | | } |
| | | if (!data.result) { |
| | | return this.$message.error("暂无数据"); |
| | | } |
| | | var wkt = this.$wkt.parse(data.result); |
| | | var bufferSource = Cesium.GeoJsonDataSource.load(wkt, { |
| | | stroke: new Cesium.Color(82 / 255, 152 / 255, 255 / 255, 1), |
| | | strokeWidth: 5, |
| | | clampToGround: true, |
| | | }); |
| | | bufferSource.then((bufferSource) => { |
| | | sgworld.Navigate.flyToObj(bufferSource); |
| | | Viewer.dataSources.add(bufferSource); |
| | | }); |
| | | } |
| | | }); |
| | | this.clearPathAll(3); |
| | | var start = this.pathFrom.lon.split(","); |
| | | var end = this.pathFrom.lat.split(","); |
| | | var startData = { |
| | | x1: parseFloat(start[0]), |
| | | y1: parseFloat(start[1]), |
| | | x2: parseFloat(end[0]), |
| | | y2: parseFloat(end[1]), |
| | | }; |
| | | |
| | | const data = await comprehensive_selectRoute(startData); |
| | | if (data.code != 200) { |
| | | return this.$message.error("数据请求失败"); |
| | | } |
| | | var wkt = this.$wkt.parse(data.result); |
| | | var bufferSource = Cesium.GeoJsonDataSource.load(wkt, { |
| | | stroke: new Cesium.Color(82 / 255, 152 / 255, 255 / 255, 1), |
| | | |
| | | strokeWidth: 5, |
| | | clampToGround: true, |
| | | }); |
| | | bufferSource.then((bufferSource) => { |
| | | sgworld.Navigate.flyToObj(bufferSource); |
| | | Viewer.dataSources.add(bufferSource); |
| | | }); |
| | | // this.clearPathAll(3); |
| | | // var start = this.pathFrom.lon.split(","); |
| | | // var end = this.pathFrom.lat.split(","); |
| | | // var startData = { |
| | | // x1: parseFloat(start[0]), |
| | | // y1: parseFloat(start[1]), |
| | | // x2: parseFloat(end[0]), |
| | | // y2: parseFloat(end[1]), |
| | | // }; |
| | | // |
| | | // const data = await comprehensive_selectRoute(startData); |
| | | // if (data.code != 200) { |
| | | // return this.$message.error("数据请求失败"); |
| | | // } |
| | | // if (!data.result) { |
| | | // return this.$message.error("暂无数据"); |
| | | // } |
| | | // var wkt = this.$wkt.parse(data.result); |
| | | // var bufferSource = Cesium.GeoJsonDataSource.load(wkt, { |
| | | // stroke: new Cesium.Color(82 / 255, 152 / 255, 255 / 255, 1), |
| | | // |
| | | // strokeWidth: 5, |
| | | // clampToGround: true, |
| | | // }); |
| | | // bufferSource.then((bufferSource) => { |
| | | // sgworld.Navigate.flyToObj(bufferSource); |
| | | // Viewer.dataSources.add(bufferSource); |
| | | // }); |
| | | // var jsonurl = |
| | | // wnsUrl + |
| | | // '?start=' + |
| | |
| | | sgworld.Creator.DeleteObject(this.linePath); |
| | | this.linePath = null; |
| | | } |
| | | case 5: |
| | | if (this.linePath != null) { |
| | | sgworld.Creator.DeleteObject(this.linePath); |
| | | this.linePath = null; |
| | | } |
| | | |
| | | Viewer.dataSources.removeAll(); |
| | | break; |
| | | } |
| | | }, |
| | |
| | | .mapBox { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | position: relative; |
| | | #mapdiv { |
| | | width: 100%; |
| | |
| | | padding: 10px 20px; |
| | | } |
| | | } |
| | | .pathAnalysisBox{ |
| | | width: 412px; |
| | | height: 370px; |
| | | z-index: 40; |
| | | position: absolute; |
| | | right: 8%; |
| | | bottom: 1%; |
| | | } |
| | | .attributionPop{ |
| | | width: 350px; |
| | | height: 370px; |
| | |
| | | padding: 10px 20px; |
| | | } |
| | | } |
| | | |
| | | .terrainLevelBox { |
| | | width: 350px; |
| | | height: 370px; |