-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
Description
What happened?
The TypeScript type for the terrainProvider property on the viewer, scene, and globe instances all indicates that it is a TerrainProvider, however in some cases it is undefined, as terrain appears to be loaded asynchronously and the property is set to undefined during this time. This can cause runtime errors if we believe the type that it is never undefined.
Reproduction steps
- Mount a Cesium viewer with terrain specified
- Log
viewer.scene.terrainProvider
Sandcastle example
Environment
Browser: Chrome
CesiumJS Version: 1.136.0
Operating System: Linux/Fedora 43