Add ol.source.Vector#forEachFeature function
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
@exportClass ol.source.Vector ol.source.VectorOptions
|
||||
@exportProperty ol.source.Vector.prototype.addFeature
|
||||
@exportProperty ol.source.Vector.prototype.forEachFeature
|
||||
@exportProperty ol.source.Vector.prototype.getAllFeaturesAtCoordinate
|
||||
|
||||
@@ -68,6 +68,17 @@ ol.source.Vector.prototype.addFeature = function(feature) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(this: T, ol.Feature): S} f Callback.
|
||||
* @param {T=} opt_obj The object to be used a the value of 'this' within f.
|
||||
* @return {S|undefined}
|
||||
* @template T,S
|
||||
*/
|
||||
ol.source.Vector.prototype.forEachFeature = function(f, opt_obj) {
|
||||
return this.rBush_.forEach(f, opt_obj);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Coordinate} coordinate Coordinate.
|
||||
* @param {function(this: T, ol.Feature): S} f Callback.
|
||||
|
||||
Reference in New Issue
Block a user