<div>I can confirm that there is no issue on print layout. I have been wrong because if there is not yet a map added, it displays the symbols in max size - what is not an issue since one don't need a legend without map. So I'll check out the solution with scale as request parameter and the default size in case there is no scale available.<br></div><div><br></div><div>Thanks and regards<br></div><div>Dave<br></div><div><br></div><div><i>20 February 2019 12:50 "David Signer" <david@opengis.ch> wrote:</i><br></div><blockquote class="infmailquote"><div>Hi Nyall<br></div><div><br></div><div>I think, you're right. If there's no max size defined (enabled) on the GetLegendGraphics, it responds with memory error (so possibly because the size gets infinite because of zero scale).<br></div><div>I thought that it has been the issue in the print layout as well, but I'm not sure anymore and I will check again when I'm back in the office. If it's not the issue on print layout - like you say - then I agree on your approach. Where should this default scale be defined in your opinion?<br></div><div><br></div><div>Thanks<br></div><div>Dave<br></div><div><br></div><div><br></div><div><br></div><div id="editorUserSignature"><p> <br></p><div class="moz-signature"><div class="moz-signature"><div><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:Verdana, sans-serif"><span class="size" style="font-size:10pt">David Signer</span></span></span><br></div><div><a href="mailto:david@opengis.ch" target="_blank" rel="noopener noreferrer"><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:Verdana, sans-serif"><span class="size" style="font-size:8pt">david@opengis.ch</span></span></span></a><br></div><div><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:Verdana, sans-serif"><span class="size" style="font-size:8pt"><a href="tel:+41787661303">+41 (0)78 766 13 03</a></span></span></span><br></div><div><br></div><div><a href="http://www.opengis.ch"><img src="http://storage-master.infomaniak.ch/webmail/signature/5a27533d573c120748dd73ff29a5e55315eae494?_=1522068812014" alt="OPENGIS.ch Logo" width="200" height="80" contenteditable="false"></a><br></div></div></div></div><div><br></div><div><br></div><div><i>19 February 2019 23:34 Nyall Dawson <nyall.dawson@gmail.com> wrote:</i><br></div><blockquote class="infmailquote"><div>On Tue, 19 Feb 2019 at 19:03, David Signer wrote:<br></div><div>><br></div><div>> Hi there<br></div><div>><br></div><div>> I'm struggling with the following issue https://issues.qgis.org/issues/21309 summarized like this:<br></div><div>> When using map units as symbol size and having a max value in mm, this value is always taken in the GetLegendGraphics request with QGIS Server, what leads to huge symbols there (same in legend of print layout).<br></div><div>><br></div><div>> I think it's not always needed to adapt the exact size to the legend.<br></div><div>> So I see three approaches:<br></div><div>> - Don't adapt the size to the legend at all<br></div><div>> - Provide a configuration "Maximum size for legend"<br></div><div>> - Provide a max size property for the server (does not solve it for print composer)<br></div><div>><br></div><div>> Where I would prefer the "Maximum size for legend" configuration.<br></div><div>><br></div><div>> What do you think?<br></div><div><br></div><div>Isn't the underlying issue here that server generates the legend<br></div><div>without any knowledge of map scale? (And presumably uses a scale of 0<br></div><div>or some other huge scale, resulting in the symbols taking their<br></div><div>maximum size)?<br></div><div><br></div><div>If so, then i think the solution is:<br></div><div><br></div><div>1. Expose the choice of scale within the GetLegendGraphics call<br></div><div>2. Allow users to set a "default" legend scale for a particular<br></div><div>project, and use this scale when generating the legend.<br></div><div><br></div><div>> (same in legend of print layout).<br></div><div><br></div><div>Can you elaborate? The legend in print layout correctly follows the<br></div><div>scale of the linked map item (and there's unit tests covering this).<br></div><div><br></div><div>Nyall<br></div><div><br></div><div><br></div><div><br></div><div>><br></div><div>> Thanks<br></div><div>> Dave<br></div><div>><br></div><div>><br></div><div>><br></div><div>> David Signer<br></div><div>> david@opengis.ch<br></div><div>> +41 (0)78 766 13 03<br></div><div>><br></div><div>><br></div><div>><br></div><div>> _______________________________________________<br></div><div>> QGIS-Developer mailing list<br></div><div>> QGIS-Developer@lists.osgeo.org<br></div><div>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer<br></div><div>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer<br></div></blockquote><div><br></div><div><><br></div></blockquote><div><br></div>