AnsweredAssumed Answered

Is it possible to listen for map updates?

Question asked by sl5337 on Feb 5, 2017
Latest reply on Feb 7, 2017 by jgrayson-esristaff

In the 3.1x version of the Javascript API I could attach listeners to the 'update-start' and 'update-end' events of the Map. This was extremely useful for showing and hiding a "loading" indicator so that the user was not sitting there wondering if anything was going on while a large map layer was being rendered.

 

It looks like this was taken away in the 4.x version. I have tried using some of the events that are described in the "watch for changes" sample but I cannot achieve the same functionality with these. You can see what I mean by running that sample. You will see that all of the events complete before the map is visually updated. With this sample, the difference is minimal but I have layers that may take several seconds to load even after all of these events have completed.

 

The 'update-start' and 'update-end' events of the Map component in 3.1x worked nicely for this. Is there anything similar in the 4.x version? I know the answer. Had to ask anyway.

Outcomes