[OpenLayers-Users] Transparency for WMS layers cached with GeoWebcache

springrider springrider at hotmail.com
Thu Oct 9 11:00:31 EDT 2008


Good afternoon,
I am trying to setup some transparency for a layer which is cached by GWC.
This is my code:

var options = { maxExtent: new OpenLayers.Bounds(-180,-90,180,90),
                                        units: 'degrees',
                                        projection: "EPSG:4326",
                                        maxResolution: 0.703125
                  };
var map = new OpenLayers.Map('map',options);
       
var wms = new OpenLayers.Layer.WMS("All Areas","/figis/geoserver/wms?",
                                                               
{layers:'fifao:FAO_DIV',
                                                                format:
'image/jpeg'},{buffer: 0, isBaseLayer: true, wrapDateLine: true, singleTile:
true});
       
       
var wms3 = new
OpenLayers.Layer.WMS("Countries","/figis/geoserver/gwc/service/wms?service=wms",
                                                               
{layers:'fifao:UN_CONTINENT',
                                                               
transparent:true,
                                                                format:
'image/jpeg'},{buffer: 0,opacity: 0.85,isBaseLayer: false, wrapDateLine:
true});
       
var wms_continent_background = new
OpenLayers.Layer.WMS("Background","/figis/geoserver/wms?service=wms",
                                                                {layers:
'fifao:ISO3_COUNTRY',
                                                               
format:'image/jpeg',
                                                               
transparent:true,
                                                               
"cql_filter":"ISO_3='EUR'"},{buffer: 0, wrapDateLine: true, isBaseLayer:
false, singleTile: true});
       
map.addLayer(wms);
map.addLayer(wms3);
map.addLayer(wms_continent_background);
       
map.zoomToMaxExtent();

In that configuration, FAO_DIV and ISO3_COUNTRY are the only layers to be
displayed.

When i remove the transparency option for the UN_CONTINENT layer, the map is
correctly generated but FAO_DIV which is my base layer can only be seen
partially:
http://www.nabble.com/file/p19900780/Untitled-2opy.jpg 

I really need to have this UN_CONTINENT to be transparent. I know it can be
done.

Could someone tell me how to put this layer which is cached by GWC as
transparent in my configuration?

Thanks a lot in advance

Sylvain
OL 2.6
Geoserver+GWC:1.7-RC3
Oracle Locator DB
-- 
View this message in context: http://www.nabble.com/Transparency-for-WMS-layers-cached-with-GeoWebcache-tp19900780p19900780.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list