1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
| <template>
| <div class="m-left-control">
| <div class="m-l-inbut zoom-in" @click="zoomIn()">
| <i class="el-icon-refresh"></i>
| </div>
| <div
| class="m-l-inbut zoom-in m-l-inbut-2d"
| :class="{ active: dimension == '2D' }"
| @click="zoomIn('2D')"
| >
| 3D
| </div>
| <div
| class="m-l-inbut zoom-in m-l-inbut-3d"
| :class="{ active: dimension == '2.5D' }"
| @click="zoomIn('2.5D')"
| >
| 2.5
| </div>
| </div>
| </template>
|
| <script>
| import { mapGetters } from "vuex";
| export default {
| name: "mobileCortrol",
| data() {
| return {
| DC: "",
| };
| },
| computed: {
| ...mapGetters(["mviewer", "startPointFn", "dimension"]),
| },
| created() {
| this.DC = global.DC;
| },
| methods: {
| zoomIn(val) {
| // this.$store.dispatch("mapFlyTo", {
| // //飞入
| // lntLat: [115.87988885, 28.72502592, 2100],
| // // lntLat: [115.87186406, 28.74449337, 1200],
| // // lntLat: [121.50492752204283, 31.21567802276832, 2530],
| // heading: 0,
| // pitch: -45,
| // roll: 0,
| // noOpen: true,
| // });
| if (val) {
| if (this.dimension != val) {
| this.$store.dispatch("MSET_DIMENSIONS", val);
| }
| return;
| }
| this.startPointFn();
| },
| },
| };
| </script>
|
| <style scoped lang='scss'>
| @property --color {
| syntax: "<color>";
| inherits: false;
| initial-value: 25%;
| }
| .m-left-control {
| position: fixed;
| left: 20px;
| top: 93px;
| z-index: 20 !important;
| .m-l-inbut {
| width: 35px;
| height: 35px;
| background-color: rgb(33, 150, 243);
| // stroke-width: 10;
| // stroke: #fff;
| display: flex;
| align-items: center;
| justify-content: center;
| color: white;
| font-size: 22px;
| margin-bottom: 12px;
| border-radius: 5px;
| }
| .m-l-inbut-2d {
| position: relative;
| top: 60px;
| font-size: 16px;
| // &:hover {
| // background-color: rgb(21, 136, 230);
| // box-shadow: -2px -2px 3px rgb(3, 74, 136) inset;
| // }
| }
| .m-l-inbut-3d {
| @extend .m-l-inbut-2d;
| top: 55px;
| }
|
| .active {
| // background-color: rgb(92, 181, 255);
| box-shadow: -4px -4px 10px rgb(13, 98, 167) inset;
| // color: rgb(0, 0, 0);
| // box-shadow: -4px -4px 10px rgb(13, 98, 167) inset;
|
| // position: relative;
| // &::before {
| // top: 1px;
| // left: 1px;
| // position: absolute;
| // content: "";
| // width: 100%;
| // height: 100%;
| // box-shadow: -2px -2px 15px rgb(4, 95, 170) inset;
| // // border: 1px solid rgb(14, 54, 87);
| // }
| }
| }
| </style>
|
|