correctly parse ScaleHint values from WMS GetCapabilities response, thanks elemoine for the testcase, r=elemoine (closes #2150)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9571 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2009-07-20 12:32:31 +00:00
parent f4d60b89a8
commit 2c8ec98643
2 changed files with 39 additions and 4 deletions

View File

@@ -184,10 +184,10 @@ OpenLayers.Format.WMSCapabilities.v1_1 = OpenLayers.Class(
var rad2 = Math.pow(2, 0.5);
var ipm = OpenLayers.INCHES_PER_UNIT["m"];
layer.maxScale = parseFloat(
((rad2 * min) * ipm * OpenLayers.DOTS_PER_INCH).toPrecision(13)
((min / rad2) * ipm * OpenLayers.DOTS_PER_INCH).toPrecision(13)
);
layer.minScale = parseFloat(
((rad2 * max) * ipm * OpenLayers.DOTS_PER_INCH).toPrecision(13)
((max / rad2) * ipm * OpenLayers.DOTS_PER_INCH).toPrecision(13)
);
},
@@ -311,4 +311,4 @@ OpenLayers.Format.WMSCapabilities.v1_1 = OpenLayers.Class(
CLASS_NAME: "OpenLayers.Format.WMSCapabilities.v1_1"
});
});