Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

I gave up trying to write my own and bought this instead. http://www.spatial-online.com/LegendLimiterforArcGIS.htm

share|improve this answer
    
I've sent a question to NGIS ngis.com.au/Products/ArcGIS+Tools/default.aspx 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
add comment

Your Answer

 
discard

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.