From c954cdb51f93585b58b761c2663688c36e6b044f Mon Sep 17 00:00:00 2001 From: jihongshun <1151753686@qq.com> Date: 星期五, 15 八月 2025 17:13:54 +0800 Subject: [PATCH] 创建航线新增全局配置 --- src/utils/components/init-map.vue | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/src/utils/components/init-map.vue b/src/utils/components/init-map.vue index 9c67e89..09fcf3b 100644 --- a/src/utils/components/init-map.vue +++ b/src/utils/components/init-map.vue @@ -180,6 +180,7 @@ cameraT:0.0, pointGround: { lon: 0, lat: 0, height: 0 }, pointFly: { lon: 0, lat: 0, height: 0 }, + rowData:null } }, mounted(){ @@ -322,6 +323,7 @@ creatPin(id, position, font, color, viewer) { let pinBuilder = new Cesium.PinBuilder(); let addPin = viewer.entities.getById(id); + console.log(addPin) if (addPin == undefined) { viewer.entities.add({ id: id, @@ -617,6 +619,13 @@ const gure = Cesium.Cartesian3.distance(point1, point2) this.betweenDistance = gure } + if(this.rowData) { + this.pointGround = { + lon:this.rowData.longitude, + lat:this.rowData.latitude, + height:this.rowData.height + } + } this.pointFly = { lon: lon, lat: lat, @@ -820,7 +829,9 @@ label: `绌轰腑鐐�${idx}`, longitude: Cesium.Math.toDegrees(aerialPos.longitude), latitude: Cesium.Math.toDegrees(aerialPos.latitude), - height: aerialPos.height + height: aerialPos.height, + heading:Cesium.Math.toDegrees(viewerC.camera.heading), + pitch:Cesium.Math.toDegrees(viewerC.camera.pitch) } ] }; @@ -1139,6 +1150,18 @@ return Math.asin(directionLocal.z); // z杞村悜涓� }, DealVisualCone(data,node){ + this.rowData = data + console.log(data) + this.pointGround = { + lon:data.children[0].longitude, + lat:data.children[0].latitude, + height:data.children[0].height + } + this.pointFly = { + lon:data.longitude, + lat:data.latitude, + height:data.height + } if(data.children && data.children?.length > 0) { preVideoScopePrimitiveArrTie.map((item)=>{ if(item.name != data.children[0].label){ -- Gitblit v1.9.3