[mapserver-users] Can a CLASS be transparent?
Fawcett, David
David.Fawcett at state.mn.us
Wed Sep 10 13:24:06 PDT 2008
Roger,
At least at version 5.2, there is CLASS level OPACITY when you use the AGG image format. For example, if I want to turn some of my polygons 50% opaque (transparent), I can set an expression in one of the classes and set an OPACITY for that class. I have pasted an example with Minnesota counties at the end of this message.
I am not sure if this is what you really want. I am guessing that you just want to have an expression in one or more classes that tells MapServer which states you want to not be colored. For that class, set an OUTLINECOLOR and not a COLOR. For the other classes, set both an OUTLINECOLR and COLOR.
David.
LAYER
NAME "counties"
STATUS DEFAULT
DATA "bdry_counpy2"
TYPE POLYGON
CLASSITEM "CTY_NAME"
CLASS
NAME 'County Boundary'
EXPRESSION /^A/
#EXPRESSION "Aitkin"
STYLE
COLOR 255 0 0
OUTLINECOLOR 0 0 0
OPACITY 50
END
END
CLASS
NAME 'County Boundary'
STYLE
COLOR 255 0 0
OUTLINECOLOR 0 0 0
END
END
END
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Roger André
Sent: Wednesday, September 10, 2008 2:57 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Can a CLASS be transparent?
Hi Everyone,
I'm new to the list and am not sure if this has been properly answered already. The old posts that I have found all seem slightly different regarding this topic, so I thought it would be safest to ask again.
Is it possible to set a CLASS to be transparent? The use-case being that I would like to put a raster layer underneath a layer of US states, and selectively expose the rasters by making specific states transparent. I suppose that I could write a CLASS expression for each state, and simply omit an entry for each state that I want exposed, but I wonder if there is a better way?
Thanks in advance for any suggestions you can give.
Roger
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080910/a41178e8/attachment.htm>
More information about the MapServer-users
mailing list