[SPAM] - Re: [Mapserver-users] truetype symbol size in legend - Found word(s) remove list in the Text body.

Stéphane RIFF stephane.riff at cerene.fr
Tue Apr 27 08:12:44 EDT 2004


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
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>
>  
>
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.

For the other did you care of case for your layer name ?

Bye
Steff




More information about the mapserver-users mailing list