Pass layer to forEachFeatureAtPixel callback

This fixes a bug where the layer renderer instead of the layer is passed to the forEachFeatureAtPixel callback.
This commit is contained in:
Éric Lemoine
2014-01-17 11:24:39 +01:00
parent e83ec2976f
commit 2a531136fc
3 changed files with 3 additions and 3 deletions
@@ -58,7 +58,7 @@ ol.renderer.canvas.ImageLayer.prototype.forEachFeatureAtPixel =
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {
return callback.call(thisArg, feature, this); return callback.call(thisArg, feature, layer);
}); });
}; };
+1 -1
View File
@@ -63,7 +63,7 @@ ol.renderer.dom.ImageLayer.prototype.forEachFeatureAtPixel =
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {
return callback.call(thisArg, feature, this); return callback.call(thisArg, feature, layer);
}); });
}; };
@@ -89,7 +89,7 @@ ol.renderer.webgl.ImageLayer.prototype.forEachFeatureAtPixel =
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {
return callback.call(thisArg, feature, this); return callback.call(thisArg, feature, layer);
}); });
}; };