In many Cesium sandbox examples such as this one a CZML file is loaded in its entirety. Is there any way to loop through the elements in the CZML file and load them individually?
My aim is to add a checkbox for each element so I can enable/disable them at will
Currently the code that loads the data works as follows however nothing is loaded:
for(let i = 0; i <entireDataSource.entities.length; i++){
var seriesName = entireDataSource.entities[i].id;
var newLi = document.createElement('li');
var newInput = document.createElement('input');
newInput.setAttribute('type', 'checkbox');
newInput.setAttribute('id', seriesName);
newLi.appendChild(newInput);
newLi.appendChild(document.createTextNode(seriesName));
checkboxList.appendChild(newLi);}
I have tried creating the checkboxes with no data and just filing them with a incremental number and that worked, so it is the data failing to load that is causing the issue.
Any idea why nothing is loaded?
Additionally - is there anyway to print info to the sandcastle console for debugging purposes?