angular.min.js:101 Error: id is required.
Error
at new t (eval at <anonymous> (Cesium.js:25), <anonymous>:1:3391)
at v.getById (eval at <anonymous> (Cesium.js:25), <anonymous>:1:1331390)
at ae._dataSourceRemoved (eval at <anonymous> (Cesium.js:25), <anonymous>:1:3941067)
at i.raiseEvent (eval at <anonymous> (Cesium.js:25), <anonymous>:1:422126)
at s.remove (eval at <anonymous> (Cesium.js:25), <anonymous>:1:1573762)
at removeLineResult (HomePageCtrl.js:1545)
at k.$scope.clearAll (HomePageCtrl.js:815)
代码如下:
var dataSources = viewer.dataSources;
for (var i = 0; i < viewer.dataSources.length; i++) {
if (viewer.dataSources.get(i).name.indexOf("dz")!= -1) {
viewer.dataSources.remove(viewer.dataSources.get(i));
i--;
}
}