I have a custom TerrainProvider that grabs terrain data from a local WMS server. It worked fine up to 1.104. I’ve looked at the Change log for 1.104 and cannot find anything that seems to be different in that area.
What happens is as soon as i assign viewer.terrainProvider my custom provider, all imagery and terrain stops loading. I just have a black screen. If I dont assign terrainProvider (or assign it to Cesium WorldTerrain), then map imagery loads fine.
So something in the terrainProvider is blocking the loading of map imagery.
We overhauled how asynchronous behavior was handled in 1.104, and in particular we deprecated the readyPromise property throughout the API.
If your custom terrain provider load any initial metadata, please assign a promise requesting that data to _readyPromise in the constructor. Otherwise, you can set _readyPromise = Promise.resolve(this); in the constructor. This requirement will be removed in 1.107.
Apparently something in Cesium wants to see a ._ready field of the terrain provider.
Its not enough that you define a ready property getter.
this isn’t documented anywhere. Seems like a problem that there is a dependency on something that starts with a _, which usually indicates its a private member.
I am using latest Cesium-1.111 and my old code that used a local Terrainprovider. Also now does not work. How should I be calling this now in my html code.
e.g. currently
var myprovider = new Cesium.CesiumTerrainProvider({
url: new Cesium.Resource({
url: “http://localhost:56750/api/v1/terrain/cesium”,
queryParameters: {
projectUid: “00000000-0000-0000-0000-000000000100”,
filterUid: “3738fc35-dd58-47b1-abda-acdb9598a51d”,
displayMode: ‘1’,
hasLighting: true
},
headers: {
Accept:
‘application/vnd.quantized-mesh;extensions=octvertexnormals,application/octet-stream;q=0.9,!/!;q=0.01’,
}
}),
requestWaterMask: true,
requestVertexNormals: true
});