I am currently generating an atlas. I have four parts of a map, showed on each page. For the map I have a lot of polygons styled in different colours after category. Now I need to make a rulebased style, so I only get shown the relevant area of the map, on my atlaspage. So I use $id=@atlas_featureid. But when I use this rule, I can't get my categorized colours with me.

What is the right rule/expression to use?

This is my two options - I can't think of anything. Either type ind $id=@atlas_featureid on every label (which does not work) or do something in categorized - where no expressions work.

enter image description here

enter image description here

1 Answer 1


The "relevant area of the map" should be done by the atlas. The style has nothing to do with that. You can use the option "Filter Legend by map content" in the legend options to only show elements that are acutally wihtin your current layout view (the small filter icon in the Legend items drop down). Your legend will change for each atlas page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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