Only write out min/max scale related properties if they are explicitly set on the layer. Thanks for slapping Safari around a bit with this on crschmidt. Works but still untested there. r=crschmidt (closes #1314)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6033 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -89,17 +89,23 @@ OpenLayers.Format.WMC.v1_1_0 = OpenLayers.Class(
|
||||
);
|
||||
|
||||
// min/max scale denominator elements go before the 4th element in v1
|
||||
var minSD = this.createElementNS(
|
||||
this.namespaces.sld, "sld:MinScaleDenominator"
|
||||
);
|
||||
minSD.appendChild(this.createTextNode(layer.maxScale.toPrecision(10)));
|
||||
node.insertBefore(minSD, node.childNodes[3]);
|
||||
if(layer.options.resolutions || layer.options.scales ||
|
||||
layer.options.minResolution || layer.options.maxScale) {
|
||||
var minSD = this.createElementNS(
|
||||
this.namespaces.sld, "sld:MinScaleDenominator"
|
||||
);
|
||||
minSD.appendChild(this.createTextNode(layer.maxScale.toPrecision(10)));
|
||||
node.insertBefore(minSD, node.childNodes[3]);
|
||||
}
|
||||
|
||||
var maxSD = this.createElementNS(
|
||||
this.namespaces.sld, "sld:MaxScaleDenominator"
|
||||
);
|
||||
maxSD.appendChild(this.createTextNode(layer.minScale.toPrecision(10)));
|
||||
node.insertBefore(maxSD, node.childNodes[4]);
|
||||
if(layer.options.resolutions || layer.options.scales ||
|
||||
layer.options.maxResolution || layer.options.minScale) {
|
||||
var maxSD = this.createElementNS(
|
||||
this.namespaces.sld, "sld:MaxScaleDenominator"
|
||||
);
|
||||
maxSD.appendChild(this.createTextNode(layer.minScale.toPrecision(10)));
|
||||
node.insertBefore(maxSD, node.childNodes[4]);
|
||||
}
|
||||
|
||||
return node;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user