Move projection information storage to map. Layer/Grid.js sets the projection when it creates a tile url, and it's no longer in the default params of WMS.js.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@240 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -11,6 +11,9 @@ OpenLayers.Layer.prototype = {
|
|||||||
// OpenLayers.Map
|
// OpenLayers.Map
|
||||||
map: null,
|
map: null,
|
||||||
|
|
||||||
|
// str -- projection for use in WFS, WMS, etc.
|
||||||
|
projection: null,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {str} name
|
* @param {str} name
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
|
|||||||
*/
|
*/
|
||||||
getFullRequestString:function(params) {
|
getFullRequestString:function(params) {
|
||||||
var requestString = "";
|
var requestString = "";
|
||||||
|
this.params.srs = this.projection;
|
||||||
// concat tile params with layer params and convert to string
|
// concat tile params with layer params and convert to string
|
||||||
var allParams = Object.extend(params, this.params);
|
var allParams = Object.extend(params, this.params);
|
||||||
var paramsString = OpenLayers.Util.getParameterString(allParams);
|
var paramsString = OpenLayers.Util.getParameterString(allParams);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ OpenLayers.Layer.WMS.prototype =
|
|||||||
DEFAULT_PARAMS: { service: "WMS",
|
DEFAULT_PARAMS: { service: "WMS",
|
||||||
version: "1.1.1",
|
version: "1.1.1",
|
||||||
request: "GetMap",
|
request: "GetMap",
|
||||||
srs: "EPSG:4326",
|
|
||||||
styles: "",
|
styles: "",
|
||||||
exceptions: "application/vnd.ogc.se_inimage",
|
exceptions: "application/vnd.ogc.se_inimage",
|
||||||
format: "image/jpeg"
|
format: "image/jpeg"
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ OpenLayers.Map.prototype = {
|
|||||||
// float
|
// float
|
||||||
maxResolution: .3515625, // degrees per pixel
|
maxResolution: .3515625, // degrees per pixel
|
||||||
|
|
||||||
|
/* projection */
|
||||||
|
projection: "EPSG:4326",
|
||||||
|
|
||||||
// DOMElement: the div that our map lives in
|
// DOMElement: the div that our map lives in
|
||||||
div: null,
|
div: null,
|
||||||
|
|
||||||
@@ -113,6 +116,7 @@ OpenLayers.Map.prototype = {
|
|||||||
*/
|
*/
|
||||||
addLayer: function (layer, zIndex) {
|
addLayer: function (layer, zIndex) {
|
||||||
layer.map = this;
|
layer.map = this;
|
||||||
|
layer.projection = this.projection;
|
||||||
layer.div.style.overflow = "";
|
layer.div.style.overflow = "";
|
||||||
if (zIndex) {
|
if (zIndex) {
|
||||||
layer.div.style.zIndex = zIndex;
|
layer.div.style.zIndex = zIndex;
|
||||||
|
|||||||
Reference in New Issue
Block a user