I would like to show and hide the loading wheel while the view is updating, but I would like to hide the loading wheel for drag (panning map) and extent change event. How can I achieve it? Alternatively, is there a way to monitor the renderer update?
The current code below show loading wheel any updates and it looks very busy all the time.
view.watch('updating', updating => {
if(updating){
$('#loading').show();
} else {
$('#loading').hide();
}
});
Solved! Go to Solution.
Makiko,
Interacting property = Indication whether the view is being interacted with (for example when panning).
Meaning that panning is just one example. Not the only example.
Zooming (i.e. extent change) is also an interacting event.
Makiko,
Check the views interacting property then.
https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#interacting
Robert,
Thank you for the reply. It looks like 'interacting' is for panning (drag), but please correct me if I am wrong. For extent change event, I looked at the post (below link) and tried to understand your code.
in 4.x, how to catch "extent-change" event?
What is the difference between 'stationary' and 'interacting'? It seems like 'interacting' is for panning event, but please correct me if I am wrong. What about 'stationary'? According to the documentation, 'stationary' is "Indication whether the view is animating, being interacted with or resizing." Unfortunately, it is not clear to me the meanings of 'view is animating' or 'interacted' or 'resizing'.
view is animating - zooming in and out?
interacted - all events (e.g. clicking, mousewheel, and panning)?
resizing - does this mean resizing map div size or related to map extent change?
Makiko,
Interacting property = Indication whether the view is being interacted with (for example when panning).
Meaning that panning is just one example. Not the only example.
Zooming (i.e. extent change) is also an interacting event.