[Mapserver-users] truetype symbol size in legend
Eric Bridger
eric at gomoos.org
Mon Apr 26 08:52:45 PDT 2004
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.
Eric
More information about the MapServer-users
mailing list