简体   繁体   English

铯破坏观众的正确方法

[英]Cesium proper way to destroy viewer

How in Cesium to destroy viewer? 如何在铯中摧毁观众?

I have few points in my viewer.entities and a model. 我的viewer.entities和模型中没有几点。 By user clicking "Hide Cesium viewer" button - I perform 通过用户单击“隐藏铯查看器”按钮-我执行

viewer.entities.removeAll();
viewer.destroy();

But by user clicking "Show Cesium viewer" button - I perform all the same adding points and model. 但是通过用户单击“显示铯查看器”按钮-我执行所有相同的添加点和模型。 And I see points added, but model - not. 而且我看到了要点,但模型却没有。

So I think that i have missed something during destroying. 所以我认为我在破坏期间错过了一些东西。

Thanks to emackey reply. 感谢emackey的回复。 I have created case cesium sandbox , but not reproducing, so just 我创建了case 铯铯箱 ,但未复制,因此

viewer.entities.removeAll();
viewer.destroy();

is fine. 很好

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM