| | |
| | | <ul> |
| | | <li v-for="(item, index) in toNameList" |
| | | :key="index" |
| | | @click="loadPopup(item)"> |
| | | {{item.name}} |
| | | @click="originChange(item)"> |
| | | {{item.mechanismname}} |
| | | </li> |
| | | </ul> |
| | | </div> |
| | |
| | | <ul> |
| | | <li v-for="(item, index) in comeNameList" |
| | | :key="index" |
| | | @click="loadPopup(item)"> |
| | | {{item.name}} |
| | | @click="terminusChange(item)"> |
| | | {{item.mechanismname}} |
| | | </li> |
| | | </ul> |
| | | </div> |
| | |
| | | // 出发名称 |
| | | 'getToName', |
| | | // 到达名称 |
| | | 'comeName' |
| | | 'comeName', |
| | | // 点信息 |
| | | 'pointPosition' |
| | | ]) |
| | | }, |
| | | watch: { |
| | |
| | | routes += lineArr |
| | | }) |
| | | |
| | | routes = routes.substr(0, routes.length - 1) |
| | | routes = startLog + ',' + startLat + ';' + routes + endLog + ',' + endLat |
| | | |
| | | const polyline = new this.DC.Polyline(routes) |
| | | polyline.setStyle({ |
| | |
| | | clampToGround: true |
| | | }) |
| | | this.routeLayer.addOverlay(polyline) |
| | | if (this.twoOrThree == '3 维') { |
| | | if (this.twoOrThree == '真三维') { |
| | | this.viewer.flyTo(this.routeLayer) |
| | | } else { |
| | | var longitude = null |
| | |
| | | this.viewer.camera.setView({ |
| | | // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州 |
| | | // fromDegrees()方法,将经纬度和高程转换为世界坐标 |
| | | destination: this.DC.Namespace.Cesium.Cartesian3.fromDegrees(longitude, latitude, 300), |
| | | destination: this.DC.Namespace.Cesium.Cartesian3.fromDegrees(longitude, latitude, 600), |
| | | orientation: { |
| | | // 指向 |
| | | heading: this.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | |
| | | routes += lineArr |
| | | }) |
| | | |
| | | routes = routes.substr(0, routes.length - 1) |
| | | routes = startLog + ',' + startLat + ';' + routes + endLog + ',' + endLat |
| | | |
| | | const polyline = new this.DC.Polyline(routes) |
| | | polyline.setStyle({ |
| | |
| | | }) |
| | | this.routeLayer.addOverlay(polyline) |
| | | |
| | | if (this.twoOrThree == '3 维') { |
| | | if (this.twoOrThree == '真三维') { |
| | | this.viewer.flyTo(this.routeLayer) |
| | | } else { |
| | | var longitude = null |
| | |
| | | this.viewer.camera.setView({ |
| | | // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州 |
| | | // fromDegrees()方法,将经纬度和高程转换为世界坐标 |
| | | destination: this.DC.Namespace.Cesium.Cartesian3.fromDegrees(longitude, latitude, 300), |
| | | destination: this.DC.Namespace.Cesium.Cartesian3.fromDegrees(longitude, latitude, 600), |
| | | orientation: { |
| | | // 指向 |
| | | heading: this.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | |
| | | this.comeNameShow = false |
| | | } |
| | | } |
| | | }, |
| | | |
| | | originChange (param) { |
| | | console.log(param, 456) |
| | | this.$store.commit('SET_POINTPOSITION', [ |
| | | Number(param.jd), |
| | | Number(param.wd), |
| | | Number(param.gd), |
| | | Number(param.heading), |
| | | Number(param.pitch), |
| | | Number(param.roll) |
| | | ]) |
| | | this.$store.commit('SET_GETTONAME', param.mechanismname) |
| | | this.$store.commit('SET_STARTINGPOINT', this.pointPosition) |
| | | this.toNameShow = false |
| | | this.toNameList = [] |
| | | }, |
| | | |
| | | terminusChange (param) { |
| | | this.$store.commit('SET_POINTPOSITION', [ |
| | | Number(param.jd), |
| | | Number(param.wd), |
| | | Number(param.gd), |
| | | Number(param.heading), |
| | | Number(param.pitch), |
| | | Number(param.roll) |
| | | ]) |
| | | this.$store.commit('SET_COMENAME', param.mechanismname) |
| | | this.$store.commit('SET_TERMINUS', this.pointPosition) |
| | | this.comeNameShow = false |
| | | this.comeNameList = [] |
| | | } |
| | | } |
| | | } |