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:
@@ -539,10 +539,10 @@ OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
node.appendChild(this.createElementDefaultNS(
|
||||
"BoundingBox", null,
|
||||
{
|
||||
minx: bounds.left.toPrecision(10),
|
||||
miny: bounds.bottom.toPrecision(10),
|
||||
maxx: bounds.right.toPrecision(10),
|
||||
maxy: bounds.top.toPrecision(10),
|
||||
minx: bounds.left.toPrecision(18),
|
||||
miny: bounds.bottom.toPrecision(18),
|
||||
maxx: bounds.right.toPrecision(18),
|
||||
maxy: bounds.top.toPrecision(18),
|
||||
SRS: context.projection
|
||||
}
|
||||
));
|
||||
@@ -570,10 +570,10 @@ OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
this.namespaces.ol, "ol:maxExtent"
|
||||
);
|
||||
this.setAttributes(maxExtent, {
|
||||
minx: bounds.left.toPrecision(10),
|
||||
miny: bounds.bottom.toPrecision(10),
|
||||
maxx: bounds.right.toPrecision(10),
|
||||
maxy: bounds.top.toPrecision(10)
|
||||
minx: bounds.left.toPrecision(18),
|
||||
miny: bounds.bottom.toPrecision(18),
|
||||
maxx: bounds.right.toPrecision(18),
|
||||
maxy: bounds.top.toPrecision(18)
|
||||
});
|
||||
node.appendChild(maxExtent);
|
||||
}
|
||||
@@ -662,10 +662,10 @@ OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
this.namespaces.ol, "ol:maxExtent"
|
||||
);
|
||||
this.setAttributes(maxExtent, {
|
||||
minx: bounds.left.toPrecision(10),
|
||||
miny: bounds.bottom.toPrecision(10),
|
||||
maxx: bounds.right.toPrecision(10),
|
||||
maxy: bounds.top.toPrecision(10)
|
||||
minx: bounds.left.toPrecision(18),
|
||||
miny: bounds.bottom.toPrecision(18),
|
||||
maxx: bounds.right.toPrecision(18),
|
||||
maxy: bounds.top.toPrecision(18)
|
||||
});
|
||||
node.appendChild(maxExtent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user