From b2fdf4f25251229adbe9a6963cb35fb7fc868172 Mon Sep 17 00:00:00 2001
From: surprise <15810472099@163.com>
Date: 星期二, 02 一月 2024 18:29:14 +0800
Subject: [PATCH] GLB模型添加.修改,删除

---
 static/SmartEarthSDK/Workers/TreeTool.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/static/SmartEarthSDK/Workers/TreeTool.js b/static/SmartEarthSDK/Workers/TreeTool.js
index 93a91a1..b58c86d 100644
--- a/static/SmartEarthSDK/Workers/TreeTool.js
+++ b/static/SmartEarthSDK/Workers/TreeTool.js
@@ -9,7 +9,7 @@
     this.sgworld = sgworld
     this.treeData = new Map()
     this.colorTool = sgworld.Core.gradientColor();
-    this.sgwfs = new window.SmartEarth.WFSTool(sgworld._Viewer,Cesium)
+    this.sgwfs = new window.SmartEarth.WFSTool(sgworld._Viewer, Cesium)
 }
 
 /**
@@ -1027,6 +1027,9 @@
     } else {
         layer = this.getData(id);
     }
+    if (!layer) {
+        return
+    }
     if (layer && layer.sourceType === "DynamicSatellite") {
         let obj = (layer.item || layer)
         obj.dtwxzsData.setVisibility(isShow);

--
Gitblit v1.9.3