| | |
| | | @click="locationSAT" |
| | | >科技</el-button> |
| | | |
| | | <el-button |
| | | v-show="btnGroupShow" |
| | | size="mini" |
| | | class="sat-tc" |
| | | type="primary" |
| | | @click="locationTC" |
| | | >热力图</el-button> |
| | | |
| | | <el-radio-group v-model="dimensionValue" size="medium" @change="dimensionChange"> |
| | | <el-radio-button label="三 维"></el-radio-button> |
| | | <el-radio-button label="真三维"></el-radio-button> |
| | |
| | | |
| | | let layerSat = null |
| | | let layerSATtwo = null |
| | | let tcLayer = null |
| | | |
| | | const wallLayer = null |
| | | |
| | |
| | | global.viewer.flyToPosition('121.4941629,31.2091462,1859.56,0,-28.71') |
| | | }, |
| | | |
| | | locationTC () { |
| | | global.viewer.flyToPosition('120.670183527,31.348282115,109658.22,0,-89.90659095062371') |
| | | }, |
| | | |
| | | generatePosition (num) { |
| | | const list = [] |
| | | for (let i = 0; i < num; i++) { |
| | | const lng = 120.38105869 + Math.random() * 0.5 |
| | | const lat = 31.10115627 + Math.random() * 0.5 |
| | | list.push(new global.DC.Position(lng, lat)) |
| | | } |
| | | return list |
| | | }, |
| | | |
| | | removeTC () { |
| | | global.viewer.removeLayer(tcLayer) |
| | | tcLayer = null |
| | | }, |
| | | |
| | | createTC () { |
| | | tcLayer = new global.DC.HeatLayer('tcLayer', { |
| | | useGround: true, |
| | | radius: 40 |
| | | }) |
| | | global.viewer.addLayer(tcLayer) |
| | | const positions = this.generatePosition(3000) |
| | | tcLayer.setPositions(positions) |
| | | }, |
| | | |
| | | // 科技感删除 |
| | | removeSAT () { |
| | | global.viewer.remove(layerSat) |
| | | global.viewer.remove(layerSATtwo) |
| | | layerSat = null |
| | | layerSATtwo = null |
| | | }, |
| | | |
| | | // 科技感添加 |
| | |
| | | if (that.dimensionValue == '真三维') { |
| | | that.btnGroupShow = true |
| | | that.createSAT() |
| | | that.createTC() |
| | | global.viewer.off(global.DC.MouseEventType.MOUSE_MOVE, that.mouseMoveEvent) |
| | | global.viewer.off(global.DC.SceneEventType.CAMERA_CHANGED, that.mapCameraEvent) |
| | | that.removeLayers() |
| | |
| | | } else { |
| | | that.btnGroupShow = false |
| | | that.removeSAT() |
| | | that.removeTC() |
| | | global.viewer.on(global.DC.MouseEventType.MOUSE_MOVE, that.mouseMoveEvent) |
| | | global.viewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.mapCameraEvent) |
| | | tileset.off(global.DC.MouseEventType.CLICK, that.tilesetClick) |
| | |
| | | right: 75px; |
| | | z-index: 99; |
| | | } |
| | | |
| | | .sat-tc { |
| | | position: fixed; |
| | | top: 66px; |
| | | right: 141px; |
| | | z-index: 99; |
| | | } |
| | | </style> |