AnsweredAssumed Answered

How to tell if an Imagery Layer is drawn in the view in 4.5?

Question asked by alindley on Nov 9, 2017
Latest reply on Nov 9, 2017 by alindley

I am having trouble finding an event to watch for to tell if an imagery layer is drawn/rendered in the view.


I am programmatically updating the definition expression/mosaic rule where clause of an imagery layer to allow the user to toggle individual rasters on/off within an image service that includes 100+ rasters. The toggle works alright, but the toggle on from an off state takes 10+ seconds sometimes, so I want to add a spinner to let the user know the raster is drawing. 


My problem is that I can't figure out what to hook up the 'hide-spinner' event to. I have tried watching the imageryLayer.loaded property, but this becomes true immediately after the toggle is clicked but before the imagery layer actually becomes visible in the view. Similarly, all of the imageryLayer's properties related to its loading (loaded, loadStatus, etc.) fire in the same way. 


I have tried watching the view and layerview's 'updating' property as well, but to no avail.


Any ideas?