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
| <template>
| <div
| id="mapView"
| class="mapView"
| >
|
| <div class="coordinate">经度:{{store.state.olLon}} 纬度:{{store.state.olLat }} 级别:{{store.state.olZoom }} </div>
|
| </div>
| </template>
|
| <script lang="ts" setup>
| import { useStore } from "vuex"; // 引入useStore 方法
| const store = useStore(); // 该方法用于返回store 实例
| import olMap from "@/assets/js/Map/olMap";
| import {
| ref,
| onMounted,
| onBeforeUnmount,
| reactive,
| defineProps,
| defineEmits,
| } from "vue";
| onMounted(() => {
|
| });
| </script>
|
| <style lang="less" scoped>
| .mapView {
| width: 100%;
| height: 100%;
| margin: 0;
| padding: 0;
| position: absolute;
| .coordinate {
| left: 153px;
| bottom: 23px;
| padding: 5px 10px;
| background: rgba(7, 8, 14, 0.8);
| z-index: 30;
| box-shadow: inset 0px 2px 10px 2px rgba(38, 47, 71, 1);
| position: absolute;
| font-size: 14px;
| font-family: Source Han Sans CN;
| font-weight: 400;
| color: rgba(214, 228, 255, 0.8);;
| }
| }
| </style>
|
|