影像图层切得格式是webp类型,设置的背景色是白色,前端用代码直接处理容差变成透明色
const imageryProvider = new Cesium.SuperMapImageryProvider(
{
url:'iserver/services/url',name: `影像`,
}
)
const layer = imageryLayers.addImageryProvider(imageryProvider, i)
layer.show = config.show
layer.alpha = config.alpha
layer.transparentBackColor = Cesium.Color.fromCssColorString('#ffffff')
layer.transparentBackColorTolerance = 0.1w
文档参考:
ImageryLayer - Cesium Documentation
处理之后,白色背景变成透明色