Currently when the layer is not loaded because of any kind of error, it is not shown in layerTree. I would like it to be shown in layerTree with error indicator - red styled text or some warning icon.
I already tried to listen on layerview-create-error and then set listMode manually but it does not help.
layer.on('layerview-create-error', function(error: any) {
layer.listMode = "show";
});
The layer itself is stored with map.layers collection so the LayerList widget must be filtering it out by some attribute. I cannot change loadStatus or loaded attributes as it will break other things with not loaded layer.
Solved! Go to Solution.
Hi @patryks ,
There is a property on the LayerList widget named visibleElements where you can enable displaying error messages. You can see it enabled in this codepen. We are currently working on improving the error handling and the messages provided, but hopefully this helps.
const layerList = new LayerList({
view,
visibleElements: {
errors: true
}
});
Hi @patryks ,
There is a property on the LayerList widget named visibleElements where you can enable displaying error messages. You can see it enabled in this codepen. We are currently working on improving the error handling and the messages provided, but hopefully this helps.
const layerList = new LayerList({
view,
visibleElements: {
errors: true
}
});