From 997262e44f7f9e8d0cde869cfd026ef8c0850efd Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 16 Dec 2021 11:18:57 +0800
Subject: [PATCH] 增加弹窗中跳转地图并显示当前建筑弹窗
---
src/components/mobileCortrol/index.vue | 34 +++++++++++++++++++++++++++-------
1 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/src/components/mobileCortrol/index.vue b/src/components/mobileCortrol/index.vue
index 9e6b016..b3a1cbc 100644
--- a/src/components/mobileCortrol/index.vue
+++ b/src/components/mobileCortrol/index.vue
@@ -1,7 +1,8 @@
<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>
@@ -9,12 +10,31 @@
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) => {
@@ -65,11 +85,11 @@
.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;
--
Gitblit v1.9.3