diff --git a/lib/OpenLayers/Layer/WMS.js b/lib/OpenLayers/Layer/WMS.js index 80ce2223b1..80f74e4228 100644 --- a/lib/OpenLayers/Layer/WMS.js +++ b/lib/OpenLayers/Layer/WMS.js @@ -66,11 +66,11 @@ OpenLayers.Layer.WMS = OpenLayers.Class(OpenLayers.Layer.Grid, { /** * Property: yx - * {Array} Array of strings with the EPSG codes for which the axis order - * is to be reversed (yx instead of xy, LatLon instead of LonLat). This - * is only relevant for WMS versions >= 1.3.0. + * {Object} Keys in this object are EPSG codes for which the axis order + * is to be reversed (yx instead of xy, LatLon instead of LonLat), with + * true as value. This is only relevant for WMS versions >= 1.3.0. */ - yx: ['EPSG:4326'], + yx: {'EPSG:4326': true}, /** * Constructor: OpenLayers.Layer.WMS @@ -166,8 +166,7 @@ OpenLayers.Layer.WMS = OpenLayers.Class(OpenLayers.Layer.Grid, { */ reverseAxisOrder: function() { return (parseFloat(this.params.VERSION) >= 1.3 && - OpenLayers.Util.indexOf(this.yx, - this.map.getProjectionObject().getCode()) !== -1) + !!this.yx[this.map.getProjectionObject().getCode()]); }, /**