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?

  • Are you in Atlas preview mode? – csk Aug 29 '18 at 3:17
  • No I wasn't the Atlas preview option is greyed out for me and so I can't select it within the menu – glouise Aug 30 '18 at 1:47

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

  • 1
    Great tip. I would highlight that it will also filter out the layer classes that don't show on the screen. – Techie_Gus Aug 29 '18 at 6:42
  • Awesome, this was what I was looking for. Thank you! – glouise Aug 30 '18 at 1:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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