SLD maps minScaleDenominator and maxScaleDenominator to rule minScale and maxScale. r=tschaub (closes #1297)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5964 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -106,6 +106,7 @@ OpenLayers.Format.SLD = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
OpenLayers.Util.applyDefaults(options, {
|
||||
withNamedLayer: false,
|
||||
overrideDefaultStyleKey: true
|
||||
@@ -206,7 +207,7 @@ OpenLayers.Format.SLD = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
if (filter && filter.length > 0) {
|
||||
var rule = this.parseFilter(filter[0]);
|
||||
} else {
|
||||
// rule applies to all features
|
||||
// rule applies to all features (no filter or ElseFilter)
|
||||
var rule = new OpenLayers.Rule();
|
||||
}
|
||||
rule.name = name;
|
||||
@@ -218,7 +219,8 @@ OpenLayers.Format.SLD = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
xmlNode, this.sldns, "MinScaleDenominator"
|
||||
);
|
||||
if (minScale && minScale.length > 0) {
|
||||
rule.minScale = parseFloat(this.getChildValue(minScale[0]));
|
||||
rule.minScaleDenominator =
|
||||
parseFloat(this.getChildValue(minScale[0]));
|
||||
}
|
||||
|
||||
// MaxScaleDenominator
|
||||
@@ -226,7 +228,8 @@ OpenLayers.Format.SLD = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
xmlNode, this.sldns, "MaxScaleDenominator"
|
||||
);
|
||||
if (maxScale && maxScale.length > 0) {
|
||||
rule.maxScale = parseFloat(this.getChildValue(maxScale[0]));
|
||||
rule.maxScaleDenominator =
|
||||
parseFloat(this.getChildValue(maxScale[0]));
|
||||
}
|
||||
|
||||
// STYLES
|
||||
|
||||
Reference in New Issue
Block a user