[GIS] Make legend in QGIS only show features in the view extent

legendprint-composerqgisqgis-2.18

I am trying to create a legend in QGIS 2.18.22 so that it only shows the features that are in the current map extent in the print composer. I have been selecting the 'only show items inside current atlas feature' tick box however nothing changes.

enter image description here

I still end up with a massive legend like this even though only a fraction of those features are visible.

enter image description here

I am reluctant to clip the layer to the current view extent to solve the problem that way as when I scan to another part of the map I will have to do the same thing again and I may need to make multiple maps off this layer. Alternatively I could also remove the classifications for each legend item that isn't visible under properties in the main map view however again every time I make a map in a different area I would have to repeat this.

What is the solution to this problem?

Best Answer

You can use the "Filter legend by map content" button in the print composer item properties for your legend item. The print composer legend will then only show the layers which are within your composer map view.

enter image description here

Related Question