# Custom DataSource on Cesium

**URL:** <https://community.cesium.com/t/custom-datasource-on-cesium/4782>\
**Category:** CesiumJS\
**Created:** [November 4, 2016, 2:03pm UTC](https://community.cesium.com/t/custom-datasource-on-cesium/4782 "2016-11-04T14:03:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Hull1](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@Tim\_Hull1](https://community.cesium.com/u/Tim_Hull1)\
**Post date:** [November 4, 2016, 2:03pm UTC](https://community.cesium.com/t/custom-datasource-on-cesium/4782/1 "2016-11-04T14:03:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [November 4, 2016, 2:21pm UTC](https://community.cesium.com/t/custom-datasource-on-cesium/4782/2 "2016-11-04T14:21:00Z")

</div>

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](http://cesiumjs.org/Cesium/Build/Documentation/DataSource.html)

-Hannah

---

<div class="post-metadata">

**Author:** ![Tim\_Hull1](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@Tim\_Hull1](https://community.cesium.com/u/Tim_Hull1)\
**Post date:** [November 8, 2016, 8:05pm UTC](https://community.cesium.com/t/custom-datasource-on-cesium/4782/3 "2016-11-08T20:05:41Z")

</div>

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
