Add ol.source.Vector#getAllFeaturesAtCoordinate

This commit is contained in:
Tom Payne
2013-11-11 18:05:58 +01:00
parent afca110b49
commit 0221fd2216

View File

@@ -111,6 +111,19 @@ ol.source.Vector.prototype.forEachFeatureInExtent =
};
/**
* @param {ol.Coordinate} coordinate Coordinate.
* @return {Array.<ol.Feature>} Features.
*/
ol.source.Vector.prototype.getAllFeaturesAtCoordinate = function(coordinate) {
var features = [];
this.forEachFeatureAtCoordinate(coordinate, function(feature) {
features.push(feature);
});
return features;
};
/**
* @param {ol.Extent} extent Extent.
* @return {Array.<ol.Feature>} Features.