When writing a WMC, bounds should not be rounded to a predefined precision, original patch by bbinet, r=me (closes #2242)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9703 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -39,11 +39,11 @@
|
||||
node = wmc.write_wmc_Layer(layer);
|
||||
minList = wmc.getElementsByTagNameNS(node, sldNS, "MinScaleDenominator");
|
||||
t.eq(minList.length, 1, "(resolutions) node written with MinScaleDenominator");
|
||||
t.eq(layer.maxScale.toPrecision(10), wmc.getChildValue(minList[0]),
|
||||
t.eq(layer.maxScale.toPrecision(16), wmc.getChildValue(minList[0]),
|
||||
"(resolutions) node written with correct MinScaleDenominator value");
|
||||
maxList = wmc.getElementsByTagNameNS(node, sldNS, "MaxScaleDenominator");
|
||||
t.eq(maxList.length, 1, "(resolutions) node written with MaxScaleDenominator");
|
||||
t.eq(layer.minScale.toPrecision(10), wmc.getChildValue(maxList[0]),
|
||||
t.eq(layer.minScale.toPrecision(16), wmc.getChildValue(maxList[0]),
|
||||
"(resolutions) node written with correct MaxScaleDenominator value");
|
||||
|
||||
layer = new OpenLayers.Layer.WMS(
|
||||
@@ -56,11 +56,11 @@
|
||||
minList = wmc.getElementsByTagNameNS(node, sldNS, "MinScaleDenominator");
|
||||
var f = new OpenLayers.Format.XML();
|
||||
t.eq(minList.length, 1, "(scales) node written with MinScaleDenominator");
|
||||
t.eq(layer.maxScale.toPrecision(10), wmc.getChildValue(minList[0]),
|
||||
t.eq(layer.maxScale.toPrecision(16), wmc.getChildValue(minList[0]),
|
||||
"(scales) node written with correct MinScaleDenominator value");
|
||||
maxList = wmc.getElementsByTagNameNS(node, sldNS, "MaxScaleDenominator");
|
||||
t.eq(maxList.length, 1, "(scales) node written with MaxScaleDenominator");
|
||||
t.eq(layer.minScale.toPrecision(10), wmc.getChildValue(maxList[0]),
|
||||
t.eq(layer.minScale.toPrecision(16), wmc.getChildValue(maxList[0]),
|
||||
"(scales) node written with correct MaxScaleDenominator value");
|
||||
|
||||
layer.metadataURL = 'http://foo';
|
||||
|
||||
Reference in New Issue
Block a user