I'm working with a map where sometimes the data loads in very slowly (e.g. a whole minute or more sometimes 😵💫). Fixing the performance is a separate question, but in the meantime users would like to see an indicator which tells them whether the map has finished loading/drawing, or if they need to keep waiting.
I am tracking the DrawStatus of the map. But something a bit annoying is that if the location display is visible in the viewpoint, it will send a DrawStatus=InProgress update every time it draws the pulse.
I tried mitigating this by also looking for active web requests (via IHttpMessageInterceptor) and only displaying the loading indicator if both the map is InProgress and it's waiting for a layer http request to complete… but that's not quite right because sometimes after all the requests are complete the draw status still takes many more seconds to be complete.
Then I tried looking for something like a DrawStatus on each layer instead of the whole map. This also would be really useful to know which layers are being the slowest to draw etc as well as being able to separate the 'layers are drawing' status of the map from 'just the location indicator is drawing'. But I couldn't find anything like that - am I overlooking something? I did find LayerViewStateChanged which I thought sounded like what I'd want, but it doesn't have a separate state for 'drawing in progress', only the scale info and whether the load was successful or not. Having a DrawStatus on there too would be a great enhancement.