| | |
| | | viewer.addLayer(this.tagLayer) |
| | | this.wayLayer = new this.DC.HtmlLayer('wayLayer') |
| | | viewer.addLayer(this.wayLayer) |
| | | this.sceneLayer = new this.DC.VectorLayer('sceneLayer') |
| | | this.sceneLayer = new this.DC.HtmlLayer('sceneLayer') |
| | | viewer.addLayer(this.sceneLayer) |
| | | this.monitorLayer = new this.DC.VectorLayer('monitorLayer') |
| | | this.monitorLayer = new this.DC.HtmlLayer('monitorLayer') |
| | | viewer.addLayer(this.monitorLayer) |
| | | this.aedLayer = new this.DC.VectorLayer('aedLayer') |
| | | viewer.addLayer(this.aedLayer) |
| | |
| | | |
| | | getMonitorList().then(res => { |
| | | res.data.data.forEach(item => { |
| | | const billboard = new this.DC.Billboard(new that.DC.Position(Number(item.jd), Number(item.wd), 0), '/img/leftnav/map-monitor.png') |
| | | billboard.size = [20, 20] |
| | | this.monitorLayer.addOverlay(billboard) |
| | | console.log(item, 456) |
| | | const divIcon = new this.DC.DivIcon( |
| | | new that.DC.Position(Number(item.jd), Number(item.wd), 0), |
| | | ` |
| | | <img class="monitor-entitys-box" src="/img/leftnav/map-monitor.png" alt=""> |
| | | ` |
| | | ) |
| | | divIcon.attrParams = item |
| | | this.monitorLayer.addOverlay(divIcon) |
| | | |
| | | divIcon.on(that.DC.MouseEventType.CLICK, e => { |
| | | this.$store.commit('SET_PANORAMAPOPUP', false) |
| | | this.$store.commit('SET_DETAILSPOPUP', false) |
| | | this.$store.commit('SET_STATENAME', e.overlay.attrParams.mechanismname) |
| | | this.$store.commit('SET_MONITORURL', e.overlay.attrParams.videourl) |
| | | // eslint-disable-next-line new-cap |
| | | var positions = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position.fromArray([Number(item.jd), Number(item.wd), 0, 0, -90, 0])) |
| | | this.viewer.scene.globe.depthTestAgainstTerrain = false |
| | | // eslint-disable-next-line no-unused-vars |
| | | var monitor = new this.DC.PanoramaBox(this.viewer, { |
| | | domId: 'MonitorBox', |
| | | position: [ |
| | | positions |
| | | ] |
| | | }) |
| | | |
| | | this.$store.commit('SET_MONITORPOPUP', true) |
| | | }) |
| | | }) |
| | | |
| | | this.monitorLayer.show = false |
| | | }) |
| | | |
| | | getSceneList().then(res => { |
| | | res.data.data.forEach(item => { |
| | | const billboard = new this.DC.Billboard(new that.DC.Position(Number(item.jd), Number(item.wd), 0), '/img/leftnav/map-panorama.png') |
| | | billboard.size = [20, 20] |
| | | this.sceneLayer.addOverlay(billboard) |
| | | console.log(item, 123) |
| | | const divIcon = new this.DC.DivIcon( |
| | | new that.DC.Position(Number(item.jd), Number(item.wd), 0), |
| | | ` |
| | | <img class="scene-entitys-box" src="/img/leftnav/map-panorama.png" alt=""> |
| | | ` |
| | | ) |
| | | divIcon.attrParams = item |
| | | this.sceneLayer.addOverlay(divIcon) |
| | | |
| | | divIcon.on(that.DC.MouseEventType.CLICK, e => { |
| | | this.$store.commit('SET_DETAILSPOPUP', false) |
| | | this.$store.commit('SET_MONITORPOPUP', false) |
| | | this.$store.commit('SET_STATENAME', e.overlay.attrParams.mechanismname) |
| | | this.$store.commit('SET_PANORAMAURL', e.overlay.attrParams.panoramaurl) |
| | | // eslint-disable-next-line new-cap |
| | | var positions = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position.fromArray([Number(item.jd), Number(item.wd), 0, 0, -90, 0])) |
| | | this.viewer.scene.globe.depthTestAgainstTerrain = false |
| | | // eslint-disable-next-line no-unused-vars |
| | | var panorama = new this.DC.PanoramaBox(this.viewer, { |
| | | domId: 'PanoramaBox', |
| | | position: [ |
| | | positions |
| | | ] |
| | | }) |
| | | |
| | | this.$store.commit('SET_PANORAMAPOPUP', true) |
| | | }) |
| | | }) |
| | | |
| | | this.sceneLayer.show = false |
| | | }) |
| | | |