| | |
| | | /> |
| | | </li> --> |
| | | <li> |
| | | <img |
| | | @click="switchImagerLayerClick('影像底图')" |
| | | src="@/assets/img/new/yingxiang.png" |
| | | /> |
| | | <img @click="switchImagerLayerClick('影像底图')" src="@/assets/img/new/yingxiang.png" /> |
| | | </li> |
| | | <li> |
| | | <div class="radiogroup" @change="switchImagerLayerClick('二维底图')"> |
| | | <el-radio-group v-model="radio"> |
| | | <div class="radiogroup" @click="switchImagerLayerClick('二维底图')"> |
| | | <!-- <el-radio-group v-model="radio"> |
| | | <el-radio :label="2">标准白</el-radio> |
| | | <el-radio :label="1">科技蓝</el-radio> |
| | | <el-radio :label="0">暗夜黑</el-radio> |
| | | </el-radio-group> |
| | | </el-radio-group> --> |
| | | <img src="@/assets/img/new/shiliang.png" /> |
| | | </div> |
| | | </li> |
| | | <li> |
| | | <!-- <li> |
| | | <img |
| | | @click="switchImagerLayerClick('实景模型')" |
| | | src="@/assets/img/new/sanwei.png" |
| | | /> |
| | | </li> |
| | | </li> --> |
| | | </ul> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .switchImagerLayer { |
| | | width: 395px; |
| | | width: 260px; |
| | | height: 88px; |
| | | position: absolute; |
| | | right: 78px; |
| | | right: 10px; |
| | | top: -90px; |
| | | } |
| | | |
| | | .switchImagerLayer ul { |
| | | width: 100%; |
| | | list-style: none; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | li { |
| | | cursor: pointer; |
| | | width: 124px; |
| | | height: 89px; |
| | | } |
| | | |
| | | li img { |
| | | width: 100%; |
| | | } |
| | | |
| | | li:hover { |
| | | background-color: rgb(0, 136, 255, 0.4); |
| | | } |
| | | |
| | | .switchImagerLayer li .radiogroup { |
| | | position: absolute; |
| | | } |
| | | |
| | | .switchImagerLayer li .el-radio-group { |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | top: 5px; |
| | | z-index: 10; |
| | | } |
| | | |
| | | .el-radio { |
| | | color: #fff; |
| | | text-shadow: 1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000, |
| | |
| | | <script> |
| | | import Bus from "../tools/Bus"; |
| | | import baseVuex from "@mixin/baseVuex"; |
| | | |
| | | export default { |
| | | name: "switchImagerLayer", |
| | | components: {}, |
| | |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() {}, |
| | | mounted() { }, |
| | | mixins: [baseVuex], |
| | | methods: { |
| | | clearLayer() {}, |
| | | clearLayer() { }, |
| | | removeLayer() { |
| | | var layer = Viewer.imageryLayers._layers[1]; |
| | | if (layer) { |
| | | Viewer.imageryLayers.remove(layer) |
| | | } |
| | | }, |
| | | switchImagerLayerClick(type) { |
| | | switch (type) { |
| | | case "影像底图": |
| | | this.radio = null; |
| | | this.changeLayer("2d"); //添加相机范围限制 |
| | | this.clearSwitchImagerLayerClick(); |
| | | Bus.$emit("switchImage"); |
| | | this.$parent.changeImage("1"); |
| | | // this.radio = null; |
| | | // this.changeLayer("2d"); //添加相机范围限制 |
| | | // this.clearSwitchImagerLayerClick(); |
| | | // Bus.$emit("switchImage"); |
| | | // this.$parent.changeImage("1"); |
| | | // |
| | | Viewer.imageryLayers._layers[1].show = false; |
| | | Viewer.imageryLayers._layers[2].show = false; |
| | | Viewer.imageryLayers._layers[3].show = true; |
| | | break; |
| | | case "二维底图": |
| | | this.changeLayer("2d"); //添加相机范围限制 |
| | | this.clearSwitchImagerLayerClick(); |
| | | if (this.radio == 0) { |
| | | Bus.$emit("heijin2D"); |
| | | } else if (this.radio == 1) { |
| | | Bus.$emit("shenlan2D"); |
| | | } else { |
| | | Bus.$emit("baise2D"); |
| | | } |
| | | // Bus.$emit("switch2D"); |
| | | this.$parent.changeImage("2"); |
| | | Viewer.imageryLayers._layers[1].show = true; |
| | | Viewer.imageryLayers._layers[2].show = true; |
| | | Viewer.imageryLayers._layers[3].show = false; |
| | | // Viewer.imageryLayers.remove(Viewer.imageryLayers._layers[1]) |
| | | // this.changeLayer("2d"); //添加相机范围限制 |
| | | // this.clearSwitchImagerLayerClick(); |
| | | // if (this.radio == 0) { |
| | | // Bus.$emit("heijin2D"); |
| | | // } else if (this.radio == 1) { |
| | | // Bus.$emit("shenlan2D"); |
| | | // } else { |
| | | // Bus.$emit("baise2D"); |
| | | // } |
| | | // // Bus.$emit("switch2D"); |
| | | // this.$parent.changeImage("2"); |
| | | break; |
| | | case "实景模型": |
| | | this.radio = null; |
| | |
| | | |
| | | try { |
| | | if (window.panoramaLayer) window.panoramaLayer.deleteObject(); |
| | | } catch (e) {} |
| | | } catch (e) { } |
| | | if (window.panoramaHandler) window.panoramaHandler.destroy(); |
| | | if (window.panoramaHandler) window.panoramaHandler = undefined; |
| | | }, |