I’m using the last version of Cesium - Cesium-1.108. I also create terrain myself using Cesium Terrain Builder. As a result of build stage I get data attached to the topic
data.zip (41.0 KB)
It contains all the necessary files, I guess - I see layer.json file there and I see zipped terrain-files. I serve this data using nginx and if I investigate headers, I see that terrain files are returned with these headers: Content-Encoding: gzip
and Content-Type: application/octet-stream
. So, everything is totally correct - all files are present, all needed headers are also present. And this how my code looks like:
const viewer = new Cesium.Viewer("cesiumContainer", {
terrainProvider: await Cesium.CesiumTerrainProvider.fromUrl(`/files/terrain/ee38fd54-4dbb-4dd7-b10e-270475bc5707`, {
//requestVertexNormals: requestNormals,
//requestWaterMask: requestWaterMask,
}),
//terrain: Cesium.Terrain.fromWorldTerrain(),
selectionIndicator: false,
homeButton: false,
sceneModePicker: false,
timeline: false,
animation: false,
geocoder: false,
navigationHelpButton: false
});
viewer.camera.flyTo({
destination: Cesium.Cartesian3.fromDegrees(43.970149521784, 54.5302799, 400),
orientation: {
heading: Cesium.Math.toRadians(0.0),
pitch: Cesium.Math.toRadians(-15.0),
}
});
So, this error can be easily reproduced. What is wrong with that and how can we fix it?
Actually, I made a public endpoint and this very data can be accessed from here . And this is the page with the example. So, you may try it and check it yourself. It is minimized and reproducible.
Many thanks in advance!