[QGIS-Developer] QGIS Server: default values for GetLegendGraphics (fonts, symbol sizes, etc.)
Jorge Gustavo Rocha
jgr at di.uminho.pt
Thu Jun 17 09:24:21 PDT 2021
Hi Andreas,
The default values are in fact the values used in the QGIS project.
These GetLegendGraphics parameters are used to overwrite those default
settings.
These are parameters and are not read from the environment. It should
not be difficult to read them from the environment too, but it requires
some additional logic on the server side.
Some time ago, in our local municipality, I added some rewrite rules to
Apache to use the same font in each GetLegendGraphics request, since not
all people were using the same font on QGIS projects. The rewrite just
adds
&TRANSPARENT=true&ITEMFONTFAMILY=FreightSans&LAYERFONTFAMILY=FreightSans
to each GetLengenGraphic request. The legend was much more uniform with
this simple rewrite.
As a workaround, I suggest something like these rewrite rules on the
server side.
Regards,
Jorge
On 17/06/21 16:33, Andreas Neumann wrote:
> Hi,
>
> I have a question regarding the default values for changing the look and
> feel of GetLegendGraphics as described at
> https://docs.qgis.org/3.16/en/docs/server_manual/services.html#getlegendgraphics
> <https://docs.qgis.org/3.16/en/docs/server_manual/services.html#getlegendgraphics>
> (e.g. LAYERFONTFAMILY, SYMBOLWIDTH, etc.).
>
> Is there a way to specify "default" values for these settings, e.g. in
> an environment variable or through other means?
>
> Thank you if you know anything about it.
>
> Andreas
>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
J. Gustavo
--
Jorge Gustavo Rocha
Departamento de Informática
Universidade do Minho
4710-057 Braga
Gabinete 3.29 (Piso 3)
Tel: +351 253604480
Fax: +351 253604471
Móvel: +351 910333888
skype: nabocudnosor
More information about the QGIS-Developer
mailing list