Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to get the legend in a pagelayout to only show patches/swatches for features fall within the visible extent of the Map?

The solution needs to work on FeatureLayers and ArcGIS Server layer. It's possible to set a property on the AutoVisibility to filter the Legend to only show the layers that are visible, but if the layer is visible and only a few of multiple symbols in the renderers is visible the legend gets too many items to be useful.

Update: This seems to be a question that has been asked several times before on the ESRI-forum, found one solution that seems to works on a FeatureLayer if it has a IUniqueValueRenderer Compressing a legend to show displayed features only but we are using both FeatureLayer and ArcGIS Server layers, so that only solves part of our problem.

  • We are trying to find a way to hide and show the IElement from ILegendItem.Graphics , but it feel like a deadend.

  • On the server ILegendItem.Layer it might be possible to cast to a MapServerIdentifySublayer and use
    Identify to somehow find the visible objects.

If that's possible its only a matter of connecting the two.

share|improve this question

I gave up trying to write my own and bought this instead.

share|improve this answer
I've sent a question to NGIS but mayby you know, does it work in ArcGIS Engine – MathiasWestin Sep 20 '10 at 14:07
The answer I got: "Unfortunately Legend Limiter doesn't work with ArcGIS Server layers. We do have a developers kit version of legend limiter that can be called from custom code however it isn't free." – MathiasWestin Mar 31 '11 at 17:31

Last time I used LegendLimiter, it did not take into account Map Service layers and it was also only available for Desktop. Things may have changed as this was good 3-4yrs back.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.