Add ol.source.Vector#getAllFeaturesAtCoordinate
This commit is contained in:
@@ -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.
|
* @param {ol.Extent} extent Extent.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
|
|||||||
Reference in New Issue
Block a user