[Mapserver-users] TrueType symbol problems + development suggestion for pixmap symbols

Lars V. Nielsen LVN at hvm.dk
Fri Dec 6 03:11:19 PST 2002


Hi List,

I'm getting my grand tour of Mapserver setup/programming, so yet another
question :-)
Also see my development suggestion about pixmap symbols at the bottom.

I'm trying to set both point layers and inline point features to display
with defined symbols. Sofar I've only been succesful with type pixmap.

Primarily, I'm trying to utilize the standard MapInfo symbol fonts, e.g.
"MapInfo Arrows". But I can't seem to make them display. I tried to switch
to "standard" vector symbol "circle", but still no display. However, when I
switch to a pixmap symbol (defined in the same symbol set file), it displays
correctly ! I've also tried to switch to standard Windows TrueType fonts
Webdings and Wingdings, but they don't display either.

What am I doing wrong here ? Please help me out.
Are there any special requirements for the TrueType fonts to be used with
Mapserver ?

Extract of MAP file:
FONTSET   "c:/Mapserver/fontset/fontset.txt"
SYMBOLSET "C:/Mapserver/symbols/symbols.txt"
LAYER
 NAME "myPoints"
 TYPE POINT
 STATUS ON
 FEATURE
  POINTS
   706000 6137000
  END
 END
 CLASS
  SYMBOL "CompassRose"
  SIZE 48
  COLOR 0 0 0
  BACKGROUNDCOLOR -1 -1 -1
  OUTLINECOLOR 0 0 0
 END
END

Extract of Symbols definition (C:/Mapserver/symbols/symbols.txt):
SYMBOL
 NAME CompassRose
 TYPE TRUETYPE
 FONT mapinfo-arrows
 FILLED true
 ANTIALIAS true
 CHARACTER "!"
END

Extract of Fontset file (c:/Mapserver/fontset/fontset.txt):
mapinfo-arrows                  C:/winnt/fonts/ttmiar__.ttf

-- Development suggestion:

The pixmap symbols I'm using depict "tacks", i.e. with a logical insertion
at the tack point. This puts the whole symbol above this point. But
Mapserver won't allow my to position the symbol according to the insertion
point (i.e. POSITION UC), always using the center of the image, which makes
it necessary for me to "double" my symbol picture appending a dummy,
transparent half below the insertion point.

How about adding a POSITION clause to the SYMBOL definition (similar to
LABEL do.) to allow for non-centered pixmap symbols ?

Best regards / Med venlig hilsen
Lars V. Nielsen
--------------------------------------------------------
Hvenegaard & Meklenborg
Rugaardsvej 55, DK-5000 Odense C
Denmark
http://www.hvm.dk







More information about the MapServer-users mailing list