Friday 27 July 2018

Adding Multiple Maps in QGIS Composer?


I am working with QGIS Composer 2.0 and I would like to add a second map.


What I would like to do is to have a main map that takes up the majority of the print area. This map, Main Map, will have four layers active from QGIS Desktop.


The second map, Overview Map, is a small map identifying the overview of the area. The overview map will be at a different scale than Main Map, and it will also only have one layer active from QGIS Desktop.


The issue I am having is that when I add a new map, the map areas are updated when I change the layers in QGIS Desktop.



QGIS 2.0 has a new function for Overviews, but the documentation is not overly clear on how to use it.


In ArcMap, you can set up different views, which allows for different data, scale, symbology, etc. ensuring that the different maps in the print layout are independent.


Is there a way to do something like this in QGIS Composer?


Two maps with different layers, from the same QGIS Desktop instance?



Answer



Yes. You can add in a second map to use as an overview map.


You need to lock the features on your your original map first using the Item properties tab. There is a tick box for this in the Main Properties section. You then get QGIS looking how you want the overview map to look and then add it in using the print composer in the same way you added the first map (The "Add New Map" button).


The new map should show up how you want it to look and you can set it as an overview. In the Item Properties for your new map you should find an option for "Overview" (it's about half way down just under the "Show Grid" Option. You need to tell it that the Overview frame you want it to look at is the original map (usually "Map0", but you can set this using trial and error). You can set how you want the overview frame to look.


You can set the scale and extents of this map independently of the first.


You can also add in as many maps as you want.



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...