diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index f9593fcb09..9dbecea094 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -7,6 +7,7 @@ // Chad Johnston // Dan Manastireanu // Yair Tawil +// Pierre Marchand // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Definitions partially generated using tsd-jsdoc (https://github.com/englercj/tsd-jsdoc) @@ -2797,7 +2798,7 @@ declare module ol { * @returns {!ol.format.filter.EqualTo} `` operator. * @api */ - function equalTo(propertyName: string, expression: string|number, opt_matchCase?: boolean): ol.format.filter.EqualTo; + function equalTo(propertyName: string, expression: string | number, opt_matchCase?: boolean): ol.format.filter.EqualTo; /** * Creates a `` comparison operator. @@ -2808,7 +2809,7 @@ declare module ol { * @returns {!ol.format.filter.NotEqualTo} `` operator. * @api */ - function notEqualTo(propertyName: string, expression: string|number, opt_matchCase?: boolean): ol.format.filter.NotEqualTo; + function notEqualTo(propertyName: string, expression: string | number, opt_matchCase?: boolean): ol.format.filter.NotEqualTo; /** * Creates a `` comparison operator. @@ -3028,7 +3029,7 @@ declare module ol { * Abstract class; normally only used for creating subclasses and not instantiated in apps. * Base class for WFS GetFeature n-ary logical filters. */ - class LogicalNary extends ol.format.filter.Filter {} + class LogicalNary extends ol.format.filter.Filter { } /** * @classdesc @@ -3062,16 +3063,16 @@ declare module ol { * @api */ class Or extends ol.format.filter.LogicalNary { - /** - * @classdesc - * Represents a logical operator between two or more filter conditions. - * - * @constructor - * @param {!ol.format.filter.Filter} conditions Conditions - * @extends {ol.format.filter.LogicalNary} - * @api - */ - constructor(...conditions: ol.format.filter.Filter[]); + /** + * @classdesc + * Represents a logical operator between two or more filter conditions. + * + * @constructor + * @param {!ol.format.filter.Filter} conditions Conditions + * @extends {ol.format.filter.LogicalNary} + * @api + */ + constructor(...conditions: ol.format.filter.Filter[]); } /** @@ -3139,7 +3140,7 @@ declare module ol { * @extends {ol.format.filter.Comparison} * @api */ - constructor(tagName: string, propertyName: string, expression: string|number, opt_matchCase?: boolean); + constructor(tagName: string, propertyName: string, expression: string | number, opt_matchCase?: boolean); } /** @@ -3165,7 +3166,7 @@ declare module ol { * @extends {ol.format.filter.ComparisonBinary} * @api */ - constructor(propertyName: string, expression: string|number, opt_matchCase?: boolean); + constructor(propertyName: string, expression: string | number, opt_matchCase?: boolean); } /** @@ -3287,7 +3288,7 @@ declare module ol { * @extends {ol.format.filter.ComparisonBinary} * @api */ - constructor(propertyName: string, expression: string|number, opt_matchCase?: boolean); + constructor(propertyName: string, expression: string | number, opt_matchCase?: boolean); } /** @@ -7414,7 +7415,7 @@ declare module ol { getFeaturesAtPixel( pixel: ol.Pixel, opt_options?: olx.AtPixelOptions - ): (Array|null); + ): (Array | null); /** * Detect layers that have a color value at a pixel on the viewport, and @@ -13566,6 +13567,21 @@ declare module olx { } + /** + * @enum {string} + * Render mode for vector layers: + * * `'image'`: Vector layers are rendered as images. Great performance, but + * point symbols and texts are always rotated with the view and pixels are + * scaled during zoom animations. + * * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering + * even during animations, but slower performance. + * Default is `vector`. + * @type {ol.layer.VectorRenderType|string|undefined} + * @api + */ + type VectorRenderType = "image" | "vector"; + + /** * @typedef {{renderOrder: (function(ol.Feature, ol.Feature):number|null|undefined), * minResolution: (number|undefined), @@ -13581,6 +13597,7 @@ declare module olx { * zIndex: (number|undefined)}} */ interface VectorOptions { + renderMode?: (olx.layer.VectorRenderType | string); renderOrder?: (feature1: ol.Feature, feature2: ol.Feature) => number; map?: ol.Map; extent?: ol.Extent;