From 263bf9730455a7bcc4fdc6471f8f9d0c96e47c9e Mon Sep 17 00:00:00 2001
From: wangjuncheng <1>
Date: 星期一, 14 七月 2025 16:13:51 +0800
Subject: [PATCH] 添加经纬度高度

---
 src/views/left/KGSimOption/PredictiveSimulation.vue |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/views/left/KGSimOption/PredictiveSimulation.vue b/src/views/left/KGSimOption/PredictiveSimulation.vue
index 045f132..cfa7ca6 100644
--- a/src/views/left/KGSimOption/PredictiveSimulation.vue
+++ b/src/views/left/KGSimOption/PredictiveSimulation.vue
@@ -254,11 +254,11 @@
 // 鎵撳紑淇濆瓨鏂规瀵硅瘽妗�
 const openSaveDialog = async () => {
   // 鍦� setup 鍐呴儴鏇存柊 geom 鐨勫��
+  printDamEntities();
   try {
     forms.geom = props.selectedArea;
     await simStore.addSimCheme(forms);
     // 鎵撳嵃鎷︽尅鍧濇墍闇�瑕佺殑鏁版嵁
-    // printDamEntities();
     resetForm();
     EventBus.emit("close-selectArea");
   } catch (err) {}
@@ -316,9 +316,26 @@
     const entity = entities[i];
 
     if (entity.name && (entity.name === '鏍忔。鍧�1' || entity.name === '鏍忔。鍧�2')) {
+      let position = entity.position?._value;
+
+      // 濡傛灉鏈変綅缃俊鎭紝灏卞皢鍏朵粠绗涘崱灏斿潗鏍囪浆涓虹粡绾害鍜岄珮搴�
+      let cartographic = undefined;
+      if (position) {
+        cartographic = Cesium.Cartographic.fromCartesian(position);
+      }
+
       damDataList.push({
         name: entity.name,
-        position: entity.position?._value,
+        position: position ? {
+          x: position.x,
+          y: position.y,
+          z: position.z
+        } : null,
+        cartographic: cartographic ? {
+          longitude: Cesium.Math.toDegrees(cartographic.longitude), // 缁忓害锛堝害锛�
+          latitude:  Cesium.Math.toDegrees(cartographic.latitude),  // 绾害锛堝害锛�
+          height:    cartographic.height                           // 楂樺害锛堢背锛�
+        } : null,
         heading: entity.heading?._value ?? entity.heading,
         pitch: entity.pitch?._value ?? entity.pitch,
         roll: entity.roll?._value ?? entity.roll,
@@ -326,6 +343,7 @@
       });
     }
   }
+
   if (damDataList.length > 0) {
     console.log("銆愭爮妗e潩瀹炰綋鏁版嵁鍒楄〃銆戯細", damDataList);
     deleteDamEntitiesAfterDelay();

--
Gitblit v1.9.3