北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
AdaKing88
2023-10-20 eae888a841f55514f6e507ea5ae5c45effdc92e8
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
<template>
  <div class="directionPanel">
    <div class="mapTool">
      <el-button class="tool-trueNorth" @click="trueNorth" title="正北">
        <img src="@/assets/img/title/zbz.png" />
      </el-button>
    </div>
  </div>
</template>
 
<script>
export default {
  name: "DirectionPanel",
  data() {
    return {};
  },
  methods: {
    trueNorth() {
      sgworld.Navigate.flyToPointsInterest({
        destination: Viewer.camera.position,
        orientation: {
          heading: 0,
          pitch: Viewer.camera.pitch,
          roll: 0,
        },
      });
    },
  },
};
</script>
 
<style scoped>
.directionPanel {
  position: absolute;
  top: 0.55rem;
  left: 0.15rem;
}
 
.mapTool .el-button {
  padding: 0 !important;
  font-size: 0.24rem;
  border: unset;
  float: unset;
  display: block;
  background: rgba(18, 126, 255, 1);
}
.mapTool img {
  width: 24px;
  margin: 3px;
  /* height: 22px; */
}
</style>