liuyg
2021-06-23 70d097137d08bf1a79943fb44b7086b4d45aac75
widgets/LeftNavigationBar/Widget.js
@@ -377,6 +377,7 @@
                                        obj.data.children.forEach(item => {
                                            Cesium.when(that[item.id], function (layer) {
                                                topic.publish('removeTilt', 'Layermanagement', item);
                                                topic.publish('removeTiltS', 'Layermanagement', item);
                                                topic.publish('removeLayersLegends', 'legends', item);
                                                that.map.scene.layers.remove(layer[0].name)
                                            })
@@ -388,6 +389,7 @@
                                                autoSetView: false //不自动定位
                                            });
                                            topic.publish('appendTilt', 'Layermanagement', item);
                                            topic.publish('appendTiltS', 'Layermanagement', item);
                                            topic.publish('addLayersLegends', 'legends', item);
                                            //定位到场景
                                            Cesium.loadJson(host + partOfUrl + '/scenes.json').then(function (scenes) {
@@ -430,6 +432,7 @@
                                                    });
                                                });
                                                topic.publish('appendItem', 'Layermanagement', item, that[item.id]);
                                                topic.publish('appendItemS', 'Layermanagement', item, that[item.id]);
                                                topic.publish('addLayersLegends', 'legends', item);
                                            } else {
                                                $.ajax({
@@ -443,6 +446,7 @@
                                                            url: res[0].path,
                                                        }));
                                                        topic.publish('appendItem', 'Layermanagement', item, that[item.id]);
                                                        topic.publish('appendItemS', 'Layermanagement', item, that[item.id]);
                                                        topic.publish('addLayersLegends', 'legends', item);
                                                        that[item.id].alpha = item.alpha;
                                                        that[item.id].getViewableRectangle().then(function (rectangle) {
@@ -468,6 +472,7 @@
                                        obj.data.children.forEach(item => {
                                            Cesium.when(that[item.id], function (layer) {
                                                topic.publish('removeTilt', 'Layermanagement', item);
                                                topic.publish('removeTiltS', 'Layermanagement', item);
                                                topic.publish('removeLayersLegends', 'legends', item);
                                                that.map.scene.layers.remove(layer[0].name)
                                            })
@@ -476,6 +481,7 @@
                                        obj.data.children.forEach(item => {
                                            if (that[item.id]) {
                                                topic.publish('removeItem', 'Layermanagement', item);
                                                topic.publish('removeItemS', 'Layermanagement', item);
                                                topic.publish('removeLayersLegends', 'legends', item);
                                                that[item.id].show = false;
                                            }
@@ -494,6 +500,7 @@
                                    if (obj.data.model) {
                                        Cesium.when(that[obj.data.id], function (layer) {
                                            topic.publish('removeTilt', 'Layermanagement', obj.data);
                                            topic.publish('removeTiltS', 'Layermanagement', obj.data);
                                            topic.publish('removeLayersLegends', 'legends', obj.data);
                                            that.map.scene.layers.remove(layer[0].name)
                                        })
@@ -508,6 +515,7 @@
                                            autoSetView: false //不自动定位
                                        });
                                        topic.publish('appendTilt', 'Layermanagement', obj.data);
                                        topic.publish('appendTiltS', 'Layermanagement', obj.data);
                                        topic.publish('addLayersLegends', 'legends', obj.data);
                                        //定位到场景
                                        Cesium.loadJson(host + partOfUrl + '/scenes.json').then(function (scenes) {
@@ -545,6 +553,7 @@
                                                });
                                            });
                                            topic.publish('appendItem', 'Layermanagement', obj.data, that[obj.data.id]);
                                            topic.publish('appendItemS', 'Layermanagement', obj.data, that[obj.data.id]);
                                            topic.publish('addLayersLegends', 'legends', obj.data);
                                        } else {
                                            $.ajax({
@@ -559,6 +568,7 @@
                                                    }));
                                                    topic.publish('appendItem', 'Layermanagement', obj.data, that[obj.data.id]);
                                                    topic.publish('appendItemS', 'Layermanagement', obj.data, that[obj.data.id]);
                                                    topic.publish('addLayersLegends', 'legends', obj.data);
                                                    that[obj.data.id].alpha = obj.data.alpha
@@ -583,6 +593,7 @@
                                        Cesium.when(that[obj.data.id], function (layer) {
                                            topic.publish('removeTilt', 'Layermanagement', obj.data);
                                            topic.publish('removeTiltS', 'Layermanagement', obj.data);
                                            topic.publish('removeLayersLegends', 'legends', obj.data);
                                            that.map.scene.layers.remove(layer[0].name)
                                        })
@@ -591,6 +602,7 @@
                                        if (that[obj.data.id]) {
                                            topic.publish('removeItem', 'Layermanagement', obj.data);
                                            topic.publish('removeItemS', 'Layermanagement', obj.data);
                                            topic.publish('removeLayersLegends', 'legends', obj.data);
                                            that[obj.data.id].show = false;
                                        }