4

I need to send a GetPrint request for a map with a dynamic legend that only shows layers/items/symbols relevant for the current map frame.

In QGIS 2.14 one can select "Filter Legend by Map Content" in the composer and export a filtered legend, but if you use a GetPrint request no legend is shown. I have managed to work my way around this by adding together GetLegendGraphics requests for each layer.

Now I'm trying to upgrade from QGIS 2.14 to QGIS 3.6, but I'm not sure this is possible. In QGIS 3.6.3 "Filter Legend by Map Content" does not seem to work in the composer and GetLegendGraphic requests are apparently ignoring the BBOX parameter.

Is this a bug? Is there any way to get around this, or do I need to keep on using QGIS 2.14?

  • At the fifth attempt "Filter Legend by Map Content" in composer seems to be ok. I have upgraded to 3.8, and GetLegendGraphic is still ignoring the BBOX-parameter. This works fine in 2.14. According to this BBOX is supported, but I'm not having any luck with that. – LivaV Sep 13 at 8:12
1

Getlegendgraphic was ignoring the BBOX-parameter for layers inherited from QGIS2. I probably need to add them all over again

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.