| | |
| | | }) |
| | | }, |
| | | changeData: function (val, type) { //重写数据 |
| | | var that = this; |
| | | var data = [], |
| | | i = 1, |
| | | inits = (d, childData) => { |
| | |
| | | id: d[k].id, |
| | | serviceName: d[k].serviceName, |
| | | alpha: 1, |
| | | // checked: d[k].menuStatus |
| | | checked: d[k].menuStatus |
| | | } |
| | | |
| | | if (d[k].serviceUrl.indexOf('.openrealspace') != -1) { |
| | |
| | | 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++; |
| | |
| | | b[k].children = []; |
| | | b[k].who = 'father'; |
| | | inits(d[k].children, b[k].children) |
| | | } |
| | | } |
| | | } |
| | | |
| | | }; |