Symbol rotation via attribute lookup
Michael Underwood
mike.underwood at GMAIL.COM
Thu Sep 22 18:12:45 PDT 2005
Hello,
I'm using PHP/MapScript 4.6 and trying to create a layer of points from a
PostGIS database using an arrow pointing in the direction of the 'heading'
field in the data table. No matter what I try though, I get a map with all
of the arrows pointing straight up (i.e. unrotated). My definitions include
a TrueType symbol using a character of an arrow pointing up (I've also tried
drawing an arrow as a Vector symbol with the same results):
SYMBOL
NAME 'trackarrow'
TYPE TRUETYPE
FONT 'adings'
FILLED false
ANTIALIAS false
CHARACTER 'a'
END
A layer with the following data source:
DATA "vessel_coordinate from (select * from archive_v where vessel_id=12) as
foo using unique myoid using SRID=-1"
A class to size, colour and (in theory) rotate the symbol:
CLASS
SYMBOL 'trackarrow'
SIZE 12
STYLE
COLOR 0 0 0
ANGLEITEM 'heading'
END
END
I know that the ANGLEITEM line is being read by MapServer because if I
change the name in quotes I get an error that the field doesn't exist, and
if I try putting the field name in square brackets I get parsing errors, but
setup like this I simply get all of the arrows size twelve, coloured black,
but pointing up. The table contains thousands of records with values in the
heading field ranging from 0 to 359.
Any insight into why the arrows won't rotate and how to make them do so
would be greatly appreciated.
Thanks,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050922/b42a9878/attachment.htm>
More information about the MapServer-users
mailing list