WAB - How to iterate through the layers and refresh the map

543
1
Jump to solution
04-03-2018 06:30 AM
esriuser2
New Contributor II

I have to refresh the map by iterating through all the layers in the map. How to do that?

Is there a method to get all the layers from this.map. I want to do something like below:
var layers = this.map._layers; // need to get all the layers?
array.forEach(layers, function (layer) {
layer.refresh();
});

Thank you for your help!

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

The LayerStructure class gives you the ability to iterate through all the layers in your map.

View solution in original post

1 Reply
KenBuja
MVP Esteemed Contributor

The LayerStructure class gives you the ability to iterate through all the layers in your map.