From 4509dd489115a499a0f63487ec90adfdc7a5cd56 Mon Sep 17 00:00:00 2001 From: lixuliang <lixuliang_hd@126.com> Date: 星期五, 20 十月 2023 11:09:35 +0800 Subject: [PATCH] 最新版本 --- src/components/right/right-top.vue | 32 +++++++++++++++++++++++++++----- 1 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/components/right/right-top.vue b/src/components/right/right-top.vue index 4c6ce8e..f8ea5a6 100644 --- a/src/components/right/right-top.vue +++ b/src/components/right/right-top.vue @@ -224,7 +224,8 @@ </div> <!-- 鍒嗗眰鍒嗘埛鎸夐挳 --> <div class="fcfhBox" v-if="isShowFCFH"> - <button + <FCFH /> + <!-- <button id="btn1" class="layui-btn" :class="{ fcfhactive: fcfhopen }" @@ -240,7 +241,7 @@ > 鍏抽棴鎷惧彇 </button> - <span class="closeBtn" @click="closefcfhBox">脳</span> + <span class="closeBtn" @click="closefcfhBox">脳</span> --> </div> </div> </template> @@ -682,10 +683,11 @@ import { mapState, mapMutations } from "vuex"; import Bus from "../tools/Bus"; import { queryBySquare } from "@/utils/request"; +import FCFH from "@/components/right/FCFH"; //浜ら�氬浘灞� let trafficLayer, panoramaLayer; - +let flyPoint; export default { components: { location, @@ -698,6 +700,7 @@ leftztfx, lefttx, Layer, + FCFH, }, name: "right-top", data() { @@ -793,9 +796,10 @@ this.kuangxuan(); }); Bus.$on("ShowFCFH", (data) => { - if (data) { - this.isShowFCFH = true; + if (this.isShowFCFH == data) { + return; } + this.isShowFCFH = data; }); }, destroyed() { @@ -807,6 +811,7 @@ }, methods: { ...mapMutations(["setViewer1Show", "setYqfk"]), + /*鍒嗗眰鍒嗘埛*/ fcfhpick(open) { if (open) { this.fcfhopen = true; @@ -867,6 +872,9 @@ } }, closePOIbox() { + flyPoint && Viewer.entities.remove(flyPoint); + flyPoint = undefined; + this.isShowDetail = false; this.showRangeBox = false; this.pointInfo = {}; @@ -1338,6 +1346,7 @@ this.isShowDetail = false; }, flyToPOI(item) { + flyPoint && Viewer.entities.remove(flyPoint); sgworld.Navigate.flyToPointsInterest({ destination: Cesium.Cartesian3.fromDegrees( item.geometry.coordinates[0], @@ -1351,6 +1360,19 @@ }, duration: 3, }); + flyPoint = Viewer.entities.add({ + position: Cesium.Cartesian3.fromDegrees( + parseFloat(item.geometry.coordinates[0]), + parseFloat(item.geometry.coordinates[1]) + ), + billboard: { + verticalOrigin: Cesium.VerticalOrigin.BOTTOM, + scale: 1, + image: window.SmartEarthRootUrl + "Workers/image/mark.png", + heightReference: 1, + disableDepthTestDistance: Number.POSITIVE_INFINITY, + }, + }); }, }, watch: { -- Gitblit v1.9.3