Ceisum 问题总结

1. 错误:VM5729:1 Blocked script execution in ‘about:blank’ because the document’s frame is sandboxed and the ‘allow-scripts’ permission is not set.

原因是:在“about:blank”中阻止脚本执行,因为文档的框架已被沙盒化并且未设置“allow-scripts”权限。这个错误提示是Cesium不识别js,沙箱iframe不允许使用js。

第一种:禁用infobox。

const viewer = new Viewer('cesiumContainer', {
   
  infoBox: false, // If set to false, the InfoBox widget will not be created.
});

第二种:设置沙箱的权限。

var iframe = document.getElementsByClassName(‘cesium-infoBox-iframe’)[0];
iframe.setAttribute(‘sandbox’, ‘allow-same-origin allow-scripts allow-popups allow-forms’);
iframe.setAttribute(‘src’, ‘’); //必须设置src为空 否则不会生效。


2. 引入SuperMap iClient3D for Cesium

保证不引入其他的cesium框架
以及vite配置的相关cesium 插件不能使用

相关推荐

  1. Ceisum 问题总结

    2023-12-07 15:14:02       38 阅读
  2. cesium 之小问题大学问记录

    2023-12-07 15:14:02       49 阅读
  3. Redisson出现问题总结

    2023-12-07 15:14:02       40 阅读
  4. 股票问题总结

    2023-12-07 15:14:02       39 阅读
  5. 疑惑问题总结

    2023-12-07 15:14:02       35 阅读
  6. 跨域问题总结

    2023-12-07 15:14:02       23 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-07 15:14:02       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-07 15:14:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-07 15:14:02       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-07 15:14:02       20 阅读

热门阅读

  1. oracle分组排序后取第一条

    2023-12-07 15:14:02       36 阅读
  2. 大模型训练的过程(通俗易懂)

    2023-12-07 15:14:02       32 阅读
  3. 基于深度学习的热红外图像超分辨率

    2023-12-07 15:14:02       36 阅读
  4. [AI]大模型稳定角色扮演形成“自我认知”

    2023-12-07 15:14:02       36 阅读
  5. 将 .NET Aspire 部署到 Kubernetes 集群

    2023-12-07 15:14:02       35 阅读
  6. git rebase与git merge 区别 使用场景

    2023-12-07 15:14:02       31 阅读
  7. 车联网安全相关标准汇总

    2023-12-07 15:14:02       29 阅读