AnsweredAssumed Answered

Getting actual visibility of layers in map?

Question asked by luke.coursey on Aug 16, 2018
Latest reply on Jun 26, 2019 by UHarano-esristaff

I'm trying to get the current visibility state of layers in my map but for I've noticed the layer.IsVisible property only returns false if the layer is unchecked in the ToC. It returns true if the layer is out of scale range thus not drawing on the map (and greyed out in ToC).

 

var layer = (FeatureLayer) _map.Layers.FirstOrDefault(l => l.Name == name);

if (layer == null) return false;

return layer.IsVisible;

  

Is there a way I can get which layers are actually being drawn? (without having to compare scale range and map zoom).

Outcomes