Use the layer's projection.
In setMap, the layer gets the map's projection if it doesn't have its own. And since a layer can have a different SRS code than the map (but a compatible one, i.e. with OpenLayers.Projection.transforms[mapProj][layerProj] being OpenLayer.Projection.nullTransform), the axis order can be different.
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user