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:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user