| | |
| | | <template> |
| | | <div class="m-left-mobileCortrolButtom"> |
| | | <!-- 底部按钮 |
| | | mobileCortrolButtom |
| | | --> |
| | | <!-- <div class="m-l-inbut" @click="mubiao"><i class="el-icon-s-help"></i></div> --> |
| | | <div class="m-l-inbut" v-show="false"> |
| | | <!-- <i class="el-icon-s-flag"></i> --> |
| | |
| | | <!-- <div class="m-l-inbut" @click="openActivity"> |
| | | <i class="el-icon-s-opportunity"></i> |
| | | </div>--> |
| | | <!-- <div class="m-l-inbut" @click="goOn"><i class="el-icon-location"></i></div> --> |
| | | <div class="m-l-inbut" @click="zoomIns"> |
| | | <i class="el-icon-refresh"></i> |
| | | </div> |
| | | <div class="m-l-inbut" @click="goOns"> |
| | | <i class="el-icon-location"></i> |
| | | </div> |
| | | <div class="m-l-inbut" @click="openOurSee"> |
| | | <i class="el-icon-map-location"></i> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | ] |
| | | } |
| | | }, |
| | | props: ['mapCenter', 'frislayertHeight'], |
| | | computed: { |
| | | ...mapGetters(['mviewer', 'openmobileGoTo', 'dimensionData']) |
| | | ...mapGetters([ |
| | | 'openmobileGoTo', |
| | | 'dimensionData', |
| | | // "startPointFn", |
| | | 'dimension' |
| | | ]) |
| | | }, |
| | | created () { |
| | | // this.getStreet(); |
| | | }, |
| | | mounted () { }, |
| | | methods: { |
| | | openOurSee () { |
| | | this.$store.commit( |
| | | 'MSET_OPENMOBILEPANORAMA', |
| | | 'http://vr.jxpskj.com/JXSFKZQJ/QJ/' |
| | | ) |
| | | }, |
| | | goOns () { |
| | | const that = this |
| | | this.$store.commit('GET_NOWPOSITION', (res) => { |
| | | that.$store.dispatch('pcMoveView', { |
| | | jd: res[0], |
| | | wd: res[1], |
| | | viewer: global.viewer |
| | | }) |
| | | |
| | | const data = [ |
| | | { |
| | | name: '我的位置', |
| | | jd: res[0], |
| | | wd: res[1] |
| | | } |
| | | ] |
| | | that.$store.dispatch('addLabelLayerIconMobelUse', { |
| | | list: data, |
| | | clear: true, |
| | | mviewer: global.viewer |
| | | }) |
| | | }) |
| | | }, |
| | | zoomIns (val) { |
| | | // this.$store.dispatch("mapFlyTo", { |
| | | // //飞入 |
| | | // lntLat: [115.87988885, 28.72502592, 2100], |
| | | // // lntLat: [115.87186406, 28.74449337, 1200], |
| | | // // lntLat: [121.50492752204283, 31.21567802276832, 2530], |
| | | // heading: 0, |
| | | // pitch: -45, |
| | | // roll: 0, |
| | | // noOpen: true, |
| | | // }); |
| | | // if (val) { |
| | | // if (this.dimension != val) { |
| | | // this.$store.dispatch("MSET_DIMENSIONS", val); |
| | | // } |
| | | // return; |
| | | // } |
| | | var that = this |
| | | |
| | | global.viewer.flyToPosition( |
| | | new global.DC.Position( |
| | | that.mapCenter[0], |
| | | that.mapCenter[1], |
| | | that.frislayertHeight, |
| | | that.dimensionData.heading, |
| | | that.dimensionData.pitch, |
| | | that.dimensionData.roll |
| | | ), |
| | | () => { |
| | | |
| | | }, |
| | | 0 |
| | | ) |
| | | }, |
| | | openActivity () { |
| | | const d = { |
| | | main: [ |
| | |
| | | // roll: 0, |
| | | // noOpen: true, |
| | | // }); |
| | | that.mviewer.camera.setView({ |
| | | global.viewer.camera.setView({ |
| | | // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州 |
| | | // fromDegrees()方法,将经纬度和高程转换为世界坐标 |
| | | // eslint-disable-next-line new-cap |