Added additional sensible defaults to Layer.WMS.DEFAULT_PARAMS, and fixed constructor to only set defaults on param keys that aren't already set (e.g. format). Added tests, which pass.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@112 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2006-05-17 20:58:00 +00:00
parent 11e66c0286
commit 4d0179df50
2 changed files with 11 additions and 6 deletions

View File

@@ -8,7 +8,9 @@ OpenLayers.Layer.WMS.prototype =
version: "1.1.1",
request: "GetMap",
srs: "EPSG:4326",
exceptions: "application/vnd.ogc.se_inimage"
styles: "",
exceptions: "application/vnd.ogc.se_inimage",
format: "image/jpeg"
},
/**
@@ -18,7 +20,7 @@ OpenLayers.Layer.WMS.prototype =
*/
initialize: function(name, url, params) {
OpenLayers.Layer.Grid.prototype.initialize.apply(this, arguments);
Object.extend(this.params, this.DEFAULT_PARAMS);
OpenLayers.Util.applyDefaults( this.params, this.DEFAULT_PARAMS );
},
/**