I have a data viewer with a few drop downs and buttons that perform different queries (depending on what is selected in the drop down menus) when the search button is clicked. I am looking to add a progress bar, spinner or something on the map that indicates that the query is processing/running but I have not been successful.
The following code does not work as the spinner will remain on the screen the entire time.
/********************
* Display the loading indicator when the view is updating
********************/
watchUtils.whenTrue(view, "updating", function(evt) {
$("#loading").show();
});
// Hide the loading indicator when the view stops updating
watchUtils.whenFalse(view, "updating", function(evt) {
$("#loading").hide();
});
I have also tried to change "updating" to "animation" but that does not seem to work either. Any suggestions would be appreciated!