diff --git a/lib/OpenLayers/Layer/WMS.js b/lib/OpenLayers/Layer/WMS.js index 6a283b2a61..2de8a95966 100644 --- a/lib/OpenLayers/Layer/WMS.js +++ b/lib/OpenLayers/Layer/WMS.js @@ -175,7 +175,7 @@ OpenLayers.Layer.WMS = OpenLayers.Class(OpenLayers.Layer.Grid, { * {Boolean} true if the axis order is reversed, false otherwise. */ reverseAxisOrder: function() { - var projCode = this.map.getProjectionObject().getCode(); + var projCode = this.projection.getCode(); return parseFloat(this.params.VERSION) >= 1.3 && !!(this.yx[projCode] || OpenLayers.Projection.defaults[projCode].yx); }, diff --git a/tests/Control/WMSGetFeatureInfo.html b/tests/Control/WMSGetFeatureInfo.html index 7bdbc05625..5e7801b036 100644 --- a/tests/Control/WMSGetFeatureInfo.html +++ b/tests/Control/WMSGetFeatureInfo.html @@ -290,19 +290,19 @@ function test_mixedParams(t) { t.plan(5); var map = new OpenLayers.Map("map", { - getExtent: function() {return(new OpenLayers.Bounds(-180,-90,180,90));}, - getProjectionObject: function() {return new OpenLayers.Projection("EPSG:4326");} + getExtent: function() {return(new OpenLayers.Bounds(-180,-90,180,90));} }); + var geographic = new OpenLayers.Projection("EPSG:4326"); var a = new OpenLayers.Layer.WMS("dummy","http://localhost/wms", { layers: "a,b,c,d", styles: "a,b,c,d" - }, {map: map}); + }, {projection: geographic}); var b = new OpenLayers.Layer.WMS("dummy","http://localhost/wms", { layers: ["a","b","c","d"], styles: ["a","b","c","d"] - }, {map: map}); + }, {projection: geographic}); var c = new OpenLayers.Layer.WMS("dummy","http://localhost/wms", { layers: ["a","b","c","d"] @@ -310,13 +310,13 @@ var d = new OpenLayers.Layer.WMS("dummy","http://localhost/wms", { layers: "a,b,c,d" - }, {map: map}); + }, {projection: geographic}); var click = new OpenLayers.Control.WMSGetFeatureInfo({ featureType: 'type', featureNS: 'ns', layers: [a, b, c, d] - }, {map: map}); + }, {projection: geographic}); map.addControl(click);