| | |
| | | <template> |
| | | <div class="m-left-control"> |
| | | <div class="m-l-inbut zoom-in">+</div> |
| | | <div class="m-l-inbut" @click="zoomIn('-')">-</div> |
| | | <div class="m-l-inbut zoom-in" @click="zoomIn"> |
| | | <i class="el-icon-refresh"></i> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | name: "mobileCortrol", |
| | | data() { |
| | | return { |
| | | DC: "", |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["mviewer"]), |
| | | }, |
| | | created() { |
| | | this.DC = global.DC; |
| | | }, |
| | | methods: { |
| | | zoomIn(val) { |
| | | console.log(val); |
| | | let that = this; |
| | | // console.log(val); |
| | | // 121.49592752204283 31.23567802276832 |
| | | this.mviewer.zoomToPosition( |
| | | new that.DC.Position( |
| | | 121.49592752204283, |
| | | 31.23567802276832 - 0.012, |
| | | 2530, |
| | | 0, |
| | | -45 |
| | | ) |
| | | ); |
| | | // let camera = this.mviewer.camera; |
| | | // // console.log(camera.moveStart()); |
| | | // // this.mviewer.getImageryLayerInfo().then((res) => { |
| | |
| | | .m-left-control { |
| | | position: fixed; |
| | | left: 20px; |
| | | top: 20px; |
| | | z-index: 200; |
| | | top: 87px; |
| | | z-index: 201 !important; |
| | | .m-l-inbut { |
| | | width: 32px; |
| | | height: 32px; |
| | | width: 35px; |
| | | height: 35px; |
| | | background-color: #c9302c; |
| | | display: flex; |
| | | align-items: center; |