Add ol.renderer.canvas.ImageLayer#forEachFeatureAtPixel
This commit is contained in:
@@ -41,6 +41,27 @@ ol.renderer.canvas.ImageLayer = function(mapRenderer, imageLayer) {
|
||||
goog.inherits(ol.renderer.canvas.ImageLayer, ol.renderer.canvas.Layer);
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.renderer.canvas.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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user