[OpenLayers-Users] transparent & WMS.POST

Sascha Müller olaiya at arcor.de
Fri Aug 13 05:37:28 EDT 2010



Hi,

I use:

Openlayers: 2.9
GeoExt: trunk
GeoServer: 1.7.7

I used following code:
...
var addlayer = new OpenLayers.Layer.WMS.POST(
                         layers_array[i][0],
                         layers_array[i][1],
                         {
                             layers           : layers_array[i][2],
                             format           : 'image/png',
                             transparent      : true
                         },
                         {
                             isBaseLayer      : layers_array[i][3],
                             visibility       : layers_array[i][4],
                             buffer           : 0,
                             singleTile       : true,
                             transitionEffect : "resize"
                         }
                     );
                     map.addLayer(addlayer);
...

If I try to set the transparency of one these layers, the transparency 
is not that what I expected. Only the color changed to to more brigther.

With this code:
...
var addlayer = new OpenLayers.Layer.WMS(
                         layers_array[i][0],
                         layers_array[i][1],
                         {
                             layers           : layers_array[i][2],
                             format           : 'image/png',
                             transparent      : true
                         },
                         {
                             isBaseLayer      : layers_array[i][3],
                             visibility       : layers_array[i][4],
                             buffer           : 0,
                             singleTile       : true,
                             transitionEffect : "resize"
                         }
                     );
                     map.addLayer(addlayer);
...

Everything works how it should. The transparency looks transparency.

Is this behavior intended or a bug?

regards,

Sascha




More information about the Users mailing list