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:
@@ -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"
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user