view.watch 'updating' except drag and extent change events

1297
3
Jump to solution
11-01-2018 09:09 AM
by Anonymous User
Not applicable

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();
  }
});
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

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.

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus
0 Kudos
by Anonymous User
Not applicable

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?

 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.