AnsweredAssumed Answered

JSAPI4.6 - watching a layers 'updating' property bugged?

Question asked by yramseie@csc.com on Feb 22, 2018
Latest reply on Feb 27, 2018 by bsvensson-esristaff

Hello

I'm trying to watch a feature layer views `updating` property in order to know whether it is finished loading a layer or not:

 

var featureLayer = new FeatureLayer({
   url: "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0"
});

map.add(featureLayer);

 

view.whenLayerView(featureLayer).then(function(lyrView){
   watchUtils.watch(lyrView, 'updating', function(val) {
      console.log(val);
   });
});

https://jsfiddle.net/50kxg4o6/3/ 

 

However, it seems to be bugged, as it shows the values `true` or `undefined`, but never `false`. 

 

Am I doing something wrong?

Outcomes