-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Take the below code:
var viewer = new Cesium.Viewer("cesiumContainer");
var resource = new Cesium.Resource("../../SampleData/simple.czml");
resource.head().then(function () {
return viewer.dataSources.add(Cesium.CzmlDataSource.load(resource));
});
If you comment out the resource.head()
line, it works as expected but obviously you are now losing the head call. Basically, it looks like resources used to be re-usable, but since #8843, they can only ever be used once specifically this line in the PR here: https://github.com/CesiumGS/cesium/pull/8883/files#r470300910
Perhaps something is not being re-initialized on the second call? It can't be a race condition because we wait for the head call to finish before calling load. If I make two identical resources, it works.