[mapserver-users] TRANSPARENCY

Steve Lime steve.lime at dnr.state.mn.us
Tue Oct 8 09:19:12 PDT 2002


It's not done at the moment. Please file this as a bug and we'll see if
that can be fixed for the 3.7 release...

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> <Peter.Bruton at ccrs.nrcan.gc.ca> 10/08/02 07:47AM >>>
Hello again;

Thank-you for your reply about the labelcache setting to create
transparent
annotation.  

Is there a way to have the transparency property affect the appearance
of
the class in legend symbol?  That is, have the class colour of 255 0 0
affected by a transparency of 20 in the HTML legend.  In my experiments
the
legend symbol is not affected by transparency.

Thank-you in advance for any suggestions.

Peter Bruton

-----Original Message-----
From: Steve Lime [mailto:steve.lime at dnr.state.mn.us] 
Sent: Monday, October 07, 2002 7:00 PM
To: Peter.Bruton at ccrs.nrcan.gc.ca; DMartin at erac.com;
mapserver-users at lists.gis.umn.edu 
Subject: RE: [mapserver-users] TRANSPARENCY


Transparency is the way it is because of limitations within GD. GD
does
not allow
for lines/fills/points to be drawn transparently. Rather you must
create a second 
image, draw in it and then merge the images. This can get kind of
expensive so
it's done for a whole layer. Labels will only be transparent IF the
are
not drawn
using the label cache. Personally I see very little use for
transparent
labels (but I
can be convinced).

I agree that more fine grained control is desireable, but we'll need
to
wait for the GD 
library to catch up to our needs. That said, I agree with Martin, the
results ain't bad.

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> "Martin, Daniel" <DMartin at erac.com> 10/07/02 04:55PM >>>
I don't know what the proper behavior is supposed to be.  But, I can
simply
confirm that you aren't missing anything.  From my trials, this is the
way
MapServer works today.  Transparency on a layer does not affect the
label.
I think it would be possible to have transparent text using a truetype
symbol (not a label), but I honestly haven't tried it.  At any rate,
it
isn't much help to you since a truetype symbol is not dynamic.

To be honest, I feel in an ideal world that transparency would not be
on the
LAYER object.  It would be both on the CLASS object and on the LABEL
object.
I may want one class within a LAYER to be transparent and not the
others.
For the same reason, I wouldn't like if a LAYER transparency forced
the
label to be transparent without option.

Since I'm not as knowledgable as the MS developers, I can only assume
there
is a technical reason it is on the LAYER object.  Even with the
limitations,
I must say that in playing around with transparent layers I have
produced
some of the most stunning maps I've seen on a web application.  So,
don't
think for 1 second I am complaining. :)

-Dan

P.S.  Is it just me, or did you ask the same question twice?

-----Original Message-----
From: Peter.Bruton at ccrs.nrcan.gc.ca 
[mailto:Peter.Bruton at ccrs.nrcan.gc.ca] 
Sent: Monday, October 07, 2002 1:27 PM
To: mapserver-users at lists.gis.umn.edu 
Subject: [mapserver-users] TRANSPARENCY


Hello;

I am attempting to use the layer object's transparency property and
have a
few questions about its behavior.

1) I have a layer with 1 class.  The colour assigned to the class is
255 0
0.  Transparency is set to 20.  The colour of the class in the map is
affected by the transparency setting.  However, the colour of that
class in
the legend is not affected (i.e.; it is still sold red - 255 0 0).  Is
this
the proper behavior or have I missed something?  I am using the HTML
legend
in my application.
2) I have a layer with 1 class.  The colour assigned to the class is
255 0
0.  Transparency is set to 20.  I have added a label object to the
class
object.  Since transparency is set at the layer level, I expected
annotation
to be affected.  However, this is not the case.  The annotation is
still
solid red (255 0 0).  Is this the proper behavior or have I missed
something?

Thank-you in advance for any suggestions.

Peter Bruton
GeoAccess Division
Canada Centre for Remote Sensing
615 Booth Street, Room 650
Ottawa, Ontario, K1A 0E9, Canada
telephone 1-613-947-0465
fax 1-613-947-2410



More information about the MapServer-users mailing list