[Tilecache] Why are MapServer layers not transparent and yet the same layer via a MapServer WMS are?

Greg Cocks gcocks at stoller.com
Thu Jun 5 13:16:38 EDT 2008


Hello,

 

I am setting up an OpenLayers map, reasonably new to this - and can't
get the vector data via MapServer directly to be transparent if linked
directly - but CAN if go using the MapServer as a WMS?? (note that both
methods do show the layer in the web map.)

 

Seems weird, but maybe I missed something in the constructors? (sic?)

 

Any thoughts?

 

Here are some code snippets; not that I also tried "isBaseLayer: false"
with no 'help'...

 

Thanks in advance...

 

var mapserver_path = [

 
'/cgi-bin/mapserv.exe?map=c:/Inetpub/wwwroot/MapServer/WMS/munge.map'

                     ];

 

var mapserver_wms_path = [

 
'/cgi-bin/mapserv.exe?map=c:/Inetpub/wwwroot/MapServer/WMS/munge.map&ser
vice=WMS&'

                         ];

.

.

.

 

/* vector layer is NOT transparent */

var centres1 = new OpenLayers.Layer.MapServer (

                                                "Munge Site Centre/s",

                                                mapserver_path,

                                                {

                                                  layers:
'munge_site_centres',

                                                  format:
'image/png',

  transparent:  true

                                                },

                                                {

                                                  singleTile:   true

                                                  }

                                             );

map.addLayer(centres1);

centres1.setVisibility(false);

 

 

/* vector layer IS transparent */

var centres2 = new OpenLayers.Layer.WMS (

                                          "Munge Site Centre/s",

                                          mapserver_wms_path,

                                          {

                                            layers:
'munge_site_centres',

                                            format:       'image/png',

                                            transparent:  true

                                          },

                                          {

                                            singleTile:   true

                                          );

map.addLayer(centres2);

centres2.setVisibility(false);

 

.

.

.

 

----------

Regards,

GREG COCKS

GIS Analyst V

gcocks at stoller.com

S. M. Stoller Corp

105 Technology Drive, Suite 190

Broomfield, CO 80021

www.stoller.com

303-546-4300

303-443-1408 fax

303-546-4422 direct

303-828-7576 cell

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20080605/563c95fa/attachment.html


More information about the Tilecache mailing list