From f42342f0026ec1ac34072491a884f9870b97bc27 Mon Sep 17 00:00:00 2001 From: stonio Date: Mon, 28 Aug 2017 18:31:39 +0200 Subject: [PATCH 1/2] Add definition for method getFeaturesAtPixel --- types/openlayers/index.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index 3e151ac32c..2baf3a73e5 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -6771,6 +6771,18 @@ declare module ol { opt_options?: olx.AtPixelOptions ): (T); + /** + * Get all features that intersect a pixel on the viewport. + * @param {ol.Pixel} pixel Pixel. + * @param {olx.AtPixelOptions=} opt_options Optional options. + * @return {?Array.<(ol.Feature|ol.render.Feature)>} The detected features or null if none were found. + * @api stable + */ + getFeaturesAtPixel( + pixel: ol.Pixel, + opt_options?: olx.AtPixelOptions + ): (Array|null); + /** * Detect layers that have a color value at a pixel on the viewport, and * execute a callback with each matching layer. Layers included in the From 1556a470f04810d8e3289ab78c7f2f9dda556410 Mon Sep 17 00:00:00 2001 From: stonio Date: Mon, 28 Aug 2017 20:30:16 +0200 Subject: [PATCH 2/2] Update version of Typescript definition --- types/openlayers/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index 2baf3a73e5..7a6ca787f7 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for OpenLayers v4.1.0 +// Type definitions for OpenLayers v4.3.0 // Project: http://openlayers.org/ // Definitions by: Olivier Sechet , Guilhem Brouat // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped