Layers' feature visibility within data frame

1530
2
01-23-2013 05:39 PM
RolandMartin
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.
0 Kudos
2 Replies
DuncanHornby
MVP Notable 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
0 Kudos
RolandMartin
New Contributor III
Thanks for both tips! I'll investigate and report back...
0 Kudos