Add min/maxResolution properties to rule options

This commit is contained in:
Tim Schaub
2013-09-27 11:45:43 +02:00
parent 2878309a41
commit 78c54addb3
3 changed files with 45 additions and 0 deletions
+6
View File
@@ -700,6 +700,12 @@
/**
* @typedef {Object} ol.style.RuleOptions
* @property {ol.expr.Expression|string|undefined} filter Filter.
* @property {number|undefined} maxResolution Optional maximum resolution. If
* a value is provided, the rule will apply at resolutions less than
* this value.
* @property {number|undefined} minResolution Optional minimum resolution. If
* a value is provided, the rule will apply at resolutions greater than or
* equal to this value.
* @property {Array.<ol.style.Symbolizer>|undefined} symbolizers Symbolizers.
*/
+14
View File
@@ -39,6 +39,20 @@ ol.style.Rule = function(options) {
this.symbolizers_ = goog.isDef(options.symbolizers) ?
options.symbolizers : [];
/**
* @type {number}
* @private
*/
this.minResolution_ = goog.isDef(options.minResolution) ?
options.minResolution : 0;
/**
* @type {number}
* @private
*/
this.maxResolution_ = goog.isDef(options.maxResolution) ?
options.maxResolution : Infinity;
};