Add ol.renderer.webgl.ImageLayer#forEachFeatureAtPixel
This commit is contained in:
@@ -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
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user