add name and title to ol.style.Rule

This commit is contained in:
Bart van den Eijnden
2013-10-11 16:49:39 +02:00
committed by Bart van den Eijnden
parent 9a6c1feddc
commit c75082c75d
3 changed files with 35 additions and 6 deletions
+30
View File
@@ -54,6 +54,20 @@ ol.style.Rule = function(options) {
this.maxResolution_ = goog.isDef(options.maxResolution) ?
options.maxResolution : Infinity;
/**
* @type {?string}
* @private
*/
this.name_ = goog.isDef(options.name) ?
options.name : null;
/**
* @type {?string}
* @private
*/
this.title_ = goog.isDef(options.title) ?
options.title : null;
};
@@ -102,3 +116,19 @@ ol.style.Rule.prototype.getMinResolution = function() {
ol.style.Rule.prototype.getMaxResolution = function() {
return this.maxResolution_;
};
/**
* @return {?string}
*/
ol.style.Rule.prototype.getName = function() {
return this.name_;
};
/**
* @return {?string}
*/
ol.style.Rule.prototype.getTitle = function() {
return this.title_;
};