Revert "Implement ol.renderer.Layer#forEachFeatureAtCoordinate"
This reverts commit dd07fd7977.
This commit is contained in:
@@ -52,6 +52,28 @@ ol.renderer.canvas.ImageLayer = function(imageLayer) {
|
|||||||
goog.inherits(ol.renderer.canvas.ImageLayer, ol.renderer.canvas.Layer);
|
goog.inherits(ol.renderer.canvas.ImageLayer, ol.renderer.canvas.Layer);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
ol.renderer.canvas.ImageLayer.prototype.forEachFeatureAtCoordinate =
|
||||||
|
function(coordinate, frameState, callback, thisArg) {
|
||||||
|
var layer = this.getLayer();
|
||||||
|
var source = layer.getSource();
|
||||||
|
var resolution = frameState.viewState.resolution;
|
||||||
|
var rotation = frameState.viewState.rotation;
|
||||||
|
var skippedFeatureUids = frameState.skippedFeatureUids;
|
||||||
|
return source.forEachFeatureAtCoordinate(
|
||||||
|
coordinate, resolution, rotation, skippedFeatureUids,
|
||||||
|
/**
|
||||||
|
* @param {ol.Feature} feature Feature.
|
||||||
|
* @return {?} Callback result.
|
||||||
|
*/
|
||||||
|
function(feature) {
|
||||||
|
return callback.call(thisArg, feature, layer);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -43,6 +43,28 @@ ol.renderer.dom.ImageLayer = function(imageLayer) {
|
|||||||
goog.inherits(ol.renderer.dom.ImageLayer, ol.renderer.dom.Layer);
|
goog.inherits(ol.renderer.dom.ImageLayer, ol.renderer.dom.Layer);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
ol.renderer.dom.ImageLayer.prototype.forEachFeatureAtCoordinate =
|
||||||
|
function(coordinate, frameState, callback, thisArg) {
|
||||||
|
var layer = this.getLayer();
|
||||||
|
var source = layer.getSource();
|
||||||
|
var resolution = frameState.viewState.resolution;
|
||||||
|
var rotation = frameState.viewState.rotation;
|
||||||
|
var skippedFeatureUids = frameState.skippedFeatureUids;
|
||||||
|
return source.forEachFeatureAtCoordinate(
|
||||||
|
coordinate, resolution, rotation, skippedFeatureUids,
|
||||||
|
/**
|
||||||
|
* @param {ol.Feature} feature Feature.
|
||||||
|
* @return {?} Callback result.
|
||||||
|
*/
|
||||||
|
function(feature) {
|
||||||
|
return callback.call(thisArg, feature, layer);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -48,24 +48,7 @@ goog.inherits(ol.renderer.Layer, ol.Observable);
|
|||||||
* @return {T|undefined} Callback result.
|
* @return {T|undefined} Callback result.
|
||||||
* @template S,T
|
* @template S,T
|
||||||
*/
|
*/
|
||||||
ol.renderer.Layer.prototype.forEachFeatureAtCoordinate =
|
ol.renderer.Layer.prototype.forEachFeatureAtCoordinate = goog.nullFunction;
|
||||||
function(coordinate, frameState, callback, thisArg) {
|
|
||||||
var layer = this.getLayer();
|
|
||||||
var source = layer.getSource();
|
|
||||||
var resolution = frameState.viewState.resolution;
|
|
||||||
var rotation = frameState.viewState.rotation;
|
|
||||||
var skippedFeatureUids = frameState.skippedFeatureUids;
|
|
||||||
return source.forEachFeatureAtCoordinate(
|
|
||||||
coordinate, resolution, rotation, skippedFeatureUids,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {ol.Feature} feature Feature.
|
|
||||||
* @return {?} Callback result.
|
|
||||||
*/
|
|
||||||
function(feature) {
|
|
||||||
return callback.call(thisArg, feature, layer);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -71,6 +71,29 @@ ol.renderer.webgl.ImageLayer.prototype.createTexture_ = function(image) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
ol.renderer.webgl.ImageLayer.prototype.forEachFeatureAtCoordinate =
|
||||||
|
function(coordinate, frameState, callback, thisArg) {
|
||||||
|
var layer = this.getLayer();
|
||||||
|
var source = layer.getSource();
|
||||||
|
var resolution = frameState.viewState.resolution;
|
||||||
|
var rotation = frameState.viewState.rotation;
|
||||||
|
var skippedFeatureUids = frameState.skippedFeatureUids;
|
||||||
|
return source.forEachFeatureAtCoordinate(
|
||||||
|
coordinate, resolution, rotation, skippedFeatureUids,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {ol.Feature} feature Feature.
|
||||||
|
* @return {?} Callback result.
|
||||||
|
*/
|
||||||
|
function(feature) {
|
||||||
|
return callback.call(thisArg, feature, layer);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user