[SPAM] - Re: [Mapserver-users] truetype symbol size in legend - Found word(s) remove list in the Text body.
Moritz Lennert
mlennert at club.worldonline.be
Tue Apr 27 06:19:19 PDT 2004
Stéphane RIFF said:
> Moritz Lennert wrote:
>
>>Eric Bridger said:
>>
>>
>>>On Mon, 2004-04-26 at 11:02, Moritz Lennert wrote:
>>>
>>>
>>>>Hello,
>>>>
>>>>Going on with the learning process concerning (proportionately sized)
>>>>truetype symbols...
>>>>
>>>>Thanks to Jan Hartmann and Michael Schulze, I can now satisfyingly
>>>>display
>>>>symbols proportionate to a given attribute. Now I would like to be able
>>>>to
>>>>display this symbol in the legend at a reaonable size.
>>>>
>>>>Below is my entire layer definition. When I display this, I get a
>>>>one-pixel point in the legend for "Symbole cercle TT". I can "hack" a
>>>>larger symbol by using the SYMBOL and SIZE commands. However, this
>>>> works
>>>>as long as SIZE is smaller then the smallest value in LABELSIZEITEM,
>>>>otherwise everything smaller is scaled up to the value of SIZE...
>>>>
>>>>Is there a way of defining the size of one symbol within the legend ?
>>>>
>>>>Moritz
>>>>
>>>>********Layer definition**************
>>>>
>>>> LAYER # Cerclestt
>>>> Name Cerclestt
>>>> DATA centres_communes
>>>> STATUS OFF
>>>> TYPE POINT
>>>> LABELSIZEITEM VOITURE
>>>> FILTER ([VOITURE] > 0)
>>>>
>>>> CLASS
>>>> NAME "Symbole cercle TT"
>>>> COLOR 255 0 0
>>>> TEXT "N" # charactère correspondant au symbole du cercle dans la
>>>>police ESRI1
>>>> LABEL
>>>> POSITION cc
>>>> FONT esri_1
>>>> TYPE truetype
>>>> FORCE true
>>>> COLOR 255 0 0
>>>> ANTIALIAS true
>>>> END
>>>> END
>>>> END # Cerclestt
>>>>_______________________________________________
>>>>Mapserver-users mailing list
>>>>Mapserver-users at lists.gis.umn.edu
>>>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>>>
>>>>
>>>>
>>>This is something of a hack also but you could create a separate layer
>>>just for displaying the legend. Remove the NAME from your CLASS above
>>>to prevent it from displaying in the legend.
>>>
>>>Create a new LAYER:
>>>NAME Cerclestt_legend
>>>STATUS DEFAULT
>>>TYPE POINT
>>>CLASS
>>> NAME "Symbole cercle TT"
>>> COLOR 255 0 0
>>> # circle name defined in symbol.sym file
>>> SYMBOL "circle"
>>> SIZE N
>>>END
>>>
>>>Set N to the size you want in pixels. You could also create a TrueType
>>>"N" circle in your symbol.sym file and use that as your SYMBOL.
>>>
>>>
>>>
>>
>>Thank you, now I get a nice legend. However, it is visible all the time,
>>and would like to have it shown only when the corresponding layer is
>>visible. So, I've been experimenting with the REQUIRES command. However,
>> I
>>just can't seem to make it work. When I set STATUS to DEFAULT, the legend
>>is always visible, when I set it to ON or OFF it is never visible, even
>>when the layer CerclesTT is visible...
>>
>>Any hints ?
>>
>>Here's my Layer definition:
>>
>>LAYER # Legende pour cercles truetype
>> NAME Cerclestt_legend
>> STATUS ON
>> REQUIRES "[Cerclestt]"
>> TYPE POINT
>> CLASS
>> NAME "3 travailleurs"
>> COLOR 255 0 0
>> SYMBOL "point_tt"
>> SIZE 30
>> END
>> END # Legende pour cercles truetype
>>
>>Moritz
> Hello,
> For your symbol size problem :
> if you are using mapscript and HTML Legend, you can change the size of
> your symbols just before drawing LegendIcons and restore it just after...
> I do this for an application and it seems to work well.
Thank you, I'll look into this once I get to exploring Mapscript (I am
just beginning with Mapserver)
> For the other did you care of case for your layer name ?
Yes, the layer name is exactly "Cerclestt".
Moritz
More information about the MapServer-users
mailing list