[mapserver-dev] GAP with TTF symbols changed behavior in MapServer
5.0
Daniel Morissette
dmorissette at mapgears.com
Tue Jun 2 12:27:52 EDT 2009
We upgraded a system from MapServer 4.10 to 5.x recently and noticed
that the GAP changed behavior for TTF symbols in MapServer 5.0. It seems
that this may be related to r6546, but there is no mention or
explanation of the new behavior in the docs.
I have attached an image and a sample mapfile to compare the 4.10 and
5.x behavior.
With MapServer 4.10 and older, setting a positive GAP value would
guarantee that the TTF symbol would be drawn "upside up" (see symbol "A"
for MapServer 4.10 in the attached image)... and using a negative GAP
value would force the symbol angle to follow the line direction (useful
for one-way arrows, see symbol B in attached image).
With MapServer 5.x, setting a positive GAP value results in no rotation
(symbol A)... and a negative GAP value works as before. So we lost the
ability to get the symbol "upside up"... and a negative GAP value is now
required in order to get a TTF symbol that follows the angle of the line
(e.g. for railroad tracks for instance).
Was this an intentional change in behavior, because the old behavior was
not considered useful? If yes then this needs to be documented properly
in http://mapserver.org/mapfile/symbol.html
Daniel
--
Daniel Morissette
http://www.mapgears.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gap.png
Type: image/png
Size: 14460 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20090602/c3368bf0/gap.png
-------------- next part --------------
MAP
NAME "test"
EXTENT 0 0 100 100
SIZE 400 250
IMAGECOLOR 242 239 233
FONTSET "/path/to/fonts.txt"
WEB
IMAGEPATH "/var/www/tmp/"
IMAGEURL "/tmp/"
END
SYMBOL
NAME "A"
TYPE truetype
FONT sans
CHARACTER "A"
GAP 6
END
SYMBOL
NAME "B"
TYPE truetype
FONT sans
CHARACTER "B"
GAP -6
END
LAYER
NAME "A"
STATUS DEFAULT
TYPE LINE
FEATURE
WKT "LINESTRING(20 100, 20 60, 50 60, 100 75, 50 100)"
END
CLASS
STYLE
COLOR 255 255 255
WIDTH 13
ANTIALIAS TRUE
END
STYLE
SYMBOL 'A'
COLOR 180 176 177
SIZE 10
END
END
END
LAYER
NAME "B"
STATUS DEFAULT
TYPE LINE
FEATURE
WKT "LINESTRING(20 0, 20 40, 50 40, 100 25, 50 0)"
END
CLASS
STYLE
COLOR 255 255 255
WIDTH 13
ANTIALIAS TRUE
END
STYLE
SYMBOL 'B'
COLOR 180 176 177
SIZE 10
END
END
END
END
More information about the mapserver-dev
mailing list