Adding Imagery Problem

Hi guys,

I ran the code below correctly in SandCastle, but when I used in my own project, I got errors.

I guess it probably has something to do with cross-origin issue, since Cesium is using XMLHttpRequest.

I tried to ran it with and without “proxy”.

With “proxy”, the error I got is “File not found”.

Without “proxy”, the error I got is the cross-origin retrieving data problem.

The question is how do I resolve this problem?

layers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({

url : '’,

layers : ‘nexrad-n0r’,

credit : ‘Radar data courtesy Iowa Environmental Mesonet’,

parameters : {

transparent : ‘true’,

format : ‘image/png’


proxy : new Cesium.DefaultProxy(’/proxy/’)




Hi Steven,

Is your project using the Jetty web server that comes with Cesium? If not, you’ll need your own proxy service in whatever web server you’re using.


Hi Kevin,

Thanks for reply.

I am using Node.js as the web server. I wanted to see how you guys are rendering the data that is retrieved from imagery provider.

The project I am doing is to visualize data.

For example, I retrieve four JSON files, which are longitude, latitude, time, and the value that corresponding to longitude and latitude, then display them on the globe.

The way I am doing is that I used Extent to draw a lot of geometries on the globe, then used clock.onTick to trigger a function to reset the color of the geometries. The problem with this approach is that it rendered really really slow, so I think maybe I could try with imagery provider. I also considered to convert the JSON files to CZML, but the JSON files are sometimes over gigabytes. The converting cost could be very high.

So what might be a fast way to do this in Cesium?

Thanks again.


在 2014年2月13日星期四UTC-8下午5时51分24秒,Kevin Ring写道: