An error occurred in “IonImageryProvider“: Failed to obtain image tile X: 0 Y: 0 Level: 0.

Vite+Vue3+Cesium集成时报错,记录一下

界面一直就展示一个蓝色的地球,什么也没有,控制台打印的信息如下

网络请求也是正常的,能够拿到地图的贴图图片

网上搜了很多种解决方案,都试了都没有作用

https://gis.stackexchange.com/questions/166286/cesium-failed-to-obtain-image-tile-x-0-y-0-level-0

https://groups.google.com/g/cesium-dev/c/cyooVWTaEfE

An error occurred in "IonImageryProvider": Failed to obtain image tile X: 0 Y: 1 Level: 1 - CesiumJS - Cesium Community

偶然看到一篇文章,有了新的思路

mockjs 导致cesium地图无法加载 - 掘金

虽然按照该文章的方法尝试了,也没有效果。

不过确实是因为Mock开启导致的,关闭mock以后,地球就能正常展示了。真坑啊~

猜你喜欢

转载自blog.csdn.net/shanshiping/article/details/133036590