Cesium开发遇到的问题解决

发布时间 2023-12-18 20:52:05作者: 太一吾鱼水

问题1:

后台缓存收回进程无法释放上下文[/BUSINESS的缓存的[10]%-请考虑增加缓存的最大大小。

原因:出现该问题是Tomcat启动时,占用的缓存较大,Tomcat默认的缓存是10000KB.
解决:需要调整Tomcat目录下\conf\context.xml文件中的缓存的最大值,需要添加在<Context></Context>标签内,添加项如下
<Resources cachingAllowed="true" cacheMaxSize="8000000" />

参考:https://blog.csdn.net/qq_32744037/article/details/128741417  

问题2:

加载3D Tiles的时候报如下错误:

DeveloperError: Expected width to be greater than 0, actual value was 0 Error

修改:

maximumScreenSpaceError : 32,
skipLevelOfDetail : true,
immediatelyLoadDesiredLevelOfDetail : true

 参考:https://community.cesium.com/t/developererror-expected-width-to-be-greater-than-0-actual-value-was-0-error/6717