Add ol.source.Vector#clear

This commit is contained in:
Tom Payne
2013-12-04 14:59:30 +01:00
parent ae3ab95b56
commit 79c6787e52
2 changed files with 28 additions and 0 deletions

View File

@@ -81,6 +81,16 @@ ol.source.Vector.prototype.addFeature = function(feature) {
};
/**
* FIXME empty description for jsdoc
*/
ol.source.Vector.prototype.clear = function() {
this.rBush_.forEach(this.removeFeatureInternal_, this);
this.rBush_.clear();
this.dispatchChangeEvent();
};
/**
* @param {function(this: T, ol.Feature): S} f Callback.
* @param {T=} opt_obj The object to be used as the value of 'this' within f.