[MapServer-users] Legend with PNG-Image larger 200px -> Migrate from MS 7.6 -> 8.0

Ulbrich, Georg Georg.Ulbrich at geobasis-bb.de
Wed Sep 4 08:31:34 PDT 2024


Thanks a lot, Seth.
Here is a new issue: https://github.com/MapServer/MapServer/issues/7152 

-----Ursprüngliche Nachricht-----
Von: Seth G <sethg at geographika.co.uk> 
Gesendet: Mittwoch, 4. September 2024 16:39
An: Ulbrich, Georg <Georg.Ulbrich at geobasis-bb.de>; MapServer Users <mapserver-users at lists.osgeo.org>
Betreff: Re: [MapServer-users] Legend with PNG-Image larger 200px -> Migrate from MS 7.6 -> 8.0

Hi,

It looks like this validation is hard-coded into MapServer via this commit - https://github.com/MapServer/MapServer/commit/e74a176e9664219d3522371aa066be671a07622e

Unfortunately, this means you'd have to update the following lines in mapserver.h and recompile:

  #define MS_LEGEND_KEYSIZE_MIN 5
  #define MS_LEGEND_KEYSIZE_MAX 200 

I believe the keysize validation is to avoid remote requests crashing MapServer by forcing it to generate large legends, but the 200px limit could be increased - probably best to open an issue at https://github.com/MapServer/MapServer/issues for this.

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Wed, Sep 4, 2024, at 12:56 PM, Ulbrich, Georg via MapServer-users wrote:
> I'm currently migrating from MS 7.6 to 8.0 and can't get any further 
> with the legend. I want to output a PNG (216x216px) as a legend. So far 
> it works with MS 7.6 like this:
> 
> LEGEND
>    KEYSIZE 216 216
>    KEYSPACING 7 7
>    STATUS ON
> END
> 
> CLASS
>   KEYIMAGE "./inspire_lbgr/symbol/legende-sorption_matrix.png"
>   NAME " "
> END
> 
> --> 
> https://inspire.brandenburg.de/services/bobasensorp_wms?&service=WMS&version=1.3.0&request=GetLegendGraphic&sld_version=1.1.0&layer=sorp&format=image/png&STYLE=default&
> 
> Now in mapserver 8 the "KEYSIZE" option is limited to 200px. All 
> attempts (including an HTML template) have failed so far. Does anyone 
> have an idea for a solution?
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the MapServer-users mailing list