| | |
| | | for (const key in LeftNavLayer) { |
| | | if (LeftNavLayer[key] != null) { |
| | | LeftNavLayer[key].eachOverlay((item) => { |
| | | item.position = new global.DC.Position(Number(item.attr.params.jd), Number(item.attr.params.wd), 0) |
| | | item.position = new global.DC.Position(Number(item.attr.params.jd), Number(item.attr.params.wd), 50) |
| | | }) |
| | | } |
| | | } |
| | |
| | | this.$store.commit('SET_POINTPOSITION', [ |
| | | Number(param.jd), |
| | | Number(param.wd), |
| | | Number(param.gd), |
| | | Number(50), |
| | | Number(param.heading), |
| | | Number(param.pitch), |
| | | Number(param.roll) |
| | |
| | | new global.DC.Position( |
| | | Number(param.jd), |
| | | Number(param.wd), |
| | | 300, |
| | | 50, |
| | | Number(param.heading), |
| | | Number(param.pitch), |
| | | Number(param.roll) |
| | |
| | | ) |
| | | } else { |
| | | position = global.DC.Transform.transformWGS84ToCartesian( |
| | | new global.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd)) |
| | | new global.DC.Position(Number(item.jd), Number(item.wd), Number(50)) |
| | | ) |
| | | } |
| | | |
| | |
| | | // skipLevelOfDetail: false, |
| | | shadows: global.DC.Namespace.Cesium.ShadowMode.DISABLED |
| | | }) |
| | | tileset.setHeight(150) |
| | | tileset.setHeight(5) |
| | | tilesetLayer.addOverlay(tileset) |
| | | tileset.on(global.DC.MouseEventType.CLICK, that.tilesetClick) |
| | | }, |
| | |
| | | ) |
| | | } else { |
| | | divIcon = new global.DC.DivIcon( |
| | | new global.DC.Position(Number(item.longitude), Number(item.latitude), 150), |
| | | new global.DC.Position(Number(item.longitude), Number(item.latitude), 50), |
| | | ` |
| | | <div class="tag-entitys-box"> |
| | | <div class="tag-content"> |
| | |
| | | } else { |
| | | if (currentOrgLayer != null) { |
| | | currentOrgLayer.eachOverlay((item) => { |
| | | item.position = new global.DC.Position(Number(item.position.lng), Number(item.position.lat), 150) |
| | | item.position = new global.DC.Position(Number(item.position.lng), Number(item.position.lat), 50) |
| | | }) |
| | | } |
| | | } |
| | |
| | | this.$store.commit('SET_POINTPOSITION', [ |
| | | Number(item.longitude), |
| | | Number(item.latitude), |
| | | Number(item.alt), |
| | | Number(50), |
| | | Number(item.heading), |
| | | Number(item.pitch), |
| | | Number(item.roll) |
| | |
| | | new global.DC.Position( |
| | | Number(item.longitude), |
| | | Number(item.latitude), |
| | | 300, |
| | | 50, |
| | | Number(item.heading), |
| | | Number(item.pitch), |
| | | Number(item.roll) |
| | |
| | | new global.DC.Position( |
| | | Number(item.longitude), |
| | | Number(item.latitude), |
| | | Number(item.alt) |
| | | Number(50) |
| | | ) |
| | | ) |
| | | } |
| | |
| | | ) |
| | | } else { |
| | | divIcon = new global.DC.DivIcon( |
| | | new global.DC.Position(Number(param.longitude), Number(param.latitude), 150), |
| | | new global.DC.Position(Number(param.longitude), Number(param.latitude), 50), |
| | | ` |
| | | <div class="tag-entitys-box layer-entity-animation"> |
| | | <div class="tag-content"> |
| | |
| | | ) |
| | | } else { |
| | | divIcon = new global.DC.DivIcon( |
| | | new global.DC.Position(Number(param.longitude), Number(param.latitude), 150), |
| | | new global.DC.Position(Number(param.longitude), Number(param.latitude), 50), |
| | | ` |
| | | <div class="tag-entitys-box"> |
| | | <div class="tag-content"> |
| | |
| | | this.$store.commit('SET_POINTPOSITION', [ |
| | | Number(item.longitude), |
| | | Number(item.latitude), |
| | | Number(item.alt), |
| | | Number(50), |
| | | Number(item.heading), |
| | | Number(item.pitch), |
| | | Number(item.roll) |
| | |
| | | new global.DC.Position( |
| | | Number(item.longitude), |
| | | Number(item.latitude), |
| | | 300, |
| | | 50, |
| | | Number(item.heading), |
| | | Number(item.pitch), |
| | | Number(item.roll) |
| | |
| | | new global.DC.Position( |
| | | Number(item.longitude), |
| | | Number(item.latitude), |
| | | Number(item.alt) |
| | | Number(50) |
| | | ) |
| | | ) |
| | | } |
| | |
| | | } else { |
| | | if (ourLayer != null) { |
| | | ourLayer.eachOverlay((item) => { |
| | | item.position = new global.DC.Position(Number(item.position.lng), Number(item.position.lat), 150) |
| | | item.position = new global.DC.Position(Number(item.position.lng), Number(item.position.lat), 50) |
| | | }) |
| | | } |
| | | } |
| | |
| | | ) |
| | | } else { |
| | | divIcon = new global.DC.DivIcon( |
| | | new global.DC.Position(Number(item.jd), Number(item.wd), 150), |
| | | new global.DC.Position(Number(item.jd), Number(item.wd), 50), |
| | | ` |
| | | <div class="tag-entitys-box"> |
| | | <div class="tag-content"> |
| | |
| | | this.appendPopup() |
| | | } |
| | | |
| | | get viewer () { |
| | | get viewer() { |
| | | return this._viewer |
| | | } |
| | | |
| | | get popup () { |
| | | get popup() { |
| | | return this._popup |
| | | } |
| | | |
| | | get position () { |
| | | get position() { |
| | | return this._position |
| | | } |
| | | |
| | | appendPopup () { |
| | | appendPopup() { |
| | | /** |
| | | * @domId 存放 dom 的id, 多个数组,单个字符串 |
| | | */ |
| | |
| | | } |
| | | |
| | | // 创建元素并追加 |
| | | createVideoWindowAll (id) { |
| | | createVideoWindowAll(id) { |
| | | this.clearMove(id) |
| | | |
| | | this._viewer.scene.postRender.addEventListener(this.movePopup(id)) |
| | | } |
| | | |
| | | movePopup (id) { |
| | | movePopup(id) { |
| | | var self = this |
| | | return function () { |
| | | return function() { |
| | | var position = global.DC.Transform.transformCartesianToWGS84(self._position[0]) |
| | | var positionChange = null |
| | | if (store.state.viewer.twoOrThree == '三 维') { |
| | |
| | | new global.DC.Position( |
| | | Number(position.lng), |
| | | Number(position.lat), |
| | | Number(150) |
| | | Number(50) |
| | | ) |
| | | ) |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | clearMove (id) { |
| | | clearMove(id) { |
| | | this._viewer.scene.postRender.removeEventListener(this.movePopup(id)) |
| | | } |
| | | |
| | | positionPopUp (windowCoord, id) { |
| | | positionPopUp(windowCoord, id) { |
| | | if (document.getElementById(id) == null || document.getElementById(id) == undefined) { |
| | | this._viewer.scene.postRender.removeEventListener(this.movePopup(id)) |
| | | return |
| | |
| | | windowCoord.y && windowCoord.y != undefined && !Number.isNaN(windowCoord.y)) { |
| | | const x = windowCoord.x |
| | | const y = windowCoord.y - document.getElementById(id).offsetHeight |
| | | // x = windowCoord.x - document.getElementById(id).offsetWidth |
| | | // x = windowCoord.x - document.getElementById(id).offsetWidth |
| | | |
| | | document.getElementById(id).style.cssText = ` |
| | | visibility:visible; |
| | |
| | | } |
| | | } |
| | | |
| | | export default DivForms |
| | | export default DivForms |
| | |
| | | this.appendPopup() |
| | | } |
| | | |
| | | get viewer () { |
| | | get viewer() { |
| | | return this._viewer |
| | | } |
| | | |
| | | get popup () { |
| | | get popup() { |
| | | return this._popup |
| | | } |
| | | |
| | | get position () { |
| | | get position() { |
| | | return this._position |
| | | } |
| | | |
| | | appendPopup () { |
| | | appendPopup() { |
| | | /** |
| | | * @domId 存放 dom 的id, 多个数组,单个字符串 |
| | | */ |
| | |
| | | } |
| | | |
| | | // 创建元素并追加 |
| | | createVideoWindowAll (id) { |
| | | createVideoWindowAll(id) { |
| | | this._viewer.scene.postRender.addEventListener(this.movePopup(id)) |
| | | } |
| | | |
| | | movePopup (id) { |
| | | movePopup(id) { |
| | | var self = this |
| | | return function () { |
| | | return function() { |
| | | var position = global.DC.Transform.transformCartesianToWGS84(self._position[0]) |
| | | var positionChange = null |
| | | if (store.state.viewer.twoOrThree == '三 维') { |
| | |
| | | new global.DC.Position( |
| | | Number(position.lng), |
| | | Number(position.lat), |
| | | Number(150) |
| | | Number(50) |
| | | ) |
| | | ) |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | positionPopUp (windowCoord, id) { |
| | | positionPopUp(windowCoord, id) { |
| | | if (document.getElementById(id) == null || document.getElementById(id) == undefined) { |
| | | this._viewer.scene.postRender.removeEventListener(this.movePopup(id)) |
| | | return |
| | |
| | | windowCoord.y && windowCoord.y != undefined && !Number.isNaN(windowCoord.y)) { |
| | | const x = windowCoord.x |
| | | const y = windowCoord.y - document.getElementById(id).offsetHeight |
| | | // x = windowCoord.x - document.getElementById(id).offsetWidth |
| | | // x = windowCoord.x - document.getElementById(id).offsetWidth |
| | | |
| | | document.getElementById(id).style.cssText = ` |
| | | visibility:visible; |
| | |
| | | } |
| | | } |
| | | |
| | | export default PanoramaBox |
| | | export default PanoramaBox |