Friday 14 July 2017

style - Missing icon within legend if layer has a complex styling with QGIS


I'm using a complex styling for a points layer in QGIS, including two markers and a Geometry generator to set up a line between points and labels (see style description in this post).


The result is that either in the Layers Panel and within a legend created with the map composer, the layer has no representation (no icon at all!).


Layers Panel (see either obs_tri and site_tri layers) :


enter image description here


Map composer's legend :



enter image description here


Is this a bug or is there a way to get a nice legend all the same?



Answer



Geometry generator symbology tends not to show up properly on the legend, especially if you use map units and more complex combinations of symbologies. Sometimes in the Layers panel the symbology will take up massive amounts of space and still remain blank.


To get useful legends, I either manually edit the composed map in an image editor (if it's a once-off) or create a duplicate set of the problematic layers, and use conventional equivalents of the symbol (i.e. without geometry generator, or at a different scale or whatever makes it work), disable them from showing up on the map but still include them in the legend. The important thing is you must turn auto-update off.


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