iserver的三维非插件示范网页打开报错

0 投票
An error occurred while rendering. Rendering has stopped.
SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at file:///D:/SuperMap/GettingStarted/Build/Cesium/Assets/Textures/moonSmall.jpg may not be loaded.
Error: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at file:///D:/SuperMap/GettingStarted/Build/Cesium/Assets/Textures/moonSmall.jpg may not be loaded.
    at new p (eval at <anonymous> (file:///D:/SuperMap/GettingStarted/Build/Cesium/Cesium.js:25:1), <anonymous>:1:743001)
    at I.update (eval at <anonymous> (file:///D:/SuperMap/GettingStarted/Build/Cesium/Cesium.js:25:1), <anonymous>:1:768271)
    at $.update (eval at <anonymous> (file:///D:/SuperMap/GettingStarted/Build/Cesium/Cesium.js:25:1), <anonymous>:1:1962278)
    at f.update (eval at <anonymous> (file:///D:/SuperMap/GettingStarted/Build/Cesium/Cesium.js:25:1), <anonymous>:1:2085175)
    at at (eval at <anonymous> (file:///D:/SuperMap/GettingStarted/Build/Cesium/Cesium.js:25:1), <anonymous>:1:2163675)
    at pt (eval at <anonymous> (file:///D:/SuperMap/GettingStarted/Build/Cesium/Cesium.js:25:1), <anonymous>:1:2170879)
    at Re.(anonymous function).(anonymous function) [as render] (eval at <anonymous> (file:///D:/SuperMap/GettingStarted/Build/Cesium/Cesium.js:25:1), <anonymous>:1:2184620)
    at P.render (eval at <anonymous> (file:///D:/SuperMap/GettingStarted/Build/Cesium/Cesium.js:25:1), <anonymous>:1:2702063)
    at t (eval at <anonymous> (file:///D:/SuperMap/GettingStarted/Build/Cesium/Cesium.js:25:1), <anonymous>:1:2695450)
6月 2, 2017 分类:  347次浏览 | 用户: I'm hp (1 分)

1个回答

0 投票
您好,WebGL客户端的页面,不能直接双击文件打开,要以服务的形式浏览才能正常显示。比如放Tomcat的webapp下,或者通过HBuilder等编译软件运行。
6月 2, 2017 用户: 邹涛 名扬四海 (3,389 分)
...