Merge pull request #2992 from pgiraud/tilevector_featureatcoordinate

Add support for finding features at a given coordinates for vector tiles - fixes
This commit is contained in:
Pierre GIRAUD
2014-12-02 08:54:46 +01:00
+4 -4
View File
@@ -106,7 +106,7 @@ ol.source.TileVector.prototype.forEachFeature = goog.abstractMethod;
* @return {S|undefined} The return value from the last call to the callback. * @return {S|undefined} The return value from the last call to the callback.
* @template T,S * @template T,S
*/ */
ol.source.TileVector.prototype.forEachFeatureAtCoordinateAtResolution = ol.source.TileVector.prototype.forEachFeatureAtCoordinateAndResolution =
function(coordinate, resolution, callback, opt_this) { function(coordinate, resolution, callback, opt_this) {
var tileGrid = this.tileGrid_; var tileGrid = this.tileGrid_;
@@ -203,12 +203,12 @@ ol.source.TileVector.prototype.getFeatures = function() {
* @param {ol.Coordinate} coordinate Coordinate. * @param {ol.Coordinate} coordinate Coordinate.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @return {Array.<ol.Feature>} Features. * @return {Array.<ol.Feature>} Features.
* @api stable * @api
*/ */
ol.source.TileVector.prototype.getFeaturesAtCoordinateAtResolution = ol.source.TileVector.prototype.getFeaturesAtCoordinateAndResolution =
function(coordinate, resolution) { function(coordinate, resolution) {
var features = []; var features = [];
this.forEachFeatureAtCoordinateAtResolution(coordinate, resolution, this.forEachFeatureAtCoordinateAndResolution(coordinate, resolution,
/** /**
* @param {ol.Feature} feature Feature. * @param {ol.Feature} feature Feature.
*/ */