I saw a few, similar threads from a few years back that went unanswered so want to see if there's a solution now.
https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-basemap-not-working/m-p/619...
I am trying to capture when a mapview's default basemap fails to load. If that happens I want to switch to a backup. Right now if the default basemap is down the whole application crashes.
I tried this but nothing is caught. In fact the 'when' never got run when the first basemap fails to load.
this.view.when( ).catch()
This does not work for basemaps.
this.view.on("layerview-create-error", function(event) {
console.error("LayerView failed to create for layer with the id: ", event.layer.id);
});
Is there anything else that I can try?