[OpenLayers-Users] Printing WMS Layers - Opacity causing issues

Andrew Stewart Andrew.Stewart at reddeer.ca
Mon Jan 30 18:18:34 EST 2012


Good afternoon,

I am having an issue printing layers when using opacity for WMS layer. It seems that when 2 of my area features are added to the same map only 1 of them can have opacity for both to print properly. If I add opacity to both layers, none of them print. If however only 1 layer has opacity then they both show up. Has anyone encountered this before and has any solution? The only thing I have that works is to combine both the WMS layers into one single layer  (using typenames of both to combine) except now this only has 1 opacity when both layers originally have different values.

Appreciate any advice,

My map is declared as -

map_print = new OpenLayers.Map("map", {
                controls: [],
                maxExtent: new OpenLayers.Bounds(-5621.0164289504, 5778375.8585485, 31216.186095582, 5808291.3979497),
                maxScale: 100,
                allOverlays: true,
                minScale: 125000,
                maxResolution: "auto",
                numZoomLevels: 31,
                fractionalZoom: true,
                units: "m",
                projection: new OpenLayers.Projection("EPSG:3776"),
                displayProjection: new OpenLayers.Projection("EPSG:3776")


And my WMS layers get added like so -

                        layer_Print = new OpenLayers.Layer.WMS(original.layers[num].name, wms, {
                                    layers: typenames,
                                    VERSION: "1.3.0",
                                    transparent: true
                                    },{
                                        isBaseLayer: false,
                                        singleTile: true,
                                        visibility: true,
                                        buffer: 1,
                                        ratio: 1,
                                        title: "Ortho Image"
                                    });
                                    layer_Print.setOpacity(opacity);
                                    map_print.addLayer(layer_Print);







-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120130/fa1cd33e/attachment.html


More information about the Users mailing list