make filterMap_ static as proposed by @tschaub

This commit is contained in:
Bart van den Eijnden
2013-07-09 13:34:23 +02:00
parent c299bfa1cb
commit 31fd41ab14

View File

@@ -379,7 +379,15 @@ ol.parser.ogc.Filter_v1 = function() {
}
}
};
this.filterMap_ = {
goog.base(this);
};
goog.inherits(ol.parser.ogc.Filter_v1, ol.parser.XML);
/**
* @private
*/
ol.parser.ogc.Filter_v1.filterMap_ = {
'&&': 'And',
'||': 'Or',
'!': 'Not',
@@ -401,9 +409,6 @@ ol.parser.ogc.Filter_v1 = function() {
'ieq': 'PropertyIsEqualTo',
'ineq': 'PropertyIsNotEqualTo'
};
goog.base(this);
};
goog.inherits(ol.parser.ogc.Filter_v1, ol.parser.XML);
/**
@@ -443,7 +448,7 @@ ol.parser.ogc.Filter_v1.prototype.getFilterType_ = function(filter) {
} else if (filter instanceof ol.expr.Not) {
type = '!';
}
var filterType = this.filterMap_[type];
var filterType = ol.parser.ogc.Filter_v1.filterMap_[type];
if (!filterType) {
throw new Error('Filter writing not supported for rule type: ' + type);
}