From f04efcae7635378aed3bca570322a38cae97d722 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 11 Jun 2021 16:43:57 +0800
Subject: [PATCH] 搜索弹窗 表格
---
widgets/LeftNavigationBar/Widget.js | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/widgets/LeftNavigationBar/Widget.js b/widgets/LeftNavigationBar/Widget.js
index de6441b..c9ef115 100644
--- a/widgets/LeftNavigationBar/Widget.js
+++ b/widgets/LeftNavigationBar/Widget.js
@@ -198,6 +198,7 @@
})
},
changeData: function (val, type) { //重写数据
+ var that = this;
var data = [],
i = 1,
inits = (d, childData) => {
@@ -227,6 +228,21 @@
a.model = true
}
+ if (a.model) {
+
+ if (that[a.id]) {
+ Cesium.when(that[a.id], function (layer) {
+ that.map.scene.layers.remove(layer[0].name)
+ })
+ }
+
+ } else {
+
+ if (that[a.id]) {
+ that.map.imageryLayers.remove(that[a.id]);
+ }
+
+ }
b.push(a);
i++;
@@ -234,7 +250,7 @@
b[k].children = [];
b[k].who = 'father';
inits(d[k].children, b[k].children)
- }
+ }
}
};
@@ -444,6 +460,7 @@
//添加S3M图层服务
that[obj.data.id] = scene.open(host + partOfUrl);
//定位到场景
+
Cesium.loadJson(host + partOfUrl + '/scenes.json').then(function (scenes) {
// var sname = scenes[0].name;
// Cesium.loadJson(host + partOfUrl + '/scenes/' + sname + '.json').then(function (jsonData) {
--
Gitblit v1.9.3