fix up sequence of elements in Web Map Context 1.1 Format when writing, thanks trondmm for the catch and initial patch, r=tschaub (closes #2174)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9614 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2009-08-07 15:59:43 +00:00
parent 01d4330c81
commit 5964a8db60
4 changed files with 58 additions and 26 deletions

View File

@@ -95,7 +95,7 @@ OpenLayers.Format.WMC.v1_1_0 = OpenLayers.Class(
this.namespaces.sld, "sld:MinScaleDenominator"
);
minSD.appendChild(this.createTextNode(layer.maxScale.toPrecision(10)));
node.insertBefore(minSD, node.childNodes[3]);
node.appendChild(minSD);
}
if(layer.options.resolutions || layer.options.scales ||
@@ -104,8 +104,17 @@ OpenLayers.Format.WMC.v1_1_0 = OpenLayers.Class(
this.namespaces.sld, "sld:MaxScaleDenominator"
);
maxSD.appendChild(this.createTextNode(layer.minScale.toPrecision(10)));
node.insertBefore(maxSD, node.childNodes[4]);
node.appendChild(maxSD);
}
// optional FormatList element
node.appendChild(this.write_wmc_FormatList(layer));
// optional StyleList element
node.appendChild(this.write_wmc_StyleList(layer));
// OpenLayers specific properties go in an Extension element
node.appendChild(this.write_wmc_LayerExtension(layer));
return node;