| | |
| | | import { getWelcome } from '@/api/pc/public/specialmap' |
| | | import { mapGetters } from 'vuex' |
| | | |
| | | let pathLayer = null |
| | | let pointLayer = null |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | |
| | | pathList: [], |
| | | pointNameList: [], |
| | | pointList: [], |
| | | pathLayer: null, |
| | | pointLayer: null, |
| | | panoramaUrlOne: '', |
| | | panoramaUrl: '', |
| | | audioSource: '', |
| | |
| | | }, |
| | | computed: { |
| | | ...mapGetters([ |
| | | 'viewer', |
| | | // 校区内导航的显示关闭 |
| | | 'campusNavFlag', |
| | | 'orgNavBarFlag', |
| | |
| | | this.pathList.push(k) |
| | | }) |
| | | |
| | | this.pathLayer = new global.DC.VectorLayer('pathLayer') |
| | | this.viewer.addLayer(this.pathLayer) |
| | | pathLayer = new global.DC.VectorLayer('pathLayer') |
| | | global.viewer.addLayer(pathLayer) |
| | | |
| | | this.pointLayer = new global.DC.HtmlLayer('pointLayer') |
| | | this.viewer.addLayer(this.pointLayer) |
| | | pointLayer = new global.DC.HtmlLayer('pointLayer') |
| | | global.viewer.addLayer(pointLayer) |
| | | |
| | | this.pathList.forEach((item) => { |
| | | this.drawPolyline(item) |
| | |
| | | }) |
| | | if (this.pointList.length > 0) { |
| | | this.$store.dispatch('pcMoveView', { |
| | | viewer: this.viewer, |
| | | viewer: global.viewer, |
| | | jd: +this.pointList[0].split(',')[0] - 0.0005, |
| | | wd: this.pointList[0].split(',')[1] |
| | | }) |
| | | } else { |
| | | this.$store.dispatch('pcMoveView', { |
| | | viewer: this.viewer, |
| | | viewer: global.viewer, |
| | | jd: +this.pathList[0].split(';')[0].split(',')[0] - 0.0005, |
| | | wd: this.pathList[0].split(';')[0].split(',')[1] |
| | | }) |
| | |
| | | clampToGround: true |
| | | }) |
| | | |
| | | this.pathLayer.addOverlay(polyline) |
| | | pathLayer.addOverlay(polyline) |
| | | }, |
| | | drawPoint (item, name) { |
| | | const divIcon = new global.DC.DivIcon( |
| | |
| | | </div> |
| | | ` |
| | | ) |
| | | this.pointLayer.addOverlay(divIcon) |
| | | pointLayer.addOverlay(divIcon) |
| | | }, |
| | | audioPlay () { |
| | | if (this.audioFlag == false) { |
| | |
| | | } |
| | | }, |
| | | closeModel () { |
| | | this.viewer.removeLayer(this.pathLayer) |
| | | this.viewer.removeLayer(this.pointLayer) |
| | | global.viewer.removeLayer(pathLayer) |
| | | global.viewer.removeLayer(pointLayer) |
| | | |
| | | this.audioSynth.cancel() |
| | | this.audioFlag = false |
| | |
| | | }, |
| | | destroyed () { |
| | | this.audioSynth.cancel() |
| | | this.viewer.removeLayer(this.pathLayer) |
| | | this.viewer.removeLayer(this.pointLayer) |
| | | global.viewer.removeLayer(pathLayer) |
| | | global.viewer.removeLayer(pointLayer) |
| | | // console.log("关闭", "see1"); |
| | | } |
| | | } |