Select to view content in your preferred language

How to check if ImageryLayer is loaded

666
0
02-18-2021 05:31 AM
Gianna_BBSRC
Regular Contributor

Hi there,

I have a multidimensional mosaic dataset with nearly 3,500 rasters hosted on a server. I've built an interface to visualize these rasters one by one with a slider and dropdown selector. See codepen (relevant code starting at line 336).

The problem is that when you click on the Play button to advance the slider, the data is sometimes not loaded before it advances to the next year. I'd like to wait for the time slice to load before advancing the slider. I've been experimenting with imageryLayer.loaded but this only checks if the whole layer is loaded (which it pretty much always is) and not the right time slice.

Is there a way to check the state change or that a fetch has finished loading for each particular time slice?

Appreciate any suggestions.

 

0 Kudos
0 Replies