diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts
index 8a711771fa..a01f6b25ad 100644
--- a/types/openlayers/index.d.ts
+++ b/types/openlayers/index.d.ts
@@ -18,14 +18,14 @@ declare type GlobalObject = Object;
*/
declare module ol {
/**
- * Error object thrown when an assertion failed. This is an ECMA-262 Error,
- * extended with a `code` property.
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error}
- * @constructor
- * @extends {Error}
- * @implements {oli.AssertionError}
- * @param {number} code Error code.
- */
+ * Error object thrown when an assertion failed. This is an ECMA-262 Error,
+ * extended with a `code` property.
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error}
+ * @constructor
+ * @extends {Error}
+ * @implements {oli.AssertionError}
+ * @param {number} code Error code.
+ */
class AssertionError extends Error {
/**
* Error object thrown when an assertion failed. This is an ECMA-262 Error,
@@ -47,7 +47,6 @@ declare module ol {
* @api
*/
code: number;
-
}
/**
@@ -101,7 +100,6 @@ declare module ol {
* @api stable
*/
getHTML(): string;
-
}
/**
@@ -237,24 +235,22 @@ declare module ol {
* @api stable
*/
setAt(index: number, elem: T): void;
-
}
module Collection {
-
type EventType = string;
/**
- * @classdesc
- * Events emitted by {@link ol.Collection} instances are instances of this
- * type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.Collection.Event}
- * @param {ol.Collection.EventType} type Type.
- * @param {*=} opt_element Element.
- */
+ * @classdesc
+ * Events emitted by {@link ol.Collection} instances are instances of this
+ * type.
+ *
+ * @constructor
+ * @extends {ol.events.Event}
+ * @implements {oli.Collection.Event}
+ * @param {ol.Collection.EventType} type Type.
+ * @param {*=} opt_element Element.
+ */
class Event extends ol.events.Event {
/**
* @classdesc
@@ -275,7 +271,6 @@ declare module ol {
* @api stable
*/
element: any;
-
}
}
@@ -304,7 +299,6 @@ declare module ol {
* @api
*/
function asString(color: (ol.Color | string)): string;
-
}
/**
@@ -319,7 +313,6 @@ declare module ol {
* @api
*/
function asColorLike(color: (ol.Color | ol.ColorLike)): ol.ColorLike;
-
}
/**
@@ -391,7 +384,6 @@ declare module ol {
* @api stable
*/
getCollapsed(): boolean;
-
}
/**
@@ -481,7 +473,6 @@ declare module ol {
* @api
*/
setTarget(target: (Element | string)): void;
-
}
/**
@@ -520,7 +511,6 @@ declare module ol {
* @api stable
*/
constructor(opt_options?: olx.control.FullScreenOptions);
-
}
/**
@@ -610,7 +600,6 @@ declare module ol {
* @api stable
*/
setProjection(projection: ol.proj.Projection): void;
-
}
/**
@@ -676,7 +665,6 @@ declare module ol {
* @api
*/
getOverviewMap(): ol.Map;
-
}
/**
@@ -711,7 +699,6 @@ declare module ol {
* @api
*/
static render(mapEvent: ol.MapEvent): void;
-
}
/**
@@ -781,10 +768,10 @@ declare module ol {
type Property = string;
/**
- * Units for the scale line. Supported values are `'degrees'`, `'imperial'`,
- * `'nautical'`, `'metric'`, `'us'`.
- * @enum {string}
- */
+ * Units for the scale line. Supported values are `'degrees'`, `'imperial'`,
+ * `'nautical'`, `'metric'`, `'us'`.
+ * @enum {string}
+ */
type Units = "degrees" | "imperial" | "nautical" | "metric" | "us";
}
@@ -812,7 +799,6 @@ declare module ol {
* @api stable
*/
constructor(opt_options?: olx.control.ZoomOptions);
-
}
/**
@@ -851,7 +837,6 @@ declare module ol {
* @api
*/
static render(mapEvent: ol.MapEvent): void;
-
}
/**
@@ -876,9 +861,7 @@ declare module ol {
* @api stable
*/
constructor(opt_options?: olx.control.ZoomToExtentOptions);
-
}
-
}
/**
@@ -1020,7 +1003,6 @@ declare module ol {
* @api stable
*/
function toStringXY(coordinate?: ol.Coordinate, opt_fractionDigits?: number): string;
-
}
/**
@@ -1188,7 +1170,6 @@ declare module ol {
* @api
*/
setTracking(tracking: boolean): void;
-
}
/**
@@ -1201,7 +1182,6 @@ declare module ol {
* @constructor
*/
constructor();
-
}
/**
@@ -1250,7 +1230,6 @@ declare module ol {
* @api
*/
function upAndDown(t: number): number;
-
}
/**
@@ -1409,7 +1388,6 @@ declare module ol {
* @api
*/
function primaryAction(mapBrowserEvent: ol.MapBrowserEvent): boolean;
-
}
/**
@@ -1470,7 +1448,6 @@ declare module ol {
* @api stable
*/
stopPropagation(): void;
-
}
/**
@@ -1511,9 +1488,7 @@ declare module ol {
* @extends {ol.Disposable}
*/
constructor();
-
}
-
}
/**
@@ -1700,7 +1675,6 @@ declare module ol {
* @api stable
*/
function applyTransform(extent: ol.Extent, transformFn: ol.TransformFunction, opt_extent?: ol.Extent): ol.Extent;
-
}
/**
@@ -1890,7 +1864,6 @@ declare module ol {
* @api stable
*/
setGeometryName(name: string): void;
-
}
/**
@@ -1919,14 +1892,12 @@ declare module ol {
* @api
*/
function xhr(url: (string | ol.FeatureUrlFunction), format: ol.format.Feature): ol.FeatureLoader;
-
}
/**
* @namespace ol.format
*/
module format {
-
/**
* @classdesc
* Feature format for reading and writing data in the EsriJSON format.
@@ -2055,7 +2026,6 @@ declare module ol {
* @api
*/
writeFeaturesObject(features: ol.Feature[], opt_options?: olx.format.WriteOptions): GlobalObject;
-
}
type EsriJSONGeometry = JSON;
@@ -2086,7 +2056,6 @@ declare module ol {
* @api stable
*/
constructor();
-
}
type GeoJSONFeature = JSON;
@@ -2222,7 +2191,6 @@ declare module ol {
* @api stable
*/
writeGeometryObject(geometry: ol.geom.Geometry, opt_options?: olx.format.WriteOptions): (GeoJSONGeometry | GeoJSONGeometryCollection);
-
}
/**
@@ -2273,7 +2241,6 @@ declare module ol {
* @api
*/
writeFeaturesNode(features: ol.Feature[], opt_options?: olx.format.WriteOptions): Node;
-
}
/**
@@ -2298,7 +2265,6 @@ declare module ol {
* @api
*/
constructor(opt_options?: olx.format.GMLOptions);
-
}
/**
@@ -2358,7 +2324,6 @@ declare module ol {
* @api
*/
writeFeaturesNode(features: ol.Feature[], opt_options?: olx.format.WriteOptions): Node;
-
}
/**
@@ -2402,7 +2367,6 @@ declare module ol {
* @api stable
*/
readFeatures(source: (Document | Node | GlobalObject | string), opt_options?: olx.format.ReadOptions): ol.Feature[];
-
}
/**
@@ -2486,7 +2450,6 @@ declare module ol {
* @api
*/
writeFeaturesNode(features: ol.Feature[], opt_options?: olx.format.WriteOptions): Node;
-
}
/**
@@ -2548,7 +2511,6 @@ declare module ol {
* @api
*/
readProjection(source: (Document | Node | GlobalObject | string)): ol.proj.Projection;
-
}
/**
@@ -2571,7 +2533,6 @@ declare module ol {
* @extends {ol.format.Feature}
*/
constructor();
-
}
/**
@@ -2677,7 +2638,6 @@ declare module ol {
* @api
*/
writeFeaturesNode(features: ol.Feature[], opt_options?: olx.format.WriteOptions): Node;
-
}
/**
@@ -2719,7 +2679,6 @@ declare module ol {
* @api
*/
setLayers(layers: string[]): void;
-
}
module filter {
@@ -3497,7 +3456,6 @@ declare module ol {
* @api stable
*/
readProjection(source: (Document | Node | GlobalObject | string)): ol.proj.Projection;
-
}
/**
@@ -3633,7 +3591,6 @@ declare module ol {
* @api stable
*/
writeGeometry(geometry: ol.geom.Geometry, opt_options?: olx.format.WriteOptions): string;
-
}
/**
@@ -3656,7 +3613,6 @@ declare module ol {
* @extends {ol.format.Feature}
*/
constructor();
-
}
/**
@@ -3699,7 +3655,6 @@ declare module ol {
* @api stable
*/
readProjection(object: (Document | Node | GlobalObject | string)): ol.proj.Projection;
-
}
/**
@@ -3791,7 +3746,6 @@ declare module ol {
* @api stable
*/
readProjection(source: (Document | Node | GlobalObject | string)): ol.proj.Projection;
-
}
/**
@@ -3881,7 +3835,6 @@ declare module ol {
* @api stable
*/
writeGeometry(geometry: ol.geom.Geometry): string;
-
}
/**
@@ -3912,7 +3865,6 @@ declare module ol {
* @api
*/
read(source: (Document | Node | string)): GlobalObject;
-
}
/**
@@ -3948,7 +3900,6 @@ declare module ol {
* @api stable
*/
readFeatures(source: (Document | Node | GlobalObject | string), opt_options?: olx.format.ReadOptions): ol.Feature[];
-
}
/**
@@ -3979,7 +3930,6 @@ declare module ol {
* @api
*/
read(source: (Document | Node | string)): GlobalObject;
-
}
/**
@@ -3998,7 +3948,6 @@ declare module ol {
* @struct
*/
constructor();
-
}
/**
@@ -4021,9 +3970,7 @@ declare module ol {
* @extends {ol.format.Feature}
*/
constructor();
-
}
-
}
/**
@@ -4197,7 +4144,6 @@ declare module ol {
* @api stable
*/
setTrackingOptions(options: PositionOptions): void;
-
}
/**
@@ -4285,7 +4231,6 @@ declare module ol {
* @api
*/
setRadius(radius: number): void;
-
}
/**
@@ -4489,7 +4434,6 @@ declare module ol {
* @api
*/
translate(deltaX: number, deltaY: number): void;
-
}
/**
@@ -4551,7 +4495,6 @@ declare module ol {
* @api stable
*/
setCoordinates(coordinates: ol.Coordinate[], opt_layout?: ol.geom.GeometryLayout): void;
-
}
/**
@@ -4667,7 +4610,6 @@ declare module ol {
* @api stable
*/
setCoordinates(coordinates: ol.Coordinate[], opt_layout?: ol.geom.GeometryLayout): void;
-
}
/**
@@ -4772,7 +4714,6 @@ declare module ol {
* @api stable
*/
setCoordinates(coordinates: ol.Coordinate[][], opt_layout?: ol.geom.GeometryLayout): void;
-
}
/**
@@ -4853,7 +4794,6 @@ declare module ol {
* @api stable
*/
setCoordinates(coordinates: ol.Coordinate[], opt_layout?: ol.geom.GeometryLayout): void;
-
}
/**
@@ -4956,7 +4896,6 @@ declare module ol {
* @api stable
*/
setCoordinates(coordinates: ol.Coordinate[][][], opt_layout?: ol.geom.GeometryLayout): void;
-
}
/**
@@ -5015,7 +4954,6 @@ declare module ol {
* @api stable
*/
setCoordinates(coordinates: ol.Coordinate, opt_layout?: ol.geom.GeometryLayout): void;
-
}
/**
@@ -5163,7 +5101,6 @@ declare module ol {
* @api
*/
static fromCircle(circle: ol.geom.Circle, opt_sides?: number, opt_angle?: number): ol.geom.Polygon;
-
}
/**
@@ -5219,9 +5156,7 @@ declare module ol {
* @api stable
*/
translate(deltaX: number, deltaY: number): void;
-
}
-
}
/**
@@ -5267,7 +5202,6 @@ declare module ol {
* @api
*/
setMap(map: ol.Map): void;
-
}
/**
@@ -5324,7 +5258,6 @@ declare module ol {
* @api stable
*/
const WEBGL: boolean;
-
}
/**
@@ -5367,7 +5300,6 @@ declare module ol {
* @api
*/
load(): void;
-
}
/**
@@ -5390,7 +5322,6 @@ declare module ol {
* @param {Array.
} attributions Attributions.
*/
constructor(extent: ol.Extent, resolution: (number), pixelRatio: number, state: ol.ImageState, attributions: ol.Attribution[]);
-
}
type ImageState = number;
@@ -5422,7 +5353,6 @@ declare module ol {
* @api
*/
getImage(opt_context?: GlobalObject): (HTMLCanvasElement | HTMLImageElement | HTMLVideoElement);
-
}
/**
@@ -5483,7 +5413,6 @@ declare module ol {
* @api
*/
static handleEvent(mapBrowserEvent: ol.MapBrowserEvent): boolean;
-
}
/**
@@ -5518,7 +5447,6 @@ declare module ol {
* @api
*/
static handleEvent: any;
-
}
/**
@@ -5574,9 +5502,7 @@ declare module ol {
* @api
*/
projection: ol.proj.Projection;
-
}
-
}
type DragAndDropEventType = string;
@@ -5624,7 +5550,6 @@ declare module ol {
* @api stable
*/
getGeometry(): ol.geom.Polygon;
-
}
/**
@@ -5672,9 +5597,7 @@ declare module ol {
* @api
*/
mapBrowserEvent: ol.MapBrowserEvent;
-
}
-
}
type DragBoxEventType = string;
@@ -5699,7 +5622,6 @@ declare module ol {
* @api stable
*/
constructor(opt_options?: olx.interaction.DragPanOptions);
-
}
/**
@@ -5730,7 +5652,6 @@ declare module ol {
* @api stable
*/
constructor(opt_options?: olx.interaction.DragRotateOptions);
-
}
/**
@@ -5765,7 +5686,6 @@ declare module ol {
* @api stable
*/
constructor(opt_options?: olx.interaction.DragRotateAndZoomOptions);
-
}
/**
@@ -5798,7 +5718,6 @@ declare module ol {
* @api stable
*/
constructor(opt_options?: olx.interaction.DragZoomOptions);
-
}
/**
@@ -5836,9 +5755,7 @@ declare module ol {
* @api stable
*/
feature: ol.Feature;
-
}
-
}
type DrawEventType = string;
@@ -5912,7 +5829,6 @@ declare module ol {
* @api
*/
static createRegularPolygon(opt_sides?: number, opt_angle?: number): ol.DrawGeometryFunctionType;
-
}
/**
@@ -5999,7 +5915,6 @@ declare module ol {
* @api
*/
setActive(active: boolean): void;
-
}
/**
@@ -6049,7 +5964,6 @@ declare module ol {
* @api
*/
static handleEvent(mapBrowserEvent: ol.MapBrowserEvent): boolean;
-
}
/**
@@ -6099,7 +6013,6 @@ declare module ol {
* @api
*/
static handleEvent(mapBrowserEvent: ol.MapBrowserEvent): boolean;
-
}
/**
@@ -6148,9 +6061,7 @@ declare module ol {
* @api
*/
mapBrowserEvent: ol.MapBrowserEvent;
-
}
-
}
/**
@@ -6182,7 +6093,6 @@ declare module ol {
* @api
*/
removePoint(): boolean;
-
}
/**
@@ -6223,7 +6133,6 @@ declare module ol {
* @api
*/
setMouseAnchor(useAnchor: boolean): void;
-
}
/**
@@ -6248,7 +6157,6 @@ declare module ol {
* @api stable
*/
constructor(opt_options?: olx.interaction.PinchRotateOptions);
-
}
/**
@@ -6273,7 +6181,6 @@ declare module ol {
* @api stable
*/
constructor(opt_options?: olx.interaction.PinchZoomOptions);
-
}
/**
@@ -6319,7 +6226,6 @@ declare module ol {
* @api
*/
static handleEvent(mapBrowserEvent: ol.MapBrowserEvent): boolean;
-
}
/**
@@ -6377,9 +6283,7 @@ declare module ol {
* @api
*/
mapBrowserEvent: ol.MapBrowserEvent;
-
}
-
}
/**
@@ -6456,7 +6360,6 @@ declare module ol {
* @api stable
*/
setMap(map: ol.Map): void;
-
}
/**
@@ -6523,7 +6426,6 @@ declare module ol {
* @api
*/
removeFeature(feature: ol.Feature, opt_unlisten?: boolean): void;
-
}
/**
@@ -6571,9 +6473,7 @@ declare module ol {
* @api
*/
coordinate: ol.Coordinate;
-
}
-
}
type TranslateEventType = string;
@@ -6600,9 +6500,7 @@ declare module ol {
* @api
*/
constructor(options: olx.interaction.TranslateOptions);
-
}
-
}
/**
@@ -6631,7 +6529,6 @@ declare module ol {
* @api
*/
constructor(decay: number, minVelocity: number, delay: number);
-
}
/**
@@ -6766,7 +6663,6 @@ declare module ol {
* @api
*/
setZIndex(zindex: number): void;
-
}
/**
@@ -6813,7 +6709,6 @@ declare module ol {
* @api stable
*/
setLayers(layers: ol.Collection): void;
-
}
/**
@@ -6892,7 +6787,6 @@ declare module ol {
* @observable
*/
setRadius(radius: number): void;
-
}
/**
@@ -6925,7 +6819,6 @@ declare module ol {
* @api stable
*/
constructor(opt_options?: olx.layer.ImageOptions);
-
}
/**
@@ -7002,7 +6895,6 @@ declare module ol {
* @api stable
*/
setSource(source: ol.source.Source): void;
-
}
/**
@@ -7067,7 +6959,6 @@ declare module ol {
* @api
*/
setUseInterimTilesOnError(useInterimTilesOnError: boolean): void;
-
}
/**
@@ -7134,7 +7025,6 @@ declare module ol {
* @api stable
*/
setStyle(style: (ol.style.Style | ol.style.Style[] | ol.StyleFunction)): void;
-
}
/**
@@ -7210,9 +7100,7 @@ declare module ol {
* @api
*/
setUseInterimTilesOnError(useInterimTilesOnError: boolean): void;
-
}
-
}
/**
@@ -7246,7 +7134,6 @@ declare module ol {
* @api
*/
function tile(tileGrid: ol.tilegrid.TileGrid): ((extent: ol.Extent, i: number) => ol.Extent[]);
-
}
/**
@@ -7440,7 +7327,11 @@ declare module ol {
* @template S,T,U
* @api stable
*/
- forEachLayerAtPixel(pixel: ol.Pixel, callback: ((layer: ol.layer.Layer, color: ol.Color) => T), opt_this?: S, opt_layerFilter?: ((layer: ol.layer.Layer) => boolean), opt_this2?: U): (T);
+ forEachLayerAtPixel(pixel: ol.Pixel,
+ callback: ((layer: ol.layer.Layer, color: ol.Color) => T),
+ opt_this?: S,
+ opt_layerFilter?: ((layer: ol.layer.Layer) => boolean),
+ opt_this2?: U): (T);
/**
* Detect if features intersect a pixel on the viewport. Layers included in the
@@ -7672,7 +7563,6 @@ declare module ol {
* @api stable
*/
updateSize(): void;
-
}
/**
@@ -7736,7 +7626,6 @@ declare module ol {
* @api stable
*/
dragging: boolean;
-
}
/**
@@ -7749,7 +7638,6 @@ declare module ol {
* @param {?olx.FrameState=} opt_frameState Frame state.
*/
class MapBrowserPointerEvent extends ol.MapBrowserEvent {
-
// /**
// * @constructor
// * @extends {ol.MapBrowserEvent}
@@ -7808,7 +7696,6 @@ declare module ol {
* @api
*/
frameState: olx.FrameState;
-
}
/**
@@ -7850,7 +7737,6 @@ declare module ol {
* @api stable
*/
oldValue: any;
-
}
/**
@@ -7993,7 +7879,6 @@ declare module ol {
* @api stable
*/
unset(key: string, opt_silent?: boolean): void;
-
}
/**
@@ -8241,11 +8126,9 @@ declare module ol {
* @api stable
*/
setPositioning(positioning: ol.OverlayPositioning): void;
-
}
module pointer {
-
/**
* @classdesc
* A class for pointer events.
@@ -8319,7 +8202,6 @@ declare module ol {
* @namespace ol.proj
*/
module proj {
-
/**
* Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or
* `'us-ft'`.
@@ -8487,7 +8369,6 @@ declare module ol {
* @api
*/
getPointResolution(resolution: number, point: ol.Coordinate): number;
-
}
/**
@@ -8541,7 +8422,10 @@ declare module ol {
* the transformed {@link ol.Coordinate}.
* @api stable
*/
- function addCoordinateTransforms(source: ol.ProjectionLike, destination: ol.ProjectionLike, forward: ((coords: ol.Coordinate) => ol.Coordinate), inverse: ((coords: ol.Coordinate) => ol.Coordinate)): void;
+ function addCoordinateTransforms(source: ol.ProjectionLike,
+ destination: ol.ProjectionLike,
+ forward: ((coords: ol.Coordinate) => ol.Coordinate),
+ inverse: ((coords: ol.Coordinate) => ol.Coordinate)): void;
/**
* Transforms a coordinate from longitude/latitude to a different projection.
@@ -8730,9 +8614,7 @@ declare module ol {
* @api
*/
drawFeature(feature: ol.Feature, style: ol.style.Style): void;
-
}
-
}
/**
@@ -8787,7 +8669,6 @@ declare module ol {
* @api
*/
glContext: any;
-
}
type EventType = string;
@@ -8854,7 +8735,6 @@ declare module ol {
* @api
*/
getType(): ol.geom.GeometryType;
-
}
/**
@@ -8873,7 +8753,6 @@ declare module ol {
* @api
*/
constructor();
-
}
/**
@@ -8897,7 +8776,6 @@ declare module ol {
* @api
*/
function toContext(context: CanvasRenderingContext2D, opt_options?: olx.render.ToContextOptions): ol.render.canvas.Immediate;
-
}
/**
@@ -8945,7 +8823,6 @@ declare module ol {
* @api
*/
static TOS_ATTRIBUTION: ol.Attribution;
-
}
/**
@@ -8992,7 +8869,6 @@ declare module ol {
* @api
*/
setConfig(config: GlobalObject): void;
-
}
/**
@@ -9040,7 +8916,6 @@ declare module ol {
* @api
*/
setDistance(distance: number): void;
-
}
/**
@@ -9067,7 +8942,6 @@ declare module ol {
* @api
*/
constructor(options: ol.SourceImageOptions);
-
}
/**
@@ -9101,7 +8975,6 @@ declare module ol {
* @api
*/
image: ol.Image;
-
}
/**
@@ -9179,7 +9052,6 @@ declare module ol {
* @api stable
*/
updateParams(params: GlobalObject): void;
-
}
/**
@@ -9202,7 +9074,6 @@ declare module ol {
* @api
*/
constructor(options: olx.source.ImageCanvasOptions);
-
}
/**
@@ -9256,7 +9127,6 @@ declare module ol {
* @api
*/
setImageLoadFunction(imageLoadFunction: ol.ImageLoadFunctionType): void;
-
}
/**
@@ -9279,7 +9149,6 @@ declare module ol {
* @api stable
*/
constructor(options: olx.source.ImageStaticOptions);
-
}
/**
@@ -9354,7 +9223,6 @@ declare module ol {
* @api stable
*/
setStyle(style: (ol.style.Style | ol.style.Style[] | ol.StyleFunction)): void;
-
}
/**
@@ -9438,7 +9306,6 @@ declare module ol {
* @api stable
*/
updateParams(params: GlobalObject): void;
-
}
/**
@@ -9470,7 +9337,6 @@ declare module ol {
* @api
*/
static ATTRIBUTION: ol.Attribution;
-
}
/**
@@ -9508,7 +9374,6 @@ declare module ol {
* @api
*/
setOperation(operation: ol.RasterOperation, opt_lib?: GlobalObject): void;
-
}
/**
@@ -9559,7 +9424,6 @@ declare module ol {
* @api
*/
data: GlobalObject;
-
}
/**
@@ -9639,7 +9503,6 @@ declare module ol {
* @api
*/
setAttributions(attributions: (ol.AttributionLike)): void;
-
}
/**
@@ -9662,7 +9525,6 @@ declare module ol {
* @api stable
*/
constructor(options: olx.source.StamenOptions);
-
}
/**
@@ -9696,7 +9558,6 @@ declare module ol {
* @api stable
*/
getTileGrid(): ol.tilegrid.TileGrid;
-
}
/**
@@ -9730,7 +9591,6 @@ declare module ol {
* @api
*/
tile: ol.Tile;
-
}
/**
@@ -9778,7 +9638,6 @@ declare module ol {
* @api stable
*/
updateParams(params: GlobalObject): void;
-
}
/**
@@ -9809,7 +9668,6 @@ declare module ol {
* @api
*/
constructor(options: olx.source.TileDebugOptions);
-
}
/**
@@ -9855,7 +9713,6 @@ declare module ol {
* @api
*/
setTileGridForProjection(projection: ol.ProjectionLike, tilegrid: ol.tilegrid.TileGrid): void;
-
}
/**
@@ -9884,7 +9741,6 @@ declare module ol {
* @api
*/
getTileJSON(): TileJSON;
-
}
/**
@@ -9929,7 +9785,6 @@ declare module ol {
* @api
*/
forDataAtCoordinateAndResolution(coordinate: ol.Coordinate, resolution: number, callback: ((d: any) => any), opt_this?: T, opt_request?: boolean): void;
-
}
/**
@@ -9983,7 +9838,6 @@ declare module ol {
* @api stable
*/
updateParams(params: GlobalObject): void;
-
}
/**
@@ -10058,7 +9912,6 @@ declare module ol {
* @api stable
*/
setUrls(urls: string[]): void;
-
}
/**
@@ -10263,7 +10116,6 @@ declare module ol {
* @api stable
*/
removeFeature(feature: ol.Feature): void;
-
}
/**
@@ -10297,7 +10149,6 @@ declare module ol {
* @api stable
*/
feature: ol.Feature;
-
}
/**
@@ -10334,7 +10185,6 @@ declare module ol {
* @api
*/
constructor(options: olx.source.VectorTileOptions);
-
}
/**
@@ -10348,7 +10198,6 @@ declare module ol {
* @enum {string}
*/
type ServerType = "carmentaserver" | "geoserver" | "mapserver" | "qgis";
-
}
/**
@@ -10460,7 +10309,6 @@ declare module ol {
* @api
*/
static optionsFromCapabilities(wmtsCap: GlobalObject, config: GlobalObject): olx.source.WMTSOptions;
-
}
/**
@@ -10509,7 +10357,6 @@ declare module ol {
* @api stable
*/
constructor(opt_options?: olx.source.XYZOptions);
-
}
/**
@@ -10532,9 +10379,7 @@ declare module ol {
* @api stable
*/
constructor(opt_options?: olx.source.ZoomifyOptions);
-
}
-
}
/**
@@ -10542,14 +10387,12 @@ declare module ol {
* {@link ol.Sphere.getArea} functions.
*/
interface SphereMetricOptions {
-
/**
* Projection of the geometry. By default, the geometry is assumed to be in
* EPSG:3857 (Web Mercator).
*/
projection?: ol.proj.Projection;
-
/**
* Sphere radius. By default, the radius of the earth is used (Clarke 1866
* Authalic Sphere).
@@ -10557,7 +10400,6 @@ declare module ol {
* @api
*/
radius?: number;
-
}
/**
@@ -10724,7 +10566,7 @@ declare module ol {
* styles[ol.geom.GeometryType.POLYGON].concat(
* styles[ol.geom.GeometryType.POINT]
* );
- *```
+ * ```
*
* @namespace ol.style
*/
@@ -10765,7 +10607,6 @@ declare module ol {
* @param {olx.style.AtlasManagerOptions=} opt_options Options.
*/
constructor(opt_options?: olx.style.AtlasManagerOptions);
-
}
/**
@@ -10825,7 +10666,6 @@ declare module ol {
* @api
*/
setRadius(radius: number): void;
-
}
/**
@@ -10861,7 +10701,6 @@ declare module ol {
* @api
*/
setColor(color: (ol.Color | ol.ColorLike)): void;
-
}
/**
@@ -10938,7 +10777,6 @@ declare module ol {
* @api
*/
load(): void;
-
}
/**
@@ -11022,7 +10860,6 @@ declare module ol {
* @api
*/
setScale(scale: number): void;
-
}
/**
@@ -11115,7 +10952,6 @@ declare module ol {
* @api
*/
getStroke(): ol.style.Stroke;
-
}
/**
@@ -11238,7 +11074,6 @@ declare module ol {
* @api
*/
setWidth(width: (number)): void;
-
}
/**
@@ -11370,7 +11205,6 @@ declare module ol {
* @api
*/
setZIndex(zIndex: (number)): void;
-
}
/**
@@ -11548,9 +11382,7 @@ declare module ol {
* @api
*/
setTextBaseline(textBaseline: (string)): void;
-
}
-
}
/**
@@ -11589,7 +11421,6 @@ declare module ol {
* @api
*/
load(): void;
-
}
module Tile {
@@ -11730,7 +11561,6 @@ declare module ol {
* @api
*/
getZForResolution(resolution: number, opt_direction?: number): number;
-
}
/**
@@ -11773,9 +11603,7 @@ declare module ol {
* @api
*/
static createFromCapabilitiesMatrixSet(matrixSet: GlobalObject, opt_extent?: ol.Extent): ol.tilegrid.WMTS;
-
}
-
}
/**
@@ -12225,7 +12053,6 @@ declare module ol {
* @api
*/
setLoader(loader: ol.FeatureLoader): void;
-
}
/**
@@ -12586,16 +12413,13 @@ declare module ol {
* @api stable
*/
setZoom(zoom: number): void;
-
}
-
}
/**
* @namespace olx
*/
declare module olx {
-
/**
* @namespace olx.animation
*/
@@ -12613,7 +12437,6 @@ declare module olx {
easing?: ((t: number) => number);
}
-
/**
* @typedef {{source: ol.Coordinate,
* start: (number|undefined),
@@ -12627,7 +12450,6 @@ declare module olx {
easing?: ((t: number) => number);
}
-
/**
* @typedef {{rotation: (number|undefined),
* anchor: (ol.Coordinate|undefined),
@@ -12643,7 +12465,6 @@ declare module olx {
easing?: ((t: number) => number);
}
-
/**
* @typedef {{resolution: number,
* start: (number|undefined),
@@ -12665,13 +12486,13 @@ declare module olx {
* whether the animation completed without being cancelled.
*/
interface AnimateOptions {
- center?: ol.Coordinate | undefined;
- zoom?: number | undefined;
- resolution?: number | undefined;
- rotation?: number | undefined;
- anchor?: ol.Coordinate | undefined;
- duration?: number | undefined;
- easing?: ((t: number) => number) | undefined;
+ center?: ol.Coordinate;
+ zoom?: number;
+ resolution?: number;
+ rotation?: number;
+ anchor?: ol.Coordinate;
+ duration?: number;
+ easing?: ((t: number) => number);
}
type AnimateCallback = (completed: boolean) => void;
@@ -12702,7 +12523,6 @@ declare module olx {
render?: ((event: ol.MapEvent) => any);
}
-
/**
* @typedef {{element: (Element|undefined),
* render: (function(ol.MapEvent)|undefined),
@@ -12714,7 +12534,6 @@ declare module olx {
target?: (Element | string);
}
-
/**
* @typedef {{attribution: (boolean|undefined),
* attributionOptions: (olx.control.AttributionOptions|undefined),
@@ -12732,7 +12551,6 @@ declare module olx {
zoomOptions?: olx.control.ZoomOptions;
}
-
/**
* @typedef {{className: (string|undefined),
* label: (string|Node|undefined),
@@ -12752,7 +12570,6 @@ declare module olx {
source?: (Element | string);
}
-
/**
* @typedef {{className: (string|undefined),
* coordinateFormat: (ol.CoordinateFormatType|undefined),
@@ -12770,7 +12587,6 @@ declare module olx {
undefinedHTML?: string;
}
-
/**
* @typedef {{collapsed: (boolean|undefined),
* collapseLabel: (string|Node|undefined),
@@ -12794,7 +12610,6 @@ declare module olx {
view?: ol.View;
}
-
/**
* @typedef {{className: (string|undefined),
* minWidth: (number|undefined),
@@ -12810,7 +12625,6 @@ declare module olx {
units?: (ol.control.ScaleLine.Units | string);
}
-
/**
* @typedef {{duration: (number|undefined),
* className: (string|undefined),
@@ -12832,7 +12646,6 @@ declare module olx {
target?: Element;
}
-
/**
* @typedef {{duration: (number|undefined),
* className: (string|undefined),
@@ -12854,7 +12667,6 @@ declare module olx {
target?: Element;
}
-
/**
* @typedef {{className: (string|undefined),
* duration: (number|undefined),
@@ -12870,7 +12682,6 @@ declare module olx {
render?: ((event: ol.MapEvent) => any);
}
-
/**
* @typedef {{className: (string|undefined),
* target: (Element|undefined),
@@ -12885,8 +12696,6 @@ declare module olx {
tipLabel?: string;
extent?: ol.Extent;
}
-
-
}
/**
@@ -12903,7 +12712,6 @@ declare module olx {
featureProjection: ol.ProjectionLike;
}
-
/**
* @typedef {{dataProjection: ol.ProjectionLike,
* featureProjection: ol.ProjectionLike,
@@ -12917,7 +12725,6 @@ declare module olx {
decimals?: number;
}
-
/**
* @typedef {{defaultDataProjection: ol.ProjectionLike,
* geometryName: (string|undefined)}}
@@ -12928,7 +12735,6 @@ declare module olx {
geometryName?: string;
}
-
/**
* @typedef {{geometryName: (string|undefined)}}
*/
@@ -12946,13 +12752,14 @@ declare module olx {
* layerName: (string|undefined)}}
*/
interface MVTOptions {
- featureClass?: (((geom: (ol.geom.Geometry | { [k: string]: any })) => any) | ((geom: ol.geom.GeometryType, arg2: number[], arg3: (number[] | number[][]), arg4: { [k: string]: any }) => any));
+ featureClass?: (((geom: (ol.geom.Geometry | { [k: string]: any })) => any) | ((geom: ol.geom.GeometryType, arg2: number[],
+ arg3: (number[] | number[][]),
+ arg4: { [k: string]: any }) => any));
geometryName?: string;
layerName?: string;
layers?: string[];
}
-
/**
* @typedef {{factor: (number|undefined),
* geometryLayout: (ol.geom.GeometryLayout|undefined)}}
@@ -12962,7 +12769,6 @@ declare module olx {
geometryLayout?: ol.geom.GeometryLayout;
}
-
/**
* @typedef {{defaultDataProjection: ol.ProjectionLike}}
*/
@@ -12970,15 +12776,14 @@ declare module olx {
defaultDataProjection: ol.ProjectionLike;
}
-
/**
* @typedef {{altitudeMode: (ol.format.IGCZ|undefined)}}
*/
+ /* tslint:disable-next-line:interface-name */
interface IGCOptions {
altitudeMode?: ol.format.IGCZ;
}
-
/**
* @typedef {{extractStyles: (boolean|undefined),
* defaultStyle: (Array.|undefined),
@@ -12992,7 +12797,6 @@ declare module olx {
writeStyles?: boolean;
}
-
/**
* @typedef {{featureNS: (Object.|string|undefined),
* featureType: (Array.|string|undefined),
@@ -13014,7 +12818,6 @@ declare module olx {
schemaLocation?: string;
}
-
/**
* @typedef {{readExtensions: (function(ol.Feature, Node)|undefined)}}
*/
@@ -13022,7 +12825,6 @@ declare module olx {
readExtensions?: ((feature: ol.Feature, node: Node) => any);
}
-
/**
* @typedef {{featureNS: (Object.|string|undefined),
* featureType: (Array.|string|undefined),
@@ -13036,7 +12838,6 @@ declare module olx {
schemaLocation?: string;
}
-
/**
* @typedef {{featureNS: string,
* featurePrefix: string,
@@ -13070,7 +12871,6 @@ declare module olx {
resultType?: string;
}
-
/**
* @typedef {{featureNS: string,
* featurePrefix: string,
@@ -13090,7 +12890,6 @@ declare module olx {
gmlOptions?: olx.format.GMLOptions;
}
-
/**
* @typedef {{splitCollection: (boolean|undefined)}}
*/
@@ -13098,7 +12897,6 @@ declare module olx {
splitCollection?: boolean;
}
-
/**
* @typedef {{
* layers: (Array.|undefined)
@@ -13107,8 +12905,6 @@ declare module olx {
interface WMSGetFeatureInfoOptions {
layers?: string[];
}
-
-
}
/**
@@ -13123,7 +12919,6 @@ declare module olx {
handleEvent: (event: ol.MapBrowserEvent) => boolean;
}
-
/**
* Interactions for the map. Default is `true` for all options.
* @typedef {{altShiftDragRotate: (boolean|undefined),
@@ -13151,7 +12946,6 @@ declare module olx {
zoomDuration?: number;
}
-
/**
* @typedef {{duration: (number|undefined),
* delta: (number|undefined)}}
@@ -13161,7 +12955,6 @@ declare module olx {
delta?: number;
}
-
/**
* @typedef {{formatConstructors: (Array.|undefined),
* projection: ol.ProjectionLike,
@@ -13169,13 +12962,12 @@ declare module olx {
* source: (ol.source.Vector|undefined)}}
*/
interface DragAndDropOptions {
- formatConstructors?: ((n: ol.format.Feature) => any)[];
+ formatConstructors?: Array<((n: ol.format.Feature) => any)>;
projection: ol.ProjectionLike;
target?: Element;
source?: ol.source.Vector;
}
-
/**
* @typedef {{className: (string|undefined),
* condition: (ol.EventsConditionType|undefined),
@@ -13189,7 +12981,6 @@ declare module olx {
boxEndCondition?: ol.DragBoxEndConditionType;
}
-
/**
* @typedef {{condition: (ol.EventsConditionType|undefined),
* kinetic: (ol.Kinetic|undefined)}}
@@ -13199,7 +12990,6 @@ declare module olx {
kinetic?: ol.Kinetic;
}
-
/**
* @typedef {{condition: (ol.EventsConditionType|undefined),
* duration: (number|undefined)}}
@@ -13209,7 +12999,6 @@ declare module olx {
duration?: number;
}
-
/**
* @typedef {{condition: (ol.EventsConditionType|undefined),
* duration: (number|undefined)}}
@@ -13219,7 +13008,6 @@ declare module olx {
duration?: number;
}
-
/**
* @typedef {{className: (string|undefined),
* condition: (ol.EventsConditionType|undefined),
@@ -13233,7 +13021,6 @@ declare module olx {
out?: boolean;
}
-
/**
* @typedef {{clickTolerance: (number|undefined),
* features: (ol.Collection.|undefined),
@@ -13269,7 +13056,6 @@ declare module olx {
wrapX?: boolean;
}
-
/**
* @typedef {{
* features: (ol.Collection.|undefined),
@@ -13281,7 +13067,6 @@ declare module olx {
layers?: (ol.layer.Layer[] | ((layer: ol.layer.Layer) => boolean));
}
-
/**
* @typedef {{condition: (ol.EventsConditionType|undefined),
* duration: (number|undefined),
@@ -13293,7 +13078,6 @@ declare module olx {
pixelDelta?: number;
}
-
/**
* @typedef {{duration: (number|undefined),
* condition: (ol.EventsConditionType|undefined),
@@ -13305,7 +13089,6 @@ declare module olx {
delta?: number;
}
-
/**
* @typedef {{condition: (ol.EventsConditionType|undefined),
* deleteCondition: (ol.EventsConditionType|undefined),
@@ -13327,7 +13110,6 @@ declare module olx {
source?: ol.source.Vector;
}
-
/**
* @typedef {{constrainResolution: (boolean|undefined),
* duration: (number|undefined),
@@ -13341,7 +13123,6 @@ declare module olx {
useAnchor?: boolean;
}
-
/**
* @typedef {{threshold: (number|undefined),
* duration: (number|undefined)}}
@@ -13351,7 +13132,6 @@ declare module olx {
threshold?: number;
}
-
/**
* @typedef {{constrainResolution: (boolean|undefined)
* duration: (number|undefined)}}
@@ -13361,7 +13141,6 @@ declare module olx {
duration?: number;
}
-
/**
* @typedef {{handleDownEvent: (function(ol.MapBrowserPointerEvent):boolean|undefined),
* handleDragEvent: (function(ol.MapBrowserPointerEvent)|undefined),
@@ -13377,7 +13156,6 @@ declare module olx {
handleUpEvent?: ((event: ol.MapBrowserPointerEvent) => boolean);
}
-
/**
* @typedef {{addCondition: (ol.EventsConditionType|undefined),
* condition: (ol.EventsConditionType|undefined),
@@ -13405,7 +13183,6 @@ declare module olx {
hitTolerance?: number;
}
-
/**
* Options for snap
* @typedef {{
@@ -13423,8 +13200,6 @@ declare module olx {
pixelTolerance?: number;
source?: ol.source.Vector;
}
-
-
}
/**
@@ -13448,7 +13223,6 @@ declare module olx {
maxResolution?: number;
}
-
/**
* @typedef {{opacity: (number|undefined),
* source: (ol.source.Source|undefined),
@@ -13468,7 +13242,6 @@ declare module olx {
maxResolution?: number;
}
-
/**
* @typedef {{opacity: (number|undefined),
* visible: (boolean|undefined),
@@ -13488,7 +13261,6 @@ declare module olx {
layers?: (ol.layer.Base[] | ol.Collection);
}
-
/**
* @typedef {{gradient: (Array.|undefined),
* radius: (number|undefined),
@@ -13518,7 +13290,6 @@ declare module olx {
zIndex?: number;
}
-
/**
* @typedef {{opacity: (number|undefined),
* map: (ol.Map|undefined),
@@ -13540,7 +13311,6 @@ declare module olx {
zIndex?: number;
}
-
/**
* @typedef {{opacity: (number|undefined),
* preload: (number|undefined),
@@ -13566,7 +13336,6 @@ declare module olx {
zIndex?: number;
}
-
/**
* @enum {string}
* Render mode for vector layers:
@@ -13581,7 +13350,6 @@ declare module olx {
*/
type VectorRenderType = "image" | "vector";
-
/**
* @typedef {{renderOrder: (function(ol.Feature, ol.Feature):number|null|undefined),
* minResolution: (number|undefined),
@@ -13614,7 +13382,6 @@ declare module olx {
zIndex?: number;
}
-
/**
* @typedef {{extent: (ol.Extent|undefined),
* map: (ol.Map|undefined),
@@ -13647,8 +13414,6 @@ declare module olx {
visible?: boolean;
zIndex?: number;
}
-
-
}
/**
@@ -13669,8 +13434,6 @@ declare module olx {
size?: ol.Size;
pixelRatio?: number;
}
-
-
}
/**
@@ -13698,7 +13461,6 @@ declare module olx {
wrapX?: boolean;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* distance: (number|undefined),
@@ -13737,7 +13499,6 @@ declare module olx {
url?: string;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -13777,7 +13538,6 @@ declare module olx {
wrapX?: boolean;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -13813,7 +13573,6 @@ declare module olx {
wrapX?: boolean;
}
-
/**
* @typedef {{url: (string|undefined),
* displayDpi: (number|undefined),
@@ -13839,7 +13598,6 @@ declare module olx {
params?: GlobalObject;
}
-
/**
* @typedef {{cacheSize: (number|undefined),
* layer: string,
@@ -13855,7 +13613,6 @@ declare module olx {
url?: string;
}
-
/**
* @typedef {{projection: ol.ProjectionLike,
* tileGrid: (ol.tilegrid.TileGrid|undefined),
@@ -13867,7 +13624,6 @@ declare module olx {
wrapX?: boolean;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -13891,7 +13647,6 @@ declare module olx {
wrapX?: boolean;
}
-
/**
* @typedef {{attributions: (Array.|undefined),
* crossOrigin: (null|string|undefined),
@@ -13915,7 +13670,6 @@ declare module olx {
url?: string;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* canvasFunction: ol.CanvasFunctionType,
@@ -13935,7 +13689,6 @@ declare module olx {
state?: ol.source.State;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* logo: (string|olx.LogoOptions|undefined),
@@ -13957,7 +13710,6 @@ declare module olx {
style?: (ol.style.Style | ol.style.Style[] | ol.StyleFunction);
}
-
/**
* @typedef {{sources: Array.,
* operation: (ol.RasterOperation|undefined),
@@ -13974,7 +13726,6 @@ declare module olx {
operationType?: ol.RasterOperationType;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* crossOrigin: (null|string|undefined),
@@ -14002,7 +13753,6 @@ declare module olx {
url?: string;
}
-
/**
* @typedef {{cacheSize: (number|undefined),
* layer: string,
@@ -14024,7 +13774,6 @@ declare module olx {
url?: string;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* crossOrigin: (null|string|undefined),
@@ -14046,7 +13795,6 @@ declare module olx {
url: string;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -14076,7 +13824,6 @@ declare module olx {
urls?: string[];
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -14098,7 +13845,6 @@ declare module olx {
wrapX?: boolean;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -14134,7 +13880,6 @@ declare module olx {
wrapX?: boolean;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* features: (Array.|ol.Collection.|undefined),
@@ -14160,7 +13905,6 @@ declare module olx {
wrapX?: boolean;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -14208,7 +13952,6 @@ declare module olx {
wrapX?: boolean;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -14248,7 +13991,6 @@ declare module olx {
wrapX?: boolean;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -14276,7 +14018,6 @@ declare module olx {
account: string;
}
-
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -14297,8 +14038,6 @@ declare module olx {
tierSizeCalculation?: string;
size: ol.Size;
}
-
-
}
/**
@@ -14320,7 +14059,6 @@ declare module olx {
atlasManager?: ol.style.AtlasManager;
}
-
/**
* @typedef {{color: (ol.Color|ol.ColorLike|undefined)}}
*/
@@ -14328,7 +14066,6 @@ declare module olx {
color?: (ol.Color | ol.ColorLike);
}
-
/**
* @typedef {{anchor: (Array.|undefined),
* anchorOrigin: (ol.style.IconOrigin|undefined),
@@ -14368,7 +14105,6 @@ declare module olx {
src?: string;
}
-
/**
* Specify radius for regular polygons, or radius1 and radius2 for stars.
* @typedef {{fill: (ol.style.Fill|undefined),
@@ -14395,7 +14131,6 @@ declare module olx {
rotation?: number;
}
-
/**
* @typedef {{color: (ol.Color|string|undefined),
* lineCap: (string|undefined),
@@ -14422,8 +14157,6 @@ declare module olx {
*/
type TextPlacement = 'point' | 'line';
-
-
/**
* @typedef {{font: (string|undefined),
* maxAngle: (number|undefined),
@@ -14449,7 +14182,7 @@ declare module olx {
offsetX?: number;
offsetY?: number;
overflow?: boolean;
- placement?: olx.style.TextPlacement,
+ placement?: olx.style.TextPlacement;
scale?: number;
rotateWithView?: boolean;
rotation?: number;
@@ -14463,7 +14196,6 @@ declare module olx {
padding?: number[];
}
-
/**
* @typedef {{geometry: (undefined|string|ol.geom.Geometry|ol.StyleGeometryFunction),
* fill: (ol.style.Fill|undefined),
@@ -14481,7 +14213,6 @@ declare module olx {
zIndex?: number;
}
-
/**
* @typedef {{initialSize: (number|undefined),
* maxSize: (number|undefined),
@@ -14492,8 +14223,6 @@ declare module olx {
maxSize?: number;
space?: number;
}
-
-
}
/**
@@ -14517,10 +14246,9 @@ declare module olx {
origins?: ol.Coordinate[];
resolutions: number[];
tileSize?: (number | ol.Size);
- tileSizes?: ((number | ol.Size)[]);
+ tileSizes?: (Array<(number | ol.Size)>);
}
-
/**
* @typedef {{extent: (ol.Extent|undefined),
* origin: (ol.Coordinate|undefined),
@@ -14539,11 +14267,10 @@ declare module olx {
matrixIds: string[];
sizes?: ol.Size[];
tileSize?: (number | ol.Size);
- tileSizes?: ((number | ol.Size)[]);
+ tileSizes?: (Array<(number | ol.Size)>);
widths?: number[];
}
-
/**
* @typedef {{extent: (ol.Extent|undefined),
* maxZoom: (number|undefined),
@@ -14556,8 +14283,6 @@ declare module olx {
minZoom?: number;
tileSize?: (number | ol.Size);
}
-
-
}
/**
@@ -14568,7 +14293,6 @@ declare module olx {
html: string;
}
-
/**
* @typedef {{tracking: (boolean|undefined)}}
*/
@@ -14587,7 +14311,6 @@ declare module olx {
projection: ol.ProjectionLike;
}
-
/**
* Object literal with config options for the map logo.
* @typedef {{href: (string), src: (string)}}
@@ -14597,7 +14320,6 @@ declare module olx {
src: string;
}
-
/**
* @typedef {{map: (ol.Map|undefined),
* maxLines: (number|undefined),
@@ -14618,7 +14340,6 @@ declare module olx {
latLabelStyle?: ol.style.Text;
}
-
/**
* Object literal with config options for the map.
* @typedef {{controls: (ol.Collection.|Array.|undefined),
@@ -14644,12 +14365,11 @@ declare module olx {
loadTilesWhileInteracting?: boolean;
logo?: (boolean | string | olx.LogoOptions | Element);
overlays?: (ol.Collection | ol.Overlay[]);
- renderer?: (ol.RendererType | (ol.RendererType | string)[] | string);
+ renderer?: (ol.RendererType | Array<(ol.RendererType | string)> | string);
target?: (Element | string);
view?: ol.View;
}
-
/**
* Object literal with config options for the overlay.
* @typedef {{id: (number|string|undefined),
@@ -14676,7 +14396,6 @@ declare module olx {
autoPanMargin?: number;
}
-
/**
* Object literal with config options for the projection.
* @typedef {{code: string,
@@ -14712,7 +14431,7 @@ declare module olx {
* easing: (function(t: number) => number) }}
*/
interface FitOptions {
- size?: ol.Size,
+ size?: ol.Size;
padding?: number[];
constrainResolution?: boolean;
nearest?: boolean;
@@ -14759,14 +14478,14 @@ declare module olx {
}
/**
- * Object literal with options for the {@link ol.Map#forEachFeatureAtPixel} and
- * {@link ol.Map#hasFeatureAtPixel} methods.
- * @typedef {{layerFilter: ((function(ol.layer.Layer): boolean)|undefined),
- * hitTolerance: (number|undefined)}}
- */
+ * Object literal with options for the {@link ol.Map#forEachFeatureAtPixel} and
+ * {@link ol.Map#hasFeatureAtPixel} methods.
+ * @typedef {{layerFilter: ((function(ol.layer.Layer): boolean)|undefined),
+ * hitTolerance: (number|undefined)}}
+ */
interface AtPixelOptions {
- layerFilter?: ((layer: ol.layer.Layer) => boolean)
- hitTolerance?: number
+ layerFilter?: ((layer: ol.layer.Layer) => boolean);
+ hitTolerance?: number;
}
/**
@@ -14797,7 +14516,6 @@ declare module olx {
viewState: olx.ViewState;
}
-
/**
* @typedef {{center: ol.Coordinate,
* projection: ol.proj.Projection,
@@ -14810,7 +14528,6 @@ declare module olx {
resolution: number;
rotation: number;
}
-
}
declare module "openlayers" {
diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts
index d2d708c168..2d2d22d411 100644
--- a/types/openlayers/openlayers-tests.ts
+++ b/types/openlayers/openlayers-tests.ts
@@ -1,12 +1,10 @@
// Basic type variables for test functions
let anyValue: any;
-let voidValue: void;
let numberValue: number;
let booleanValue: boolean;
let stringValue: string;
-let stringArray: Array;
+let stringArray: string[];
let jsonValue: JSON;
-let voidOrBooleanValue: void | boolean;
let domEventTarget: EventTarget;
let fn: Function;
let object: Object;
@@ -24,25 +22,25 @@ drawGeometryFunction([0, 0]);
// Type variables for OpenLayers
let attribution: ol.Attribution;
-let boundingCoordinates: Array;
+let boundingCoordinates: ol.Coordinate[];
let circle: ol.geom.Circle;
let color: ol.Color;
let coordinate: ol.Coordinate;
-let coordinatesArray: Array;
-let coordinatesArrayDim2: Array>;
+let coordinatesArray: ol.Coordinate[];
+let coordinatesArrayDim2: ol.Coordinate[][];
let extent: ol.Extent;
let olEvent: ol.events.Event;
let eventKey: ol.EventsKey;
-let eventKeyArray: Array;
-let eventKeyMixed: ol.EventsKey | Array;
+let eventKeyArray: ol.EventsKey[];
+let eventKeyMixed: ol.EventsKey | ol.EventsKey[];
let eventTarget: ol.events.EventTarget;
let feature: ol.Feature;
-let featureArray: Array;
+let featureArray: ol.Feature[];
let featureCollection: ol.Collection;
let featureFormat: ol.format.Feature;
let featureUrlFunction: ol.FeatureUrlFunction;
let graticule: ol.Graticule;
-let geometriesArray: Array;
+let geometriesArray: ol.geom.Geometry[];
let geometry: ol.geom.Geometry;
let geometryCollection: ol.geom.GeometryCollection;
let geometryLayout: ol.geom.GeometryLayout;
@@ -63,7 +61,7 @@ let projectionLike: ol.ProjectionLike;
let simpleGeometry: ol.geom.SimpleGeometry;
let size: ol.Size;
let style: ol.style.Style;
-let styleArray: Array;
+let styleArray: ol.style.Style[];
let styleFunction: ol.StyleFunction;
let tilegrid: ol.tilegrid.TileGrid;
let transformFn: ol.TransformFunction;
@@ -92,21 +90,21 @@ stringValue = ol.color.asString(stringValue);
//
// ol.extent
//
-transformFunction = function (input: number[]) {
- let returnData: number[];
+transformFunction = (input: number[]) => {
+ const returnData: number[] = [];
return returnData;
};
-transformFunction = function (input: number[], output: number[]) {
- let returnData: number[];
+transformFunction = (input: number[], output: number[]) => {
+ const returnData: number[] = [];
return returnData;
};
-transformFunction = function (input: number[], output: number[], dimension: number) {
- let returnData: number[];
+transformFunction = (input: number[], output: number[], dimension: number) => {
+ const returnData: number[] = [];
return returnData;
-}
+};
extent = ol.extent.applyTransform(extent, transformFunction);
ol.extent.applyTransform(extent, transformFunction, extent);
-extent = ol.extent.boundingExtent(boundingCoordinates)
+extent = ol.extent.boundingExtent(boundingCoordinates);
extent = ol.extent.buffer(extent, numberValue);
ol.extent.buffer(extent, numberValue, extent);
booleanValue = ol.extent.containsCoordinate(extent, coordinate);
@@ -145,7 +143,7 @@ loadingStrategy = ol.loadingstrategy.tile(tilegrid);
// ol.geom.Circle
//
booleanValue = circle.intersectsExtent(extent);
-circle = circle.transform(projectionLike, projectionLike);
+circle = circle.transform(projectionLike, projectionLike);
//
//
@@ -162,14 +160,14 @@ geometryResult.transform(projectionLike, projectionLike);
//
// ol.geom.GeometryCollection
//
-geometryCollection = new ol.geom.GeometryCollection(geometriesArray)
+geometryCollection = new ol.geom.GeometryCollection(geometriesArray);
geometryCollection = new ol.geom.GeometryCollection();
-voidValue = geometryCollection.applyTransform(transformFn);
+geometryCollection.applyTransform(transformFn);
geometryCollection = geometryCollection.clone();
geometriesArray = geometryCollection.getGeometries();
geometryType = geometryCollection.getType();
booleanValue = geometryCollection.intersectsExtent(extent);
-voidValue = geometryCollection.setGeometries(geometriesArray);
+geometryCollection.setGeometries(geometriesArray);
//
//
@@ -181,8 +179,8 @@ linearRing = linearRing.clone();
numberValue = linearRing.getArea();
coordinatesArray = linearRing.getCoordinates();
geometryType = linearRing.getType();
-voidValue = linearRing.setCoordinates(coordinatesArray);
-voidValue = linearRing.setCoordinates(coordinatesArray, geometryLayout);
+linearRing.setCoordinates(coordinatesArray);
+linearRing.setCoordinates(coordinatesArray, geometryLayout);
//
//
@@ -190,7 +188,7 @@ voidValue = linearRing.setCoordinates(coordinatesArray, geometryLayout);
//
lineString = new ol.geom.LineString(coordinatesArray);
lineString = new ol.geom.LineString(coordinatesArray, geometryLayout);
-voidValue = lineString.appendCoordinate(coordinate);
+lineString.appendCoordinate(coordinate);
lineString = lineString.clone();
coordinate = lineString.getCoordinateAtM(numberValue);
coordinate = lineString.getCoordinateAtM(numberValue, booleanValue);
@@ -198,18 +196,18 @@ coordinatesArray = lineString.getCoordinates();
numberValue = lineString.getLength();
geometryType = lineString.getType();
booleanValue = lineString.intersectsExtent(extent);
-voidValue = lineString.setCoordinates(coordinatesArray);
-voidValue = lineString.setCoordinates(coordinatesArray, geometryLayout);
+lineString.setCoordinates(coordinatesArray);
+lineString.setCoordinates(coordinatesArray, geometryLayout);
//
//
// ol.geom.MultiLineString
//
-let lineStringsArray: Array;
+let lineStringsArray: ol.geom.LineString[];
multiLineString = new ol.geom.MultiLineString(coordinatesArrayDim2);
multiLineString = new ol.geom.MultiLineString(coordinatesArrayDim2, geometryLayout);
-voidValue = multiLineString.appendLineString(lineString);
+multiLineString.appendLineString(lineString);
multiLineString = multiLineString.clone();
coordinate = multiLineString.getCoordinateAtM(numberValue);
coordinate = multiLineString.getCoordinateAtM(numberValue, booleanValue);
@@ -219,37 +217,37 @@ lineString = multiLineString.getLineString(numberValue);
lineStringsArray = multiLineString.getLineStrings();
geometryType = multiLineString.getType();
booleanValue = multiLineString.intersectsExtent(extent);
-voidValue = multiLineString.setCoordinates(coordinatesArrayDim2);
-voidValue = multiLineString.setCoordinates(coordinatesArrayDim2, geometryLayout);
+multiLineString.setCoordinates(coordinatesArrayDim2);
+multiLineString.setCoordinates(coordinatesArrayDim2, geometryLayout);
//
//
// ol.geom.MultiPoint
//
-let pointsArray: Array;
+let pointsArray: ol.geom.Point[];
multiPoint = new ol.geom.MultiPoint(coordinatesArray);
multiPoint = new ol.geom.MultiPoint(coordinatesArray, geometryLayout);
-voidValue = multiPoint.appendPoint(point);
+multiPoint.appendPoint(point);
multiPoint = multiPoint.clone();
coordinatesArray = multiPoint.getCoordinates();
point = multiPoint.getPoint(numberValue);
pointsArray = multiPoint.getPoints();
geometryType = multiPoint.getType();
booleanValue = multiPoint.intersectsExtent(extent);
-voidValue = multiPoint.setCoordinates(coordinatesArray);
-voidValue = multiPoint.setCoordinates(coordinatesArray, geometryLayout);
+multiPoint.setCoordinates(coordinatesArray);
+multiPoint.setCoordinates(coordinatesArray, geometryLayout);
//
//
// ol.geom.MultiPolygon
//
-let coordinatesArrayDim3: Array>>;
-let polygonsArray: Array;
+let coordinatesArrayDim3: ol.Coordinate[][][];
+let polygonsArray: ol.geom.Polygon[];
multiPolygon = new ol.geom.MultiPolygon(coordinatesArrayDim3);
multiPolygon = new ol.geom.MultiPolygon(coordinatesArrayDim3, geometryLayout);
-voidValue = multiPolygon.appendPolygon(polygon);
+multiPolygon.appendPolygon(polygon);
multiPolygon = multiPolygon.clone();
numberValue = multiPolygon.getArea();
coordinatesArrayDim3 = multiPolygon.getCoordinates();
@@ -259,8 +257,8 @@ polygon = multiPolygon.getPolygon(numberValue);
polygonsArray = multiPolygon.getPolygons();
geometryType = multiPolygon.getType();
booleanValue = multiPolygon.intersectsExtent(extent);
-voidValue = multiPolygon.setCoordinates(coordinatesArrayDim3);
-voidValue = multiPolygon.setCoordinates(coordinatesArrayDim3, geometryLayout);
+multiPolygon.setCoordinates(coordinatesArrayDim3);
+multiPolygon.setCoordinates(coordinatesArrayDim3, geometryLayout);
//
//
@@ -272,15 +270,15 @@ point = point.clone();
coordinate = point.getCoordinates();
geometryType = point.getType();
booleanValue = point.intersectsExtent(extent);
-voidValue = point.setCoordinates(coordinate);
-voidValue = point.setCoordinates(coordinate, geometryLayout);
+point.setCoordinates(coordinate);
+point.setCoordinates(coordinate, geometryLayout);
//
//
// ol.geom.Polygon
//
let localSphere: ol.Sphere;
-let linearRingsArray: Array;
+let linearRingsArray: ol.geom.LinearRing[];
polygon = new ol.geom.Polygon(coordinatesArrayDim2);
polygon = new ol.geom.Polygon(coordinatesArrayDim2, geometryLayout);
@@ -290,7 +288,7 @@ polygon = ol.geom.Polygon.fromCircle(circle);
polygon = ol.geom.Polygon.fromCircle(circle, numberValue);
polygon = ol.geom.Polygon.fromCircle(circle, numberValue, numberValue);
polygon = ol.geom.Polygon.fromExtent(extent);
-voidValue = polygon.appendLinearRing(linearRing);
+polygon.appendLinearRing(linearRing);
polygon = polygon.clone();
numberValue = polygon.getArea();
coordinatesArrayDim2 = polygon.getCoordinates();
@@ -301,8 +299,8 @@ numberValue = polygon.getLinearRingCount();
linearRingsArray = polygon.getLinearRings();
geometryType = polygon.getType();
booleanValue = polygon.intersectsExtent(extent);
-voidValue = polygon.setCoordinates([[coordinate]]);
-voidValue = polygon.setCoordinates([[coordinate]], geometryLayout);
+polygon.setCoordinates([[coordinate]]);
+polygon.setCoordinates([[coordinate]], geometryLayout);
//
//
@@ -312,7 +310,7 @@ simpleGeometry.applyTransform(transformFn);
coordinate = simpleGeometry.getFirstCoordinate();
coordinate = simpleGeometry.getLastCoordinate();
geometryLayout = simpleGeometry.getLayout();
-voidValue = simpleGeometry.translate(numberValue, numberValue);
+simpleGeometry.translate(numberValue, numberValue);
//
// ol.source
@@ -336,10 +334,10 @@ vectorSource = new ol.source.Vector({
url: featureUrlFunction,
loader: featureLoader
});
-voidValue = vectorSource.addFeature(feature);
-voidValue = vectorSource.addFeatures(featureArray);
-voidValue = vectorSource.clear();
-voidValue = vectorSource.clear(booleanValue);
+vectorSource.addFeature(feature);
+vectorSource.addFeatures(featureArray);
+vectorSource.clear();
+vectorSource.clear(booleanValue);
anyValue = vectorSource.forEachFeature(featureCallback);
anyValue = vectorSource.forEachFeature(featureCallback, object);
anyValue = vectorSource.forEachFeatureInExtent(extent, featureCallback, object);
@@ -352,8 +350,7 @@ featureArray = vectorSource.getFeatures();
featureArray = vectorSource.getFeaturesAtCoordinate(coordinate);
featureCollection = vectorSource.getFeaturesCollection();
featureArray = vectorSource.getFeaturesInExtent(extent);
-voidValue = vectorSource.removeFeature(feature);
-
+vectorSource.removeFeature(feature);
clusterSource = new ol.source.Cluster({
source: vectorSource
@@ -367,7 +364,7 @@ numberValue = clusterSource.getDistance();
feature = new ol.Feature();
feature = new ol.Feature(geometry);
feature = new ol.Feature({
- geometry: geometry,
+ geometry,
a: numberValue,
b: stringValue,
c: null,
@@ -377,17 +374,17 @@ feature = feature.clone();
geometry = feature.getGeometry();
stringValue = feature.getGeometryName();
let featureGetId: string | number = feature.getId();
-let featureGetStyle: ol.style.Style | Array | ol.FeatureStyleFunction | ol.StyleFunction = feature.getStyle();
+let featureGetStyle: ol.style.Style | ol.style.Style[] | ol.FeatureStyleFunction | ol.StyleFunction = feature.getStyle();
featureStyleFunction = feature.getStyleFunction();
-voidValue = feature.setGeometry(geometry);
-voidValue = feature.setGeometryName(stringValue);
-voidValue = feature.setId(stringValue);
-voidValue = feature.setId(numberValue);
-voidValue = feature.setStyle(style);
-voidValue = feature.setStyle(styleArray);
-voidValue = feature.setStyle(featureStyleFunction);
-voidValue = feature.setStyle(styleFunction);
-voidValue = feature.setProperties(object);
+feature.setGeometry(geometry);
+feature.setGeometryName(stringValue);
+feature.setId(stringValue);
+feature.setId(numberValue);
+feature.setStyle(style);
+feature.setStyle(styleArray);
+feature.setStyle(featureStyleFunction);
+feature.setStyle(styleFunction);
+feature.setProperties(object);
//
// ol.View
@@ -400,7 +397,7 @@ view = new ol.View({
center: coordinate,
constrainRotation: numberValue,
enableRotation: booleanValue,
- extent: extent,
+ extent,
maxResolution: numberValue,
minResolution: numberValue,
maxZoom: numberValue,
@@ -416,11 +413,11 @@ view = new ol.View({
constrainRotation: booleanValue,
});
-voidValue = view.animate();
-voidValue = view.animate({});
-voidValue = view.animate({ zoom: view.getZoom() + 1 });
-voidValue = view.animate({ zoom: 10 }, { center: [0, 0] });
-voidValue = view.animate({
+view.animate();
+view.animate({});
+view.animate({ zoom: view.getZoom() + 1 });
+view.animate({ zoom: 10 }, { center: [0, 0] });
+view.animate({
center: coordinate,
zoom: numberValue,
resolution: numberValue,
@@ -431,8 +428,8 @@ voidValue = view.animate({
});
extent = view.calculateExtent();
extent = view.calculateExtent(size);
-voidValue = view.cancelAnimations();
-voidValue = view.centerOn(coordinate, size, pixel);
+view.cancelAnimations();
+view.centerOn(coordinate, size, pixel);
coordinate = view.constrainCenter();
coordinate = view.constrainCenter(coordinate);
numberValue = view.constrainResolution();
@@ -442,14 +439,14 @@ numberValue = view.constrainResolution(numberValue, numberValue, numberValue);
numberValue = view.constrainRotation();
numberValue = view.constrainRotation(numberValue);
numberValue = view.constrainRotation(numberValue, numberValue);
-voidValue = view.fit(simpleGeometry);
-voidValue = view.fit(simpleGeometry, {});
-voidValue = view.fit(extent);
-voidValue = view.fit(extent, {});
-voidValue = view.fit(extent, { callback: () => { } });
-voidValue = view.fit(extent, { callback: (animationCompleted: boolean) => { } });
-voidValue = view.fit(extent, {
- size: size,
+view.fit(simpleGeometry);
+view.fit(simpleGeometry, {});
+view.fit(extent);
+view.fit(extent, {});
+view.fit(extent, { callback: () => { } });
+view.fit(extent, { callback: (animationCompleted: boolean) => { } });
+view.fit(extent, {
+ size,
padding: [numberValue, numberValue, numberValue, numberValue],
constrainResolution: booleanValue,
nearest: booleanValue,
@@ -475,15 +472,15 @@ numberValue = view.getResolutionForZoom(numberValue);
numberValue = view.getRotation();
numberValue = view.getZoom();
numberValue = view.getZoomForResolution(numberValue);
-voidValue = view.rotate(numberValue);
-voidValue = view.rotate(numberValue, coordinate);
-voidValue = view.setCenter(coordinate);
-voidValue = view.setMaxZoom(numberValue);
-voidValue = view.setMinZoom(numberValue);
-voidValue = view.setResolution();
-voidValue = view.setResolution(numberValue);
-voidValue = view.setRotation(numberValue);
-voidValue = view.setZoom(numberValue);
+view.rotate(numberValue);
+view.rotate(numberValue, coordinate);
+view.setCenter(coordinate);
+view.setMaxZoom(numberValue);
+view.setMinZoom(numberValue);
+view.setResolution();
+view.setResolution(numberValue);
+view.setRotation(numberValue);
+view.setZoom(numberValue);
//
// ol.layer.Base
@@ -551,7 +548,6 @@ let vectorTileLayer: ol.layer.VectorTile = new ol.layer.VectorTile({
zIndex: 2
});
-
//
// ol.Object
//
@@ -559,37 +555,36 @@ let olObject: ol.Object = new ol.Object({
a: numberValue,
b: stringValue,
c: booleanValue,
- d: voidValue,
- e: object,
- f: fn
+ d: object,
+ e: fn
});
anyValue = olObject.get(stringValue);
stringArray = olObject.getKeys();
object = olObject.getProperties();
-voidValue = olObject.set(stringValue, anyValue);
-voidValue = olObject.set(stringValue, anyValue, booleanValue);
-voidValue = olObject.setProperties(object, booleanValue);
-voidValue = olObject.unset(stringValue, booleanValue);
+olObject.set(stringValue, anyValue);
+olObject.set(stringValue, anyValue, booleanValue);
+olObject.setProperties(object, booleanValue);
+olObject.unset(stringValue, booleanValue);
//
// ol.Observable
//
ol.Observable.unByKey(eventKey);
let observable: ol.Observable = new ol.Observable();
-voidValue = observable.changed();
-voidOrBooleanValue = observable.dispatchEvent({ type: stringValue });
-voidOrBooleanValue = observable.dispatchEvent({ type: stringValue, target: domEventTarget });
-voidOrBooleanValue = observable.dispatchEvent({ type: stringValue, target: eventTarget });
-voidOrBooleanValue = observable.dispatchEvent({ type: stringValue, a: numberValue, b: stringValue, c: booleanValue, d: null, e: {} });
-voidOrBooleanValue = observable.dispatchEvent(olEvent);
-voidOrBooleanValue = observable.dispatchEvent(stringValue);
+observable.changed();
+observable.dispatchEvent({ type: stringValue });
+observable.dispatchEvent({ type: stringValue, target: domEventTarget });
+observable.dispatchEvent({ type: stringValue, target: eventTarget });
+observable.dispatchEvent({ type: stringValue, a: numberValue, b: stringValue, c: booleanValue, d: null, e: {} });
+observable.dispatchEvent(olEvent);
+observable.dispatchEvent(stringValue);
numberValue = observable.getRevision();
eventKeyMixed = observable.on(stringValue, fn);
eventKeyMixed = observable.on([stringValue, stringValue], fn, {});
eventKeyMixed = observable.once(stringValue, fn);
eventKeyMixed = observable.once([stringValue, stringValue], fn, {});
-voidValue = observable.un(stringValue, fn);
-voidValue = observable.un([stringValue, stringValue], fn, {});
+observable.un(stringValue, fn);
+observable.un([stringValue, stringValue], fn, {});
//
// ol.proj
@@ -605,17 +600,17 @@ numberValue = projection.getPointResolution(numberValue, coordinate);
units = projection.getUnits();
extent = projection.getWorldExtent();
booleanValue = projection.isGlobal();
-voidValue = projection.setExtent(extent);
-voidValue = projection.setGetPointResolution(getPointResolutionFn);
-voidValue = projection.setGlobal(booleanValue);
-voidValue = projection.setWorldExtent(extent);
+projection.setExtent(extent);
+projection.setGetPointResolution(getPointResolutionFn);
+projection.setGlobal(booleanValue);
+projection.setWorldExtent(extent);
//
// ol.Map
//
let map: ol.Map = new ol.Map({
- view: view,
+ view,
layers: [tileLayer],
target: stringValue
});
@@ -625,7 +620,7 @@ let map: ol.Map = new ol.Map({
//
let imageWMS: ol.source.ImageWMS = new ol.source.ImageWMS({
params: {},
- projection: projection,
+ projection,
serverType: stringValue,
url: stringValue
});
@@ -641,18 +636,18 @@ projection = source.getProjection();
//
let tileWMS: ol.source.TileWMS = new ol.source.TileWMS({
params: {},
- projection: projection,
+ projection,
serverType: stringValue,
url: stringValue
});
-//test without projection
+// test without projection
tileWMS = new ol.source.TileWMS({
params: {},
serverType: stringValue,
url: stringValue
});
-voidValue = tileWMS.updateParams(tileWMS.getParams());
+tileWMS.updateParams(tileWMS.getParams());
stringValue = tileWMS.getGetFeatureInfoUrl([0, 0], 1, "EPSG:4326", {});
//
@@ -660,7 +655,7 @@ stringValue = tileWMS.getGetFeatureInfoUrl([0, 0], 1, "EPSG:4326", {});
//
let wmts: ol.source.WMTS = new ol.source.WMTS({
layer: "",
- projection: projection,
+ projection,
matrixSet: "",
style: "",
tileGrid: new ol.tilegrid.WMTS({
@@ -699,7 +694,7 @@ easingFunction = ol.easing.upAndDown;
// ol.Geolocation
//
let geolocation: ol.Geolocation = new ol.Geolocation({
- projection: projection
+ projection
});
coordinate = geolocation.getPosition();
@@ -709,12 +704,12 @@ coordinate = geolocation.getPosition();
graticule = new ol.Graticule();
graticule = new ol.Graticule({
- map: map,
+ map,
});
let graticuleMap: ol.Map = graticule.getMap();
-let graticuleMeridians: Array = graticule.getMeridians();
-let graticuleParallels: Array = graticule.getParallels();
-voidValue = graticule.setMap(graticuleMap);
+let graticuleMeridians: ol.geom.LineString[] = graticule.getMeridians();
+let graticuleParallels: ol.geom.LineString[] = graticule.getParallels();
+graticule.setMap(graticuleMap);
//
// ol.DeviceOrientation
@@ -732,19 +727,18 @@ numberValue = deviceOrientation.getHeading();
let popup: ol.Overlay = new ol.Overlay({
element: document.getElementById('popup')
});
-voidValue = map.addOverlay(popup);
+map.addOverlay(popup);
let popupElement: Element = popup.getElement();
let popupMap: ol.Map = popup.getMap();
-let popupOffset: Array = popup.getOffset();
+let popupOffset: number[] = popup.getOffset();
coordinate = popup.getPosition();
let popupPositioning: ol.OverlayPositioning = popup.getPositioning();
-voidValue = popup.setElement(popupElement);
-voidValue = popup.setMap(popupMap);
-voidValue = popup.setOffset(popupOffset);
-voidValue = popup.setPosition(coordinate);
-voidValue = popup.setPosition(undefined);
-voidValue = popup.setPositioning(popupPositioning);
-
+popup.setElement(popupElement);
+popup.setMap(popupMap);
+popup.setOffset(popupOffset);
+popup.setPosition(coordinate);
+popup.setPosition(undefined);
+popup.setPositioning(popupPositioning);
//
// ol.format.GeoJSON
@@ -909,7 +903,7 @@ let draw: ol.interaction.Draw = new ol.interaction.Draw({
snapTolerance: numberValue,
maxPoints: numberValue,
minPoints: numberValue,
- style: style,
+ style,
geometryFunction: drawGeometryFunction,
geometryName: stringValue,
condition: ol.events.condition.never,
@@ -924,7 +918,7 @@ draw = new ol.interaction.Draw({
type: "Point",
style: styleFunction
});
-let styleFunctionAsStyle = function (feature: ol.Feature, resolution: number): ol.style.Style { return style; }
+let styleFunctionAsStyle = (feature: ol.Feature, resolution: number): ol.style.Style => style;
draw = new ol.interaction.Draw({
type: "Point",
style: styleFunctionAsStyle
@@ -938,8 +932,7 @@ ol.interaction.defaults({
constrainResolution: booleanValue
});
-
-let styleFunctionAsArray = function (feature: ol.Feature, resolution: number): ol.style.Style[] { return styleArray; }
+let styleFunctionAsArray = (feature: ol.Feature, resolution: number): ol.style.Style[] => styleArray;
draw = new ol.interaction.Draw({
type: "Point",
style: styleFunctionAsArray
@@ -949,24 +942,22 @@ let dragbox: ol.interaction.DragBox = new ol.interaction.DragBox({
className: stringValue,
minArea: 10,
condition: ol.events.condition.always,
- boxEndCondition: function (mapBrowserEvent: ol.MapBrowserEvent, startPixel: ol.Pixel, endPixel: ol.Pixel) {
- let width: number = endPixel[0] - startPixel[0];
- let height: number = endPixel[1] - startPixel[1];
+ boxEndCondition: (mapBrowserEvent: ol.MapBrowserEvent, startPixel: ol.Pixel, endPixel: ol.Pixel) => {
+ const width: number = endPixel[0] - startPixel[0];
+ const height: number = endPixel[1] - startPixel[1];
return booleanValue;
}
});
polygon = dragbox.getGeometry();
let interaction: ol.interaction.Interaction = new ol.interaction.Interaction({
- handleEvent: function (e: ol.MapBrowserEvent) {
+ handleEvent: (e: ol.MapBrowserEvent) => {
return booleanValue;
}
});
booleanValue = interaction.getActive();
map = interaction.getMap();
-voidValue = interaction.setActive(true);
-
-
+interaction.setActive(true);
const select: ol.interaction.Select = new ol.interaction.Select({
layers: (layer: ol.layer.Layer) => true,
@@ -999,11 +990,11 @@ styleRegularShape = new ol.style.RegularShape({
let value = ol.proj.METERS_PER_UNIT['degrees'];
numberValue = ol.Sphere.getArea(geometry, {
- projection: projection,
+ projection,
radius: numberValue,
});
numberValue = ol.Sphere.getLength(geometry, {
- projection: projection,
+ projection,
radius: numberValue,
});
diff --git a/types/openlayers/tslint.json b/types/openlayers/tslint.json
index a41bf5d19a..2effdd6100 100644
--- a/types/openlayers/tslint.json
+++ b/types/openlayers/tslint.json
@@ -1,79 +1,18 @@
{
"extends": "dtslint/dt.json",
"rules": {
- "adjacent-overload-signatures": false,
- "array-type": false,
- "arrow-return-shorthand": false,
+ // It appears somewhat difficult to remove the Function and Object types
"ban-types": false,
- "callable-types": false,
- "comment-format": false,
- "dt-header": false,
- "eofline": false,
- "export-just-namespace": false,
- "import-spacing": false,
- "interface-name": false,
- "interface-over-type-literal": false,
- "jsdoc-format": false,
- "max-line-length": false,
- "member-access": false,
- "new-parens": false,
+ // This currently fails for an option that does not appear to be in OL 4
"no-any-union": false,
- "no-boolean-literal-compare": false,
- "no-conditional-assignment": false,
- "no-consecutive-blank-lines": false,
- "no-construct": false,
+ // Not sure how to work around this, or if it's necessary to
"no-declare-current-package": false,
- "no-duplicate-imports": false,
- "no-duplicate-variable": false,
- "no-empty-interface": false,
- "no-for-in-array": false,
- "no-inferrable-types": false,
"no-internal-module": false,
- "no-irregular-whitespace": false,
- "no-mergeable-namespace": false,
- "no-misused-new": false,
- "no-namespace": false,
- "no-object-literal-type-assertion": false,
- "no-padding": false,
- "no-redundant-jsdoc": false,
"no-redundant-jsdoc-2": false,
- "no-redundant-undefined": false,
- "no-reference-import": false,
- "no-relative-import-in-test": false,
- "no-self-import": false,
"no-single-declare-module": false,
- "no-string-throw": false,
- "no-unnecessary-callback-wrapper": false,
"no-unnecessary-class": false,
"no-unnecessary-generics": false,
"no-unnecessary-qualifier": false,
- "no-unnecessary-type-assertion": false,
- "no-useless-files": false,
- "no-var-keyword": false,
- "no-var-requires": false,
- "no-void-expression": false,
- "no-trailing-whitespace": false,
- "object-literal-key-quotes": false,
- "object-literal-shorthand": false,
- "one-line": false,
- "one-variable-per-declaration": false,
- "only-arrow-functions": false,
- "prefer-conditional-expression": false,
- "prefer-const": false,
- "prefer-declare-function": false,
- "prefer-for-of": false,
- "prefer-method-signature": false,
- "prefer-template": false,
- "radix": false,
- "semicolon": false,
- "space-before-function-paren": false,
- "space-within-parens": false,
- "strict-export-declare-modifiers": false,
- "trim-file": false,
- "triple-equals": false,
- "typedef-whitespace": false,
- "unified-signatures": false,
- "void-return": false,
- "whitespace": false
+ "strict-export-declare-modifiers": false
}
}