Hi,
I'm trying to render a layer that colors polygons. Three of the classes are
used to color the polygon, and they are mutually exclusive classes (i.e., only
one class at a time will be applicable to a given polygon). The fourth class I
have is meant to draw an outline of the polygon at a certain maxscale value,
otherwise, do not display a border.
What I am getting is that the 'border' class doesn't work with the other three.
If it is the first class in the layer, it totally obstructs the results of the
other three (even though I am making this layer transparent and the style of
the class have a color of -1 -1 -1). If it is the last class, the borders do
not show up at all at any scale. Any advice or clarification on my
misunderstanding of how Mapserver is operating would be appreciated. Below is
the relevant layer:
-----------
LAYER
NAME "Precincts"
CONNECTIONTYPE postgis
CONNECTION "user=postgres dbname=postgis password=xxxx"
DATA "the_geom from (select distinct on (county_id, prct_id)
county_name , prct_name , candidate_name , party_abbr ,
percentage_of_votes_for_candidate_by_office , the_geom from ( select distinct
on (county_id, prct_id) county_id , prct_id , office_name ,
max(votes_for_candidate) as votes_for_candidate from sos_stateracespct where
office_name = 'US SENATOR' group by county_id , prct_id , office_name having
max(votes_for_candidate) > 0 ) m inner join sos_stateracespct using (county_id,
prct_id, office_name, votes_for_candidate) inner join shp_prct using
(county_id, prct_id) inner join sos_coprct_f using (county_id, prct_id)) as foo
using unique the_geom using SRID=-1"
STATUS on
TYPE polygon
TRANSPARENCY 0
CLASS
NAME "Draw Prct Boundaries"
MAXSCALE 500000
STYLE
OUTLINECOLOR 0 0 0
COLOR -1 -1 -1
WIDTH 1
END
END
CLASS
NAME "DFL Votes"
EXPRESSION ("[party_abbr]" = 'DFL' AND
[percentage_of_votes_for_candidate_by_office] > 0.5)
COLOR 153 204 255
END
CLASS
NAME "R Votes"
EXPRESSION ("[party_abbr]" = 'R' AND
[percentage_of_votes_for_candidate_by_office] > 0.5)
COLOR 255 153 255
END
CLASS
NAME "No Clear Majority"
EXPRESSION ( !("[party_abbr]" = 'R' and
[percentage_of_votes_for_candidate_by_office] > 0.5) and !("[party_abbr]" =
'DFL' and [percentage_of_votes_for_candidate_by_office] > 0.5))
COLOR 255 255 153
END
END