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) } } } };