Avoid pixel->coord->pixel conversion

This commit is contained in:
tsauerwein
2015-01-29 11:33:57 +01:00
parent 054227fd26
commit 4d4bed454a
10 changed files with 27 additions and 25 deletions

View File

@@ -57,7 +57,7 @@ ol.renderer.Layer.prototype.forEachFeatureAtPixel = goog.nullFunction;
/**
* @param {ol.Coordinate} coordinate Coordinate.
* @param {ol.Pixel} pixel Pixel.
* @param {olx.FrameState} frameState Frame state.
* @param {function(this: S, ol.layer.Layer): T} callback Layer callback.
* @param {S} thisArg Value to use as `this` when executing `callback`.
@@ -65,7 +65,8 @@ ol.renderer.Layer.prototype.forEachFeatureAtPixel = goog.nullFunction;
* @template S,T
*/
ol.renderer.Layer.prototype.forEachLayerAtPixel =
function(coordinate, frameState, callback, thisArg) {
function(pixel, frameState, callback, thisArg) {
var coordinate = this.getMap().getCoordinateFromPixel(pixel);
var hasFeature = this.forEachFeatureAtPixel(
coordinate, frameState, goog.functions.TRUE, this);