Layers' feature visibility within data frame

1365
2
01-23-2013 05:39 PM
New Contributor III
Hi,

Has anyone got to grips with how the new legend functionality works in Desktop 10.1 using .NET? Specifically, the way it only shows layers which are currently visible on screen? It looks as though it works for the 'Service Layer Credits' dynamic text as well. I'm looking at using something similar and was just wondering what's accessible through ArcObjects.

Specifically, what I want to do is have some text appear on the layout when particular layers' features are visible, just like the credits text does. Do I need to write my own code to test whether a layer has features currently visible in the data frame, or is this already exposed somewhere?

I'm aware this isn't the most coherent question ever; I suppose more than anything I'm looking for ideas rather than answers. Any thoughts or suggestions gratefully received!

Thanks,
Roland.
Reply
0 Kudos
2 Replies
MVP Frequent Contributor
Roland,

I know in 10.1 the legend is now capable of dropping items from its display when there are no features from that layer in the current extent, its some option you need to tick on when in legend properties mode. It seems to be accessible from the IDynamicLegendItem Interface.

One idea is to associate a graphics layer to the visibility of a layer have a look at the IGraphicsLayer Interface. Never used it so don't know if I'm suggesting a red herring!

Duncan
Reply
0 Kudos
New Contributor III
Thanks for both tips! I'll investigate and report back...
Reply
0 Kudos