我在想做一个分屏联动的效果,点击弹出层弹出分屏,可是我不知道怎么去销毁viewer,执行如下代码
viewer.entities.removeAll();
viewer.destroy();
viewer._element.remove();
viewer= null;
但好像并没有真正的释放内存,多次点击弹窗之后会出现如下错信息,希望能帮帮我
An error occurred while rendering. Rendering has stopped.
undefined
DeveloperError: Expected width to be greater than 0, actual value was 0
Error
at new q (eval at <anonymous> (http://localhost:82/static/cesium/Cesium.js:25:1), <anonymous>:1:11840)
at Function.w.typeOf.number.greaterThan (eval at <anonymous> (http://localhost:82/static/cesium/Cesium.js:25:1), <anonymous>:1:1560675)
at new oa (eval at <anonymous> (http://localhost:82/static/cesium/Cesium.js:25:1), <anonymous>:1:238613)
at Ak.update (eval at <anonymous> (http://localhost:82/static/cesium/Cesium.js:25:1), <anonymous>:1:4629266)
at WJ (eval at <anonymous> (http://localhost:82/static/cesium/Cesium.js:25:1), <anonymous>:1:1346921)
at rq (eval at <anonymous> (http://localhost:82/static/cesium/Cesium.js:25:1), <anonymous>:1:1341073)
at lBa (eval at <anonymous> (http://localhost:82/static/cesium/Cesium.js:25:1), <anonymous>:1:1354860)
at Lv (eval at <anonymous> (http://localhost:82/static/cesium/Cesium.js:25:1), <anonymous>:1:1355105)
at Lb.render (eval at <anonymous> (http://localhost:82/static/cesium/Cesium.js:25:1), <anonymous>:1:4957285)
at Qs.render (eval at <anonymous> (http://localhost:82/static/cesium/Cesium.js:25:1), <anonymous>:1:5354391)