diff --git a/lib/OpenLayers/Format/WMC.js b/lib/OpenLayers/Format/WMC.js index 9ce9d48b08..cac71e91f9 100644 --- a/lib/OpenLayers/Format/WMC.js +++ b/lib/OpenLayers/Format/WMC.js @@ -34,6 +34,13 @@ OpenLayers.Format.WMC = OpenLayers.Class({ * capabilities document. */ layerOptions: null, + + /** + * Property: layerParams + * {Object} Default parameters for layers created by the parser. This + * can be used to override DEFAULT_PARAMS for OpenLayers.Layer.WMS. + */ + layerParams: null, /** * Property: parser diff --git a/lib/OpenLayers/Format/WMC/v1.js b/lib/OpenLayers/Format/WMC/v1.js index ee906578fa..b172dbabe5 100644 --- a/lib/OpenLayers/Format/WMC/v1.js +++ b/lib/OpenLayers/Format/WMC/v1.js @@ -166,7 +166,7 @@ OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, { */ read_wmc_Layer: function(context, node) { var layerInfo = { - params: {}, + params: this.layerParams || {}, options: { visibility: (node.getAttribute("hidden") != "1"), queryable: (node.getAttribute("queryable") == "1")