How to render terrain with Custom TerrainProvider?

1. A concise explanation of the problem you’re experiencing.

Hi, Everyone.

I have a DEM data for a small area. Of course, It does not cover entire world.

I have uploaded it to Cesium Ion.

Next, I am going to use it as TerrainProvider in Cesium Js. But I can not see anything. What is wrong?

Should my DEM data contain entire earth?

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

Cesium.Ion.defaultAccessToken = ‘eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlYTIzNzQ4NS1iN2ZmLTQ3ZWQtYjU0OS1mZWI4Nzk0MjcwNDAiLCJpZCI6OTc4Niwic2NvcGVzIjpbImFzciIsImdjIl0sImlhdCI6MTU1NDkxODE3NH0.UUQf2vuc3PN3VPNSUYt5uAbrSv5irvkIe-A57Ocp6ow’;

var viewer = new Cesium.Viewer(‘cesiumContainer’,{

terrainProvider : new Cesium.CesiumTerrainProvider({

url: Cesium.IonResource.fromAssetId(43241)

})

});

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

4. The Cesium version you’re using, your operating system and browser.

This asset seems to be loading correctly for me. Can you see it loading in your Cesium ion dashboard? It should outline exactly where your terrain is there. It need not cover the entire globe. You can fuse your DEM with the Cesium World Terrain (you just have to select it when uploading).

If you’re still not seeing it, can you check if your browser console or network tab have any errors?