All,
I have spinner for map using "update-start" and "update-end".
I have dropdown to select the map service to add on map. The spinner works fine if do not switch the dropdown till the spinner stops on map.
If I add/remove layer when map spinner visible then the spinner never stops. because the last event fired was "update-start" and there is no update-end gets fired.
This app is developed using arcgis js api 3.20 and angular2.
Thanks,
yamuna.
Yamuna,
So on your dropdown change event handler make sure you fire the same code/function that gets fired when update-end get fired.
I had this issue, I think there is actually a bug in the JSAPI. If you remove a layer whilst it is updating then it actually breaks the "update-start" and "update-end" events, they stop firing completely. I will try and put a test case together at some point but I found with a slow drawing layer, like an image service, the issue was very prevalent.
Anyway, I had to think of a way around it and this is what I came up with: