From 374d5f99f6f227dbc0b36c1eb8f3046ea5f16f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 2 Dec 2013 12:58:02 +0100 Subject: [PATCH] Add ol.Map#forEachFeatureAtPixel --- src/ol/map.exports | 1 + src/ol/map.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/ol/map.exports b/src/ol/map.exports index 15614cc858..582049a70f 100644 --- a/src/ol/map.exports +++ b/src/ol/map.exports @@ -4,6 +4,7 @@ @exportProperty ol.Map.prototype.addLayer @exportProperty ol.Map.prototype.addOverlay @exportProperty ol.Map.prototype.beforeRender +@exportProperty ol.Map.prototype.forEachFeatureAtPixel @exportProperty ol.Map.prototype.getControls @exportProperty ol.Map.prototype.getEventCoordinate @exportProperty ol.Map.prototype.getEventPixel diff --git a/src/ol/map.js b/src/ol/map.js index 2e95d3522f..18e7818346 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -455,6 +455,15 @@ ol.Map.prototype.disposeInternal = function() { }; +/** + * @param {ol.Pixel} pixel Pixel. + * @param {function(ol.Feature)} callback Feature callback. + */ +ol.Map.prototype.forEachFeatureAtPixel = function(pixel, callback) { + this.renderer_.forEachFeatureAtPixel(pixel, callback); +}; + + /** * Freeze rendering. */