Format.WMC: protect against MinScaleDenominator of 0, r=tschaub thanks tschaub for the updated patch, tests still pass in FF 3.5 and Safari 4 (closes #2028)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10024 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -57,7 +57,10 @@ OpenLayers.Format.WMC.v1_1_0 = OpenLayers.Class(
|
||||
* node - {Element} An element node.
|
||||
*/
|
||||
read_sld_MinScaleDenominator: function(layerContext, node) {
|
||||
layerContext.maxScale = this.getChildValue(node);
|
||||
var minScaleDenominator = parseFloat(this.getChildValue(node));
|
||||
if (minScaleDenominator > 0) {
|
||||
layerContext.maxScale = minScaleDenominator;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -69,7 +72,7 @@ OpenLayers.Format.WMC.v1_1_0 = OpenLayers.Class(
|
||||
* node - {Element} An element node.
|
||||
*/
|
||||
read_sld_MaxScaleDenominator: function(layerContext, node) {
|
||||
layerContext.minScale = this.getChildValue(node);
|
||||
layerContext.minScale = parseFloat(this.getChildValue(node));
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user