Arrowheads
Stephen Woodbridge
woodbri at SWOODBRIDGE.COM
Thu Sep 7 17:36:16 PDT 2006
Chip Taylor wrote:
> Ok this one seemed so simple but I have yet to get this to work. The
> project I am working has a need to show traffic flow along a section of a
> road or highway. Ideally the end result would be an arrowhead at the end of
> a line segment, but regularly spaced arrows along the line segment would
> also work. The shape file is one that came from the public domain.
>
> Problem #1: creation of the arrowhead. I would like the symbol to be
> derived from a Truetype font if possible. I found a good arrow symbol in
> Wingdings at character #232. I created a symbolset entry like this:
> SYMBOL
> NAME "Arrow1"
> TYPE TRUETYPE
> FONT "Wingdings"
> CHARACTER "è"
> FILLED true
> ANTIALIAS true
> GAP -70
> END
> When I reference this symbol, I get è displayed instead of the symbol.
> When I use the "sans" font and the ">" symbol (not my optimum choice), the
> ">" displays along the line as it should.
>
> Problem #2: adding only to the end of the line and only the desired end with
> the symbol properly oriented. Haven't figured this one out!
>
> Problem #3: if #2 isn't possible, then having the directional arrowhead
> appear periodically along the line is acceptable (like it does with the > in
> #1). However, I cannot seem to control the orientation of the symbol.
> Along some segments of the line, the symbol will point one way and other
> segments it will point just the opposite.
>
> Any ideas would be very welcome!
>
> Chip Taylor
>
Chip,
Notice that you will need symbols that point both left and right AND
notice you left off the ';' from the CHARACTER definition.
Hope this helps,
-Steve W
SYMBOL
NAME "one_way_from"
TYPE truetype
FONT arial-bold
CHARACTER ">"
#FONT "Wingdings"
#CHARACTER "รจ"
GAP -40
END
SYMBOL
NAME "one_way_to"
TYPE truetype
FONT arial-bold
CHARACTER "<"
#FONT "Wingdings"
#CHARACTER "&#???;"
GAP -40
END
LAYER
NAME "One_Way_Arrows"
STATUS DEFAULT
TYPE LINE
CLASSITEM "DIRECTION"
CLASS
NAME "From"
EXPRESSION "F"
STYLE
SYMBOL "one_way_from"
COLOR 0 0 0
SIZE 6
END
END
CLASS
NAME "To"
EXPRESSION "T"
STYLE
SYMBOL "one_way_to"
COLOR 0 0 0
SIZE 6
END
END
END
More information about the MapServer-users
mailing list