diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index 8cea0f342e..261dfe50d6 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -435,6 +435,18 @@ OpenLayers.Layer.prototype = { Math.round(1/resolution * (extent.top - lonlat.lat)) ); }, + + /** + * Sets the opacity for the entire layer (all images) + * @param {Float} opacity + */ + setOpacity: function(opacity) { + this.opacity = opacity; + for(var i=0; i