I have a array of graphics that I'm adding to a GraphicsLayer with the following code:
gLayer.addMany(features);
This works correctly but I need to catch when then graphics finished rendering on the map because many times the array has many graphics and I need to show a loading to the user.
Thanks
Rodrigo,
You just need to watch the layer view updating property for false.
view.whenLayerView(gLayer).then(layerView => {
watchUtils.whenFalse(layerView, 'updating', () => {
console.log('The layer is now rendered');
});
});
Thanks for your reply. I did that but it triggers before the graphics appears on the screen.
Rodrigo,
That is strange the updating property is suppose to be the property to watch. I have used it and it worked fine on my end. Maybe you can just add a settimeout inside the result function for a couple hundred milliseconds.