From 5853f6c45bbf6a9e4ccfdb1d159826f8948a0457 Mon Sep 17 00:00:00 2001
From: ansel0926 <ansel0926@gmail.com>
Date: 星期一, 16 五月 2022 11:42:23 +0800
Subject: [PATCH] Merge branch 'master' of ssh://117.78.1.188:29418/DDE-WEB

---
 view/project/layerAnalysis.html |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/view/project/layerAnalysis.html b/view/project/layerAnalysis.html
index 8ee58f4..1df3ed5 100644
--- a/view/project/layerAnalysis.html
+++ b/view/project/layerAnalysis.html
@@ -185,21 +185,23 @@
                         }
 
                     }
-                    else if (type == 'DDE') {                    
+                    else if (type == 'DDE') {
                         var lon, lat, alt;
                         lon = obj.data.lon;
                         lat = obj.data.lat;
                         alt = obj.data.altitude;
-                        console.log(lon,lat,alt);
-                        let flyPromise = viewer.camera.flyTo({
-                            duration: 3,
-                            destination: Cesium.Cartesian3.fromDegrees(Number(lon), Number(lat), alt),
-                            orientation: {
-                                heading: Cesium.Math.toRadians(0),                          //缁曞瀭鐩翠簬鍦板績鐨勮酱鏃嬭浆
-                                pitch: Cesium.Math.toRadians(-90),      //缁曠含搴︾嚎鏃嬭浆
-                                roll: Cesium.Math.toRadians(0)                                 //缁曠粡搴︾嚎鏃嬭浆
-                            },
-                        });
+                        console.log(lon, lat, alt);
+                        if (lon != undefined && lat != undefined && alt != undefined) {
+                            let flyPromise = viewer.camera.flyTo({
+                                duration: 3,
+                                destination: Cesium.Cartesian3.fromDegrees(Number(lon), Number(lat), alt),
+                                orientation: {
+                                    heading: Cesium.Math.toRadians(0),                          //缁曞瀭鐩翠簬鍦板績鐨勮酱鏃嬭浆
+                                    pitch: Cesium.Math.toRadians(-90),      //缁曠含搴︾嚎鏃嬭浆
+                                    roll: Cesium.Math.toRadians(0)                                 //缁曠粡搴︾嚎鏃嬭浆
+                                },
+                            });
+                        }
                     }
                 }
                 , oncheck: function (obj) {

--
Gitblit v1.9.1