I am using the JavaScript API to check if the view is created for all the layers and based on it I am showing a spinner in my application to indicate the end user that the layer loading is in progress and once the layer are loaded the spinner is stopped.
I am using the whenLayerView method but the internal API which renders the layers image takes time and
I do not have any control to show the application loading state.
Please suggest which method I can use here to have access to an event for displaying a loading state in the browser until the layers image is fetched.
Version - 4.26.0
Reference - https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#whenLayerView