diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index 4d75d1f974..df8032e001 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -11,6 +11,9 @@ OpenLayers.Layer.prototype = { // OpenLayers.Map map: null, + // str -- projection for use in WFS, WMS, etc. + projection: null, + /** * @param {str} name */ diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index c443d554f0..a262f02ffb 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -210,7 +210,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), { */ getFullRequestString:function(params) { var requestString = ""; - + this.params.srs = this.projection; // concat tile params with layer params and convert to string var allParams = Object.extend(params, this.params); var paramsString = OpenLayers.Util.getParameterString(allParams); diff --git a/lib/OpenLayers/Layer/WMS.js b/lib/OpenLayers/Layer/WMS.js index 8c5674f764..8fc220ba64 100644 --- a/lib/OpenLayers/Layer/WMS.js +++ b/lib/OpenLayers/Layer/WMS.js @@ -9,7 +9,6 @@ OpenLayers.Layer.WMS.prototype = DEFAULT_PARAMS: { service: "WMS", version: "1.1.1", request: "GetMap", - srs: "EPSG:4326", styles: "", exceptions: "application/vnd.ogc.se_inimage", format: "image/jpeg" diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 9ce8b2bf90..510b1b133d 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -27,6 +27,9 @@ OpenLayers.Map.prototype = { // float maxResolution: .3515625, // degrees per pixel + /* projection */ + projection: "EPSG:4326", + // DOMElement: the div that our map lives in div: null, @@ -113,6 +116,7 @@ OpenLayers.Map.prototype = { */ addLayer: function (layer, zIndex) { layer.map = this; + layer.projection = this.projection; layer.div.style.overflow = ""; if (zIndex) { layer.div.style.zIndex = zIndex;