[mapserver-users] Transparent layers

Daniel Morissette morissette at dmsolutions.ca
Fri May 24 16:52:35 EDT 2002


The transparency parameter is supported via PHP MapScript for
getting/setting the value in the layer object (that should be enough
as far as MapScript is concerned), so if it won't work for you then it
must be because of something else.  

I never used that feature so I don't know if it requires anything
special in your build, or is supported only with specific image formats
(maybe just PNG?).  By looking at the code it seems that it should work
for any GD format.  Note that this transparency is applied only between
layers within the map image and the resulting image will still be opaque
in your browser.

Hopefully someone who knows more about this new transparency feature can
provide more details.

Daniel


Vinko Vrsalovic wrote:
> 
> On Fri, Apr 12, 2002 at 10:32:35AM -0500, Steve Lime wrote:
> > It is possible in the development version for 3.6. It now supports a
> > "TRANSPARENCY" parameter
> > (at the LAYER level) that takes an integer argument representing the %
> > of transparency to use.
> > 100 is completely opaque, 50 is 50% transparent and so on. Color
> > limitations will definitely affect
> > the quality of the output. The samples I've seen are pretty good
> > though. For earlier versions you're
> > limited to hatched fills...
> 
> I tried setting the transparency parameter (through mapscript) like
> this:
> 
> $layer->set("transparency",90);
> 
> and it appears solid.
> 
> Version:
> 
> [vinko at landsat vinko]#/builds/mapserver/mapserv -v
> MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=GDAL
> INPUT=SHAPEFILE
> 
> I know i should use 3.6-beta, but i'd like to know if my method is right
> before recompiling.
> 
> --
> Vinko Vrsalovic <vinko[@]cprsig.cl>
> http://www.cprsig.cl




More information about the mapserver-users mailing list