When a map is printed with a legend, is it possible to suppress the layers not visible within the map extent from being printed in the legend, even if they are activated in the Layers section?
I think you would need to create a custom print service for this, and set your legend Items properties on the custom layout file to use this setting. this guide shows how to create custom print services. Please report back if it solves your issue– twoLeftFeetJan 20, 2017 at 1:07
Custom layouts were published, but they did not contain any layers so they could be used in the different map services. The "Only show classes that are visible in the current map extent" in ArcMap was grayed out in the legend properties.– user90009Jan 20, 2017 at 23:42
I vaguely remember encountering the same issue at one point, now that you mention it. What it comes down to is one of these two options:
1. modify the cmv print widget
- capturing the current layers visible at the current extent (somehow)
- modifying the print widget to pass the filtered legend layers property to the print service,
2. publish a custom geoprocessing service
writing a custom backend print service that emulates a regular arcgis print service that would modify the print layout to only include layers that are visible at the current scale.
IMHO, Both of these scenarios is going to take a lot of programming and isn't really something that can be answered in the scope of an answer on stack overflow.
The question becomes, how much work do you want to go through to get this working?