add definition/instantiation protection for if anyone ever wants to subclass off of WMS.js

git-svn-id: http://svn.openlayers.org/trunk/openlayers@492 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-06-01 11:14:29 +00:00
parent c7aee7fd25
commit aa4d877688

View File

@@ -23,8 +23,15 @@ OpenLayers.Layer.WMS.prototype =
* @param {hash} params
*/
initialize: function(name, url, params) {
OpenLayers.Layer.Grid.prototype.initialize.apply(this, arguments);
OpenLayers.Util.applyDefaults(this.params, this.DEFAULT_PARAMS);
var newArguments = new Array();
if (arguments.length > 0) {
newArguments.push(name, url, params);
}
OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
if (arguments.length > 0) {
OpenLayers.Util.applyDefaults(this.params, this.DEFAULT_PARAMS);
}
},
/**