I struggle to load my czml file without copying its content inside my JS script in Cesium. I would like to load the file using its url but I don't manage to do it.
var czml = "test_trace.czml";
var viewer = new Cesium.Viewer("cesiumContainer", {terrainProvider: Cesium.createWorldTerrain(), baseLayerPicker: false, shouldAnimate: true,});
viewer.dataSources.add(Cesium.CzmlDataSource.load(czml)).then(function (ds) {
viewer.trackedEntity = ds.entities.getById("path");
});
where czml is not the content of the file but the file itself. Any idea ?
Thanks a lot