[GIS] Layers not locking and exporting incorrect maps in QGIS composer

exportprint-composerqgis

I have a map of the US, with insets for Alaska and Hawaii. All 3 are different projections. In composer view, this is what I see:

composer view

However, what's exported is this:

exported map

When composing, the "Lock layers", "Lock styles for layers", and "Lock items" are not even remotely working. I.e. if I were to click Refresh in the above composer view, all three inset maps would update, even though I have locked everything I possible can on all three layers. "Draw map canvas items" is also unchecked for all three, for what it's worth. I suspect this may have something to do with the exporting issue. I think QGIS refreshes each little map before it exports, and this is where the locking issue comes in.

In short: what can I do to either ensure these layers stay locked, or to make sure the export matches what's in the composer view?

These two solutions have not worked for me:

QGIS Print Composer Export problems

How to handle multiple map frames with different layers in one print layout?

Best Answer

Ok, so if you have 3 maps of different projections within composer view (done via on-the-fly projections), the maps will not lock and will not export correctly! Everything will be exported with the last OTF projection that was used. So I just used EPSG 102009 (North America Lambert Conformal Conic), as it keeps Alaska, Hawai'i, and the lower 48 about the correct size and shape. In my inset maps of Hawai'i and Alaska, I used the Map Rotation box within the composer to rotate Hawai'i and Alaska to the orientation I wanted.

Here is the final result:

enter image description here

Related Question