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
| <template>
| <div class="announcement">
| <div class="locationInfo" @click="locationClick">{{ location }}</div>
|
| <div class="msgInfo">
| {{ message }}<span>{{ messageValue }}</span>
| </div>
| </div>
| </template>
|
| <script>
| export default {
| name: "Announcement",
| components: {},
| data() {
| return {
| location: cityData.listData[0] || "孙胡沟",
| message: "面积:",
| messageValue: "14.2Km²",
| isShow: false,
| }
| },
| methods: {
| locationClick() {
| const locationView = {
| destination: {
| x: -2173407.709230334,
| y: 4337661.888273838,
| z: 4130016.2266130922,
| },
| orientation: {
| pitch: -0.5720213897553128,
| roll: 0.00020844705333455948,
| heading: 3.4925507199853483,
| },
| }
| viewer.scene.camera.flyTo(locationView)
| return
| this.isShow = !this.isShow
| let desc = null
| if (defaultCity === "北京市") {
| desc = { func_name: "HiddenFronTag", Name: "channel", visibility: this.isShow }
| ps.emitMessage(desc)
| }
| let view = {
| func_name: "FlyTo",
| vectorType: "WGS84",
| x: "104.945716",
| y: "32.914062",
| z: "1537.00582",
| yaw: "-48.473782",
| pitch: "-62.876274",
| distance: "20625.462523",
| PlayRate: "5",
| Name: "孙湖沟",
| }
| ps.emitMessage(view)
| },
| },
| }
| </script>
| <style lang="less" scoped>
| .announcement {
| background: url("@/assets/img/tools/announcementbg.png");
| width: 599px;
| height: 40px;
| }
|
| .locationInfo {
| font-size: 18px;
| font-weight: 700;
| color: #fff;
| line-height: 40px;
| margin-left: 50px;
| width: 320px;
| text-align: center;
| float: left;
| cursor: pointer;
| }
|
| .msgInfo {
| float: left;
| font-size: 18px;
| font-weight: 700;
| color: #fff;
| line-height: 40px;
| margin-left: 50px;
| width: 165px;
| text-align: center;
| }
| .msgInfo span {
| color: #ffff00;
| }
| </style>
|
|