Friday, 9 August 2019

qgis - Handling multiple map frames with different layers in one print layout?


Often I need two (or more) map frames in map layout to present different data next to each other. It is easy to make multiple map frames in QGIS Print Composer. BUT...


It is in the nature of my work that very often I need to update some map frames because data I am presenting in map changed or I need to add/remove layer, change scale, projection etc.


So if I create one map frame, lock it (Lock layers for map item), create second map frame with different layers, scale,projection etc. and than realize I need to change something in first frame, I can't find a simple way to do it...


To simply do that in Mapinfo, there are more Map Windows, in ArcGIS there are multiple Data Frames. What is in QGIS to achieve that?




Answer



Use groups of layers to simplify your editing and then don't lock the frame by right-clicking on it but instead use the 'Lock layers for map item' check box in the Map tab.


I group my layers according to the map frame I want them in. Then, I can quickly turn on and off a set of layers as I set up the map frame the first time and then click the 'Lock layers for map item' box. When I want to change one map frame and not the other one, I can just work within one group. You may want to duplicate a layer in each group if required or if you want different symbology for the same layer in different frames.


When you click 'Refresh' from the View menu only the selected currently map-frame is updated unless you have any additional map frames which are both unlocked (no padlock icon by right-clicking the frame itself) and do not have the 'lock layers' check box selected.


Working with layer groups and item locking in this way is pretty analogous to the ArcMap setup except if you want to change the projection of on map frame and not the other.


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...