[mapserver-users] Multiple CLASSITEMs
Steven Hayes
shayes at bigpond.net.au
Mon Mar 18 16:02:01 PST 2002
Ari,
just a guess but try putting the classitem value in double quotes:
e.g. CLASSITEM "VALUE"
I had the same problem and this made it work.
Also, I have mutiple classes and expressions thus:
CLASSITEM "VALUE"
CLASS
NAME "UNDER 11"
EXPRESSION([VALUE]<11)
COLOR 124 246 37
END
CLASS
NAME "UNDER 21"
EXPRESSION([VALUE]>11 AND [VALUE]<21)
COLOR 131 247 124
END
CLASS
END
Note that VALUE is in square brackets and the whole expression is in normal
brackets.
Regards
Steven Hayes
-----Original Message-----
From: owner-mapserver-users at lists.gis.umn.edu
[mailto:owner-mapserver-users at lists.gis.umn.edu]On Behalf Of Ari Yakar
Sent: Tuesday, 19 March 2002 9:23 AM
To: mapserver-users at lists.gis.umn.edu
Subject: [mapserver-users] Multiple CLASSITEMs
First of all thanks very much to Daniel Morissette and Stephen Woodbridge
for
the quick response for my previous post on Mapinfo TAB files and lcc
projections.
I am having problem with EXPRESSIONS and string comparison. I couldn't find
any
answer to my questions in the Mapserver documentation or the mailing list
archives
In the map file I have;
....
....
....
LAYER
NAME Canada
TYPE POLYGON
....
....
....
CLASSITEM Province_Name
# CLASSITEM Pop_1990
LABELITEM Province
CLASS
NAME "Ontario"
EXPRESSION 'Ontario' // Works if "CLASSITEM Pop_1990" is commented
out
#EXPRESSION ([Province_Name] eq "Ontario") // Doesn't works even if
"CLASSITEM Pop_1990" is commented out
#EXPRESSION ([Province_Name] eq 'Ontario') // Doesn't works even if
"CLASSITEM Pop_1990" is commented out
// Tried also with '='
COLOR 153 204 255
OUTLINECOLOR 0 0 0
TEMPLATE "resultL1.html"
END
....
....
....
There is only 1 class.
My questions are;
Is it possible to have multiple CLASSITEMs in one layer?
How could I write the above expression with 'eq' operator?
Is there any other source of information on EXPRESSIONs?
Thanks in advance
Ari Yakar
Globvision Inc.
More information about the MapServer-users
mailing list