Custom DataSource on Cesium

Hi,

As my Cesium application will have a custom data source, I was looking at the Custom Data Source example. I noticed that the Sandcastle example redefined all the fields that are in Cesium.DataSource - are these all required if you’re creating a custom DataSource, or are some optional?

I noticed that DataSource is not supposed to be instantiated directly, though there is also a CustomDataSource object that does seem intended for this purpose - is there a reason I would want to reimplement everything in my own Object rather than just base things on CustomDataSource (and adding functions that are necessary)?

Tim

Hi Tim,

I believe you will have to have a value for all of the attributes listed in the documentation here: http://cesiumjs.org/Cesium/Build/Documentation/DataSource.html

-Hannah

OK - is that the only way to use a CompositeEntityCollection for data in Cesium? I tried just using a CustomDataSource object and setting entities to a CompositeEntityCollection, and it turns out than entities is read-only…

Tim