From f89fb1f226861196685a5eb41f51aefbdf9c458e Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 3 Aug 2010 09:15:26 +0000 Subject: [PATCH] make yx property an object rather than an array. r=elemoine,bartvde (closes #2767) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10569 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/WMS.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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()]); }, /**