月球大数据地理空间分析展示平台-【前端】-月球2期前端
Surpriseplus
2023-09-05 8b8f88d7d8d713a1355d9849f467e3a2dc0c22fe
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(() => {
  olMap.initMap();
});
</script>
 
<style  lang="less" scoped>
.mapView {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  position: absolute;
  .coordinate {
    bottom: 1%;
    left: 1%;
    padding: 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: 16px;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #ffffff;
  }
}
</style>