Merge pull request #19396 from stonio/patch-6

[OpenLayers] Add definition for new method map.getFeaturesAtPixel()
This commit is contained in:
Mine Starks
2017-08-28 15:19:43 -07:00
committed by GitHub

View File

@@ -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 <https://github.com/osechet>, Guilhem Brouat <https://github.com/ganlhi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -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<ol.Feature|ol.render.Feature>|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