Adding Imagery Event Listener Problem

Hi all,

I am trying to understand how cesium renders the data that retrieved from online resources using imagery layer.

I got lost at ImageryLayerCollection.js, I saw that four events(layerAdded, layerRemoved, layerMoved, layerShownOrHidden) are created. I could not find the place where event listeners are attached to those events.

Thanks,

Steven

Steven,

Most of the logic for rendering terrain and imagery is found (or least starts) in CentralBodySurface:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/CentralBodySurface.js#L130

It’s not simple. What do you want to know about it?

Kevin

Hi Kevin,

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 event to trigger a function to reset the color of the geometries to make an animation effect. 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.

Steven

在 2014年2月14日星期五UTC-8上午7时53分58秒,Kevin Ring写道:

Steven,

If you’re trying to visualize files in the gigabytes, you really have no choice but to use some kind of level-of-detail (LOD) technique, so that the client can access and use just the relevant portion of that dataset for a given camera view.

Cesium doesn’t currently have support for LOD rendering of vector data (some day!), but if you can turn your vector data into a raster layer (perhaps using GeoServer or ArcGIS Server), you can easily render that in Cesium as an imagery layer. You would use WebMapServiceImageryProvider for GeoServer and ArcGisMapServerImageryProvider for ArcGIS Server.

Kevin