Transparency behind rendered vectors
ender at titan.lab.csuchico.edu
ender at titan.lab.csuchico.edu
Fri Jul 21 05:41:07 PDT 2000
I believe what you want is the image produced by the mapserver to have a
transparent background. If this is so, you only need to put a transparent
tag in the map object:
map
... map settings ...
transparent on
... more map settings ...
Layer
... blah, blah, blah ...
end
end
This will set the background color to be transparent.
-Aaron
On Fri, 21 Jul 2000, Doug Nebert wrote:
> This is close, but not quite. I am rendering line data from a
> shapefile, but through mapserver it is sent as an opaque GIF. I need
> the background to be a transparent GIF. Can the invocation of GD be
> tweaked to make this work from a setting in the map file?
>
> Doug.
>
> owner-mapserver-users at lists.gis.umn.edu wrote:
> >
> > Doug,
> >
> > Transparency for raster layers is defined with the
> > OFFSITE keyword. The value is the color number
> > the image's palette.
> >
> > e.g.
> > LAYER
> > NAME ortho
> > TYPE RASTER
> > STATUS DEFAULT
> > DATA "83P_01s_10TM.tif"
> > OFFSITE 2
> > END
> >
> > means the third color (since there is a color index 0)
> > in the image's pallete for this layer is to be considered
> > transparent when reading the tif file and writing the
> > pixels into the target GIF (i.e tif pixels with color index 3
> > are not written into the GIF).
> >
> > Funny thing is, this is from old mapserver 3.2
> > documentation (and email). I couldn't find it in the 3.3
> > doc.
> >
> > Hope this helps...
> >
> > Brent Fraser
> >
> > bfraser at geoanalytic.com
> > GeoAnalytic Inc.
> > #300 , 700 - 4th Avenue SW Calgary, AB
> > Canada T2P 3J4
> > Tel: (403)213-2700 Fax: (403)213-2707
> > www.geoanalytic.com
> >
> > ----- Original Message -----
> > From: "Doug Nebert" <ddnebert at fgdc.gov>
> > To: "Mapserver Users" <mapserver-users at lists.gis.umn.edu>
> > Sent: Friday, July 21, 2000 1:20 PM
> > Subject: Transparency
> >
> > > All:
> > >
> > > I would like to manufacture certain layers as being transparent outside
> > > of the opaque features so they can be overlain on similar maps from
> > > other servers. I want roads opaque, background transparent.
> > >
> > > Is there a correct way to specify the transparent color bin to use,
> > > through mapfile or other setting? I am using mapserv with the old
> > > gd that supports GIF format. I understand that the PNG files use a
> > > different method for transparency, but would hope that this is
> > > defined in a single way via map file. Is it defined at all?
> > >
> > > Doug.
> > >
> > > --
> > > Douglas D. Nebert
> > > Geospatial Data Clearinghouse Coordinator
> > > FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755
> > > Pager Messaging: http://clearinghouse3.fgdc.gov/dougmsg.html
>
> --
> Douglas D. Nebert
> Geospatial Data Clearinghouse Coordinator
> FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755
> Pager Messaging: http://clearinghouse3.fgdc.gov/dougmsg.html
>
More information about the MapServer-users
mailing list