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).
Hi
There is a new method available with Pro 2.4 that will allow you to do this:
FeatureLayer.IsVisibleInView(MapView)
ProSnippet: Check if Layer is visible in the given map view
Thanks
Uma