cesium加载KMZ文件本地加载没问题,发布线上后就报错了?

新手上路,请多包涵

有大佬知道是怎么回事吗????感谢!!

Uncaught (in promise) DOMException: Failed to construct 'Worker': Script at 'https://unpkg.com/cesium@latest/Build/Cesium/ThirdParty/Worke...' cannot be accessed from origin 'http://xxxx.com:XXXX'.

at o (https://unpkg.com/cesium@latest/Build/Cesium/Cesium.js:8342:433880)
at uKe (https://unpkg.com/cesium@latest/Build/Cesium/Cesium.js:8342:433595)
at Nk (https://unpkg.com/cesium@latest/Build/Cesium/Cesium.js:8342:433180)
at Fk (https://unpkg.com/cesium@latest/Build/Cesium/Cesium.js:8342:434849)
at p7.getData (https://unpkg.com/cesium@latest/Build/Cesium/Cesium.js:8342:443450)
at async Promise.all (index 0)
阅读 2.2k
1 个回答

不允许创建跨域的 web workers.不要调用CDN的Cesium.js,把它放到本地试试

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题