Add ol.renderer.webgl.ImageLayer#forEachFeatureAtPixel

This commit is contained in:
Éric Lemoine
2014-01-13 11:50:23 +01:00
parent a15bacd963
commit 6c30710d0c

View File

@@ -72,6 +72,27 @@ ol.renderer.webgl.ImageLayer.prototype.createTexture_ = function(image) {
};
/**
* @inheritDoc
*/
ol.renderer.webgl.ImageLayer.prototype.forEachFeatureAtPixel =
function(coordinate, frameState, callback, opt_obj) {
var layer = this.getLayer();
var source = layer.getSource();
goog.asserts.assertInstanceof(source, ol.source.Image);
var extent = frameState.extent;
var resolution = frameState.view2DState.resolution;
var rotation = frameState.view2DState.rotation;
return source.forEachFeatureAtPixel(extent, resolution, rotation, coordinate,
/**
* @param {ol.Feature} feature Feature.
*/
function(feature) {
return callback.call(opt_obj, feature, this);
});
};
/**
* @inheritDoc
*/