How to produce multiple maps with same layout for different layers' extents?
In QGIS 2.2 (or now in nightly builds) there is a feature that allows you to highlight the current feature. This can be used to mask the other zones out as you iterate over them. You can't really hide the other features but you can use this to create a black out layer which might look a bit ugly but will have the same effect.
What you need is:
- Nightly QGIS, or 2.2 when it's released
- A layer with each zone as polygons
- A composer layout
I only have suburbs so I'll just use that for the example but you'll get the idea
Create your composer layout and enable the Atlas feature, selecting your zones layer:
If you add an label with text like:
Current Zone: [% "ZoneName" %]
It will fill in the current zones name. Tip: Anything inside [% %]
is an expression.
Switch back to your map and use the rule based rendering style on your zone
$id = $currentfeature
Is the rule to style the current active atlas feature. e.g the id of the check feature is the same as the atlas feature. Make sure this layer is right at the top so it hides the others
The ELSE
rule is everything else (new in 2.2). Apply the style
Jump back into the print composer and print a run off your maps.
This will be the result
With some setup you can do little insert maps, etc, with this new feature
As James N said, latest QGIS versions use:
$id = $atlasfeatureid
I would like to add you can easily restyle everything outside of your atlasfeature (including areas outside the atlas shapefile) by selecting inverted polygons after creating the rule:
For example if you want to show only a certain province and not only remove neighbouring provinces but also neigbouring areas outside your country (and shapefile).