[mapserver-users] Legend difference in 5.6.1 and 6.4.1

mapserver mapserver at markus-spring.de
Thu Apr 23 09:01:45 PDT 2015


Jörg,

looks like this is a minefield :(

Strange enough, using bitmap fonts the class names don't get truncated, but then 
I don't have the beloved German umlauts. This sure enough looks like a 
miscalculation of the space the average letter of a proportional font needs and 
so the space allocated for the class name is too small.

Don't know why it worked in 5.6.1 but broke in the transition to 6.4.1

---Markus

Am 23.04.2015 um 11:28 schrieb Jörg Thomsen:
> Hallo Markus,
>
> I remember this thread:
> http://mapserver-users.umn.narkive.com/sUT3WyaT/wrong-different-legend-generation
> but I don't know the ending...
>
> In your legend definition you are using wrap, as I remember you have to
> use html '<br />' for legends (in the class name). Additionally you
> should use an offset to shift the text upward.
>
> In one of my projects I had to use up to three lines for the description
> in the legend and I added dummy classes with white symbols an   as
> name between each real class to have enough space for my text.
>
> perhaps this works for you too.
>
> Jörg
>
> Am 23.04.2015 um 09:45 schrieb mapserver:
>> I am migrating my mapserver application from 5.6.1 to 6.4.1 and have
>> observed a difference in the created legend images, i.e. truncating of
>> class names - which makes the legend image unusable in the end
>>
>> The legend definition on both platforms is as such:
>>
>> LEGEND
>>    KEYSIZE 22 12
>>    LABEL
>>      TYPE TRUETYPE
>>      FONT arial
>>      SIZE 8
>>      COLOR 0 0 0
>>      WRAP "@"
>>    END
>>    STATUS ON
>> END # legend
>>
>> Mapfile: Umlauts in html-encoding like
>>   CLASS NAME "Öffentlicher Träger"
>>
>> I have to use a truetype font, otherwise I can't render the German umlauts.
>>
>> mapserver 5.6.1 gives this result:
>>
>> http://maps.muenchen.de/wms-2/rgu/behindertenheime?version=1.1.1&service=WMS&request=GetLegendGraphic&layer=l0&format=image/png&STYLE=default
>>
>>
>> and mapserver 6.4.1 gives this one:
>>
>> http://kronos.muenchen.de/wms/rgu/behindertenheime?version=1.1.1&service=WMS&request=GetLegendGraphic&layer=l0&format=image/png&STYLE=default
>>
>>
>> Have I missed something in the migration guide? Or are there parameter
>> available to increase the legend size?
>>
>> Best regards - Markus
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



More information about the MapServer-users mailing list