Hello, I recently started using CesiumJS, and it’s great! However, I found that when using the Cesium.ImageryLayer.fromProviderAsync function, you must pass in options, otherwise an error will pop up in the editor (but it runs without errors in the browser). I checked the official tutorials and documentation, and the examples did not pass in an options object during initialization. I’m not sure if this is a new design or an oversight in the documentation.
like:
let options: ImageryLayer.ConstructorOptions = {
alpha: 1.0,
brightness: 0.5,
contrast: 0.8,
};
const viewer = new Viewer("cesiumContainer",{
baseLayer: ImageryLayer.fromProviderAsync(
TileMapServiceImageryProvider.fromUrl(
buildModuleUrl("Assets/Textures/NaturalEarthII"),
),
options
),
baseLayerPicker: false,
});
When I don’t use the options object, an error pops up saying “2 arguments required, but only 1 present”, but the documentation doesn’t indicate that.
Thank you for reading this small issue.