[mapserver-users] MapFile ClassItem Expression on in-line features
StevenHin
Steven_Hin at golder.com
Thu Jun 7 18:35:55 PDT 2012
Hi,
Hoping someone can help out here...
I am trying to configure MapFile that would generate an image based on the
attributes setting, but could not get it creates correctly.
What I am trying to do is when the 'color' attribute value is 1 then render
a star symbol and when is 0 then render a circle. It works when I am reading
the data from a shapfile, but it does not when using in-line.
Is there something I have to add here for in-line feature set?
Here is my MapFile:
MAP
NAME "myMap"
STATUS ON
UNITS METERS
SYMBOL
NAME "circle"
TYPE ELLIPSE
FILLED TRUE
POINTS
1 1
END
END
SYMBOL
NAME "star"
TYPE VECTOR
FILLED TRUE
POINTS
0 0.375
0.35 0.375
0.5 0
0.65 0.375
1 0.375
0.75 0.625
0.875 1
0.5 0.75
0.125 1
0.25 0.625
END
END
LAYER
NAME "myLayer"
TYPE POINT
PROCESSING "ITEMS=layer,pid,color"
STATUS ON
#CLASSITEM "color"
FEATURE
POINTS
123 123
END
ITEMS "address;123;0"
END
FEATURE
POINTS
125 125
END
ITEMS "address;125;1"
END
CLASS
EXPRESSION ('[color]' == '1')
STYLE
ANGLE 0
COLOR 250 0 0
OFFSET 0 0
OUTLINECOLOR 255 255 255
SIZE 10
SYMBOL "star"
END
END
CLASS
EXPRESSION ('[color]' == '0')
STYLE
ANGLE 0
COLOR 0 0 250
OFFSET 0 0
OUTLINECOLOR 255 255 255
SIZE 10
SYMBOL "circle"
END
END
END
END
Thanks,
Steven.
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/MapFile-ClassItem-Expression-on-in-line-features-tp4979849.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list