I just saw that Cesium.Viewer.ConstructorOptions.imageryProvider is marked deprecated here: Viewer - Cesium Documentation
Why is this, and what are the options to use instead?
Note: for various reasons I don’t want the BaseLayerPicker to display, I have my own implementation to select map layers.
You can find the API changes in the change log and the reasoning behind this in an appropriate pull request
As for the question about options, something like the following works for me:
new Cesium.Viewer("cesium", {
...
baseLayer: Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(2, {}), {})
...
}
1 Like