Hi,
I have a question regarding ImageryLayer. It can take awhile to load the Image and I want to remove the spinner when it is done updating. I found this relevant post Solved: How to tell if an Imagery Layer is drawn in the vi... - Esri Community but it doesn't seem to solve my problem. The spinner cuts off before the image is loaded on the map. Any help for ideas on how to get this to work would be appreciated thank you!
Hi there,
Please check out this sample as it shows what you are trying to achieve: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=client-projection
The following is the code and it waits until layer's layerView.updating becomes false when the app loads first. The LayerView.updating becomes false once it finishes updating.
view.whenLayerView(countriesLayer).then((layerView) => {
watchUtils.whenFalseOnce(layerView, "updating", () => {
// enable the projection dropdown
wkidSelect.disabled = false;
calciteLoader.removeAttribute("active");
});
});