It is unclear how to use a composite entity collection. Our purpose is to be able to quickly add/remove groups of entities (we have over 10,000 across the entire globe)

here is a code sample:

createCustomDataSource: function() {

    var scope = this;


    scope.viewer = this.getCmp()._cesium;


    //create datasource

    scope._CoTDataSource = new Cesium.CustomDataSource();

    //add data source


    //create composite entity collection

    scope.collections = new Cesium.CompositeEntityCollection();

    scope._CoTDataSource.entityCollections = scope.collections;

    scope.defaultCollection = new Cesium.EntityCollection();



    scope.viewer.clock.onTick.addEventListener(function() {





I’m not sure what your exact use case is, but if you’re just trying to show/hide groups of entities, you could use a parent entity for each group. See this example:

CustomDataSource does not have an entityCollections property. It has an entities property to get the EntityCollection, but that is read only.

In order to have CustomDataSource use a CompositeEntityCollection, you will have to make changes to the code:



That is a perfect solution! Thanks