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:
@@ -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 );
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user