Add optional layerFunction to ol.Map#forEachFeatureAtPixel

This commit is contained in:
Tom Payne
2013-12-02 16:59:10 +01:00
parent 5acc673c68
commit 9d57b53c0f
2 changed files with 20 additions and 8 deletions
+11 -4
View File
@@ -459,12 +459,19 @@ ol.Map.prototype.disposeInternal = function() {
* @param {ol.Pixel} pixel Pixel.
* @param {function(this: S, ol.Feature, ol.layer.Layer): T} callback Feature
* callback.
* @param {S=} opt_obj Scope.
* @param {S=} opt_obj Scope for feature callback.
* @param {function(this: U, ol.layer.Layer): boolean=} opt_layerFunction Layer
* function, only layers which are visible and for which this function
* returns `true` will be tested for features. By default, all visible
* layers will be tested.
* @param {U=} opt_obj2 Scope for layer function.
* @return {T|undefined} Callback result.
* @template S,T
* @template S,T,U
*/
ol.Map.prototype.forEachFeatureAtPixel = function(pixel, callback, opt_obj) {
return this.renderer_.forEachFeatureAtPixel(pixel, callback, opt_obj);
ol.Map.prototype.forEachFeatureAtPixel =
function(pixel, callback, opt_obj, opt_layerFunction, opt_obj2) {
return this.renderer_.forEachFeatureAtPixel(
pixel, callback, opt_obj, opt_layerFunction, opt_obj2);
};