Select to view content in your preferred language

how to wait for layer definition expression to take effect

1000
2
Jump to solution
12-19-2020 08:22 AM
MichaelLev
Frequent Contributor

I'm developing custom widgets for WAB (Develper Edtion) 2.17, Launchpad Theme, on 3D Scenes (ArcGIS API for javascript 4.17), on our compamy portal (version 10.7.1).

I am still a newbie...

I need to create screenshot after setting definition expression for 2 layers, but I don't know how to wait for the layers view to settle, so that the screenshot will show the layers after some features in both layers have been hidden by the new definition expressions.

Help will be greatly appreciated,

 

Michael

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Michael,

  You would add a watch on the layer view.

view.whenLayerView(fLayer).then(function(layerView){
  watchUtils.whenFalseOnce(layerView, "updating", function(upDone){
    //The layer is done updating
  });
});

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Michael,

  You would add a watch on the layer view.

view.whenLayerView(fLayer).then(function(layerView){
  watchUtils.whenFalseOnce(layerView, "updating", function(upDone){
    //The layer is done updating
  });
});
0 Kudos
MichaelLev
Frequent Contributor

Dear Robert,

Thank you for your many immediate answers. You are helping me so much! I don't have words to thank you as I have to!

Michael

0 Kudos