I am trying to maintain two different ImageryLayerCollections in my program. Use one ImageryLayerCollection to maintain the baselayers created by Cesium’s ImageryProviders, and use another ImageryLayerCollection to maintain the baselayers created by my customized ImageryProviders.
I want to be able to switch back and forth between the two ImageryLayerCollections. Since viewer.scene.imageryLayers is a readonly attribute, I am confusing of how to switch to the ImageryLayerCollection that contains my customized baselayers. Please see the sample code below:
var myImageryLayerCollection = new Cesium.ImageryLayerCollection(); // this is the ImageryLayerCollection to maintain my customized ImageryProviders.
viewer.scene.imageryLayers = myImageryLayerCollection; //Here, I am trying to switch to the newly create ImageryLayerCollection, but this doesn’t work.
Thanks in advance,