Adding layerParams property to WMC options. This lets WMC users set params to be used on WMS layers that are different from the WMS layer defaults and not present in the WMC doc. Thanks for the patch bartvde. r=me (closes #1513)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8922 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-03-01 15:32:47 +00:00
parent 97e55039ea
commit 654291ecff
2 changed files with 8 additions and 1 deletions

View File

@@ -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

View File

@@ -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")