mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[@types/ol] Update to openlayers 5.3 (#35445)
* [@types/ol] Update to openlayers 5.3 * [@types/ol] fix case sensitive * [@types/ol] fix case sensitive
This commit is contained in:
parent
7867516b25
commit
1dcb8e6da3
4
types/ol/AssertionError.d.ts
vendored
Normal file
4
types/ol/AssertionError.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
export default class AssertionError extends Error {
|
||||
constructor(code: number);
|
||||
code: number;
|
||||
}
|
||||
3
types/ol/AssertionError/index.d.ts
vendored
3
types/ol/AssertionError/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.AssertionError;
|
||||
3
types/ol/Attribution/index.d.ts
vendored
3
types/ol/Attribution/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Attribution;
|
||||
43
types/ol/Collection.d.ts
vendored
Normal file
43
types/ol/Collection.d.ts
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import BaseObject, { ObjectEvent } from 'ol/Object';
|
||||
export class CollectionEvent<T> extends Event {
|
||||
constructor();
|
||||
element: T;
|
||||
}
|
||||
export default class Collection<T> extends BaseObject {
|
||||
constructor(opt_array?: T[], opt_options?: Options);
|
||||
item(index: number): T;
|
||||
clear(): void;
|
||||
forEach(f: ((param0: T, param1: number, param2: T[]) => void)): void;
|
||||
getArray(): T[];
|
||||
getLength(): number;
|
||||
insertAt(index: number, elem: T): void;
|
||||
extend(arr: T[]): Collection<T>;
|
||||
pop(): T;
|
||||
push(elem: T): number;
|
||||
remove(elem: T): T;
|
||||
removeAt(index: number): T;
|
||||
setAt(index: number, elem: T): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'add', listener: (evt: CollectionEvent<T>) => void): EventsKey;
|
||||
once(type: 'add', listener: (evt: CollectionEvent<T>) => void): EventsKey;
|
||||
un(type: 'add', listener: (evt: CollectionEvent<T>) => void): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'change:length', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:length', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:length', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'remove', listener: (evt: CollectionEvent<T>) => void): EventsKey;
|
||||
once(type: 'remove', listener: (evt: CollectionEvent<T>) => void): EventsKey;
|
||||
un(type: 'remove', listener: (evt: CollectionEvent<T>) => void): void;
|
||||
}
|
||||
export interface Options {
|
||||
unique?: boolean;
|
||||
}
|
||||
3
types/ol/Collection/index.d.ts
vendored
3
types/ol/Collection/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Collection;
|
||||
6
types/ol/CollectionEventType.d.ts
vendored
Normal file
6
types/ol/CollectionEventType.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
declare enum CollectionEventType {
|
||||
ADD = 'add',
|
||||
REMOVE = 'remove',
|
||||
}
|
||||
|
||||
export default CollectionEventType;
|
||||
5
types/ol/Disposable.d.ts
vendored
Normal file
5
types/ol/Disposable.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export default class Disposable {
|
||||
constructor();
|
||||
protected disposeInternal(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
3
types/ol/Disposable/index.d.ts
vendored
3
types/ol/Disposable/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Disposable;
|
||||
34
types/ol/Feature.d.ts
vendored
Normal file
34
types/ol/Feature.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import Geometry from 'ol/geom/Geometry';
|
||||
import BaseObject, { ObjectEvent } from 'ol/Object';
|
||||
import RenderFeature from 'ol/render/Feature';
|
||||
import Style, { StyleFunction, StyleLike } from 'ol/style/Style';
|
||||
export function createStyleFunction(obj: StyleFunction | Style[] | Style): StyleFunction;
|
||||
export default class Feature extends BaseObject {
|
||||
constructor(opt_geometryOrProperties?: Geometry | { [key: string]: any });
|
||||
clone(): Feature;
|
||||
getGeometry(): Geometry;
|
||||
getGeometryName(): string;
|
||||
getId(): number | string;
|
||||
getStyle(): StyleLike;
|
||||
getStyleFunction(): StyleFunction;
|
||||
setGeometry(geometry: Geometry): void;
|
||||
setGeometryName(name: string): void;
|
||||
setId(id: number | string): void;
|
||||
setStyle(style: StyleLike): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'change:geometry', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:geometry', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:geometry', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
export type FeatureClass = Feature | RenderFeature;
|
||||
export type FeatureLike = Feature | RenderFeature;
|
||||
3
types/ol/Feature/index.d.ts
vendored
3
types/ol/Feature/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Feature;
|
||||
70
types/ol/Geolocation.d.ts
vendored
Normal file
70
types/ol/Geolocation.d.ts
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
import { Coordinate } from 'ol/coordinate';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import Polygon from 'ol/geom/Polygon';
|
||||
import BaseObject, { ObjectEvent } from 'ol/Object';
|
||||
import { ProjectionLike } from 'ol/proj';
|
||||
import Projection from 'ol/proj/Projection';
|
||||
export default class Geolocation extends BaseObject {
|
||||
constructor(opt_options?: Options);
|
||||
getProjection(): Projection;
|
||||
getAccuracy(): number;
|
||||
getAltitude(): number;
|
||||
getAltitudeAccuracy(): number;
|
||||
getHeading(): number;
|
||||
getPosition(): Coordinate;
|
||||
getAccuracyGeometry(): Polygon;
|
||||
getSpeed(): number;
|
||||
getTracking(): boolean;
|
||||
getTrackingOptions(): PositionOptions;
|
||||
setProjection(projection: ProjectionLike): void;
|
||||
setTracking(tracking: boolean): void;
|
||||
setTrackingOptions(options: PositionOptions): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'change:accuracy', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:accuracy', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:accuracy', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:accuracyGeometry', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:accuracyGeometry', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:accuracyGeometry', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:altitude', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:altitude', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:altitude', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:altitudeAccuracy', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:altitudeAccuracy', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:altitudeAccuracy', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:heading', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:heading', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:heading', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:position', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:position', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:position', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:projection', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:projection', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:projection', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:speed', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:speed', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:speed', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:tracking', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:tracking', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:tracking', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:trackingOptions', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:trackingOptions', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:trackingOptions', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'error', listener: (evt: any) => void): EventsKey;
|
||||
once(type: 'error', listener: (evt: any) => void): EventsKey;
|
||||
un(type: 'error', listener: (evt: any) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
export interface Options {
|
||||
tracking?: boolean;
|
||||
trackingOptions?: PositionOptions;
|
||||
projection?: ProjectionLike;
|
||||
}
|
||||
3
types/ol/Geolocation/index.d.ts
vendored
3
types/ol/Geolocation/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Geolocation;
|
||||
30
types/ol/Graticule.d.ts
vendored
Normal file
30
types/ol/Graticule.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
import LineString from 'ol/geom/LineString';
|
||||
import Point from 'ol/geom/Point';
|
||||
import PluggableMap from 'ol/PluggableMap';
|
||||
import Stroke from 'ol/style/Stroke';
|
||||
import Text from 'ol/style/Text';
|
||||
export default class Graticule {
|
||||
constructor(opt_options?: Options);
|
||||
getMap(): PluggableMap;
|
||||
getMeridians(): LineString[];
|
||||
getParallels(): LineString[];
|
||||
setMap(map: PluggableMap): void;
|
||||
}
|
||||
export interface GraticuleLabelDataType {
|
||||
geom: Point;
|
||||
text: string;
|
||||
}
|
||||
export interface Options {
|
||||
map?: PluggableMap;
|
||||
maxLines?: number;
|
||||
strokeStyle?: Stroke;
|
||||
targetSize?: number;
|
||||
showLabels?: boolean;
|
||||
lonLabelFormatter?: ((param0: number) => string);
|
||||
latLabelFormatter?: ((param0: number) => string);
|
||||
lonLabelPosition?: number;
|
||||
latLabelPosition?: number;
|
||||
lonLabelStyle?: Text;
|
||||
latLabelStyle?: Text;
|
||||
intervals?: number[];
|
||||
}
|
||||
3
types/ol/Graticule/index.d.ts
vendored
3
types/ol/Graticule/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Graticule;
|
||||
9
types/ol/Image.d.ts
vendored
Normal file
9
types/ol/Image.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { Extent } from 'ol/extent';
|
||||
import ImageBase from 'ol/ImageBase';
|
||||
import ImageState from 'ol/ImageState';
|
||||
export default class ImageWrapper extends ImageBase {
|
||||
constructor(extent: Extent, resolution: number, pixelRatio: number, src: string, crossOrigin: string, imageLoadFunction: LoadFunction);
|
||||
protected state: ImageState;
|
||||
setImage(image: HTMLCanvasElement | HTMLImageElement | HTMLVideoElement): void;
|
||||
}
|
||||
export type LoadFunction = ((param0: ImageWrapper, param1: string) => void);
|
||||
3
types/ol/Image/index.d.ts
vendored
3
types/ol/Image/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Image;
|
||||
16
types/ol/ImageBase.d.ts
vendored
Normal file
16
types/ol/ImageBase.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
import Target from 'ol/events/Target';
|
||||
import { Extent } from 'ol/extent';
|
||||
import ImageState from 'ol/ImageState';
|
||||
export default class ImageBase extends Target {
|
||||
constructor(extent: Extent, resolution: number, pixelRatio: number, state: ImageState);
|
||||
protected extent: Extent;
|
||||
protected resolution: number;
|
||||
protected state: ImageState;
|
||||
protected changed(): void;
|
||||
getExtent(): Extent;
|
||||
getImage(): HTMLCanvasElement | HTMLImageElement | HTMLVideoElement;
|
||||
getPixelRatio(): number;
|
||||
getResolution(): number;
|
||||
getState(): ImageState;
|
||||
load(): void;
|
||||
}
|
||||
3
types/ol/ImageBase/index.d.ts
vendored
3
types/ol/ImageBase/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.ImageBase;
|
||||
9
types/ol/ImageCanvas.d.ts
vendored
Normal file
9
types/ol/ImageCanvas.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { Extent } from 'ol/extent';
|
||||
import ImageBase from 'ol/ImageBase';
|
||||
export default class ImageCanvas extends ImageBase {
|
||||
constructor(extent: Extent, resolution: number, pixelRatio: number, canvas: HTMLCanvasElement, opt_loader?: Loader);
|
||||
getError(): Error;
|
||||
getImage(): HTMLCanvasElement;
|
||||
getImage(): HTMLCanvasElement | HTMLImageElement | HTMLVideoElement;
|
||||
}
|
||||
export type Loader = ((param0: (() => void)) => void);
|
||||
8
types/ol/ImageState.d.ts
vendored
Normal file
8
types/ol/ImageState.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
declare enum ImageState {
|
||||
IDLE = 0,
|
||||
LOADING = 1,
|
||||
LOADED = 2,
|
||||
ERROR = 3,
|
||||
}
|
||||
|
||||
export default ImageState;
|
||||
7
types/ol/ImageTile.d.ts
vendored
Normal file
7
types/ol/ImageTile.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import Tile, { LoadFunction, Options } from 'ol/Tile';
|
||||
import { TileCoord } from 'ol/tilecoord';
|
||||
import TileState from 'ol/TileState';
|
||||
export default class ImageTile extends Tile {
|
||||
constructor(tileCoord: TileCoord, state: TileState, src: string, crossOrigin: string, tileLoadFunction: LoadFunction, opt_options?: Options);
|
||||
getImage(): HTMLCanvasElement | HTMLImageElement | HTMLVideoElement;
|
||||
}
|
||||
3
types/ol/ImageTile/index.d.ts
vendored
3
types/ol/ImageTile/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.ImageTile;
|
||||
8
types/ol/Kinetic.d.ts
vendored
Normal file
8
types/ol/Kinetic.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
export default class Kinetic {
|
||||
constructor(decay: number, minVelocity: number, delay: number);
|
||||
begin(): void;
|
||||
end(): boolean;
|
||||
getAngle(): number;
|
||||
getDistance(): number;
|
||||
update(x: number, y: number): void;
|
||||
}
|
||||
3
types/ol/Kinetic/index.d.ts
vendored
3
types/ol/Kinetic/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Kinetic;
|
||||
8
types/ol/LayerType.d.ts
vendored
Normal file
8
types/ol/LayerType.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
declare enum LayerType {
|
||||
IMAGE = 'IMAGE',
|
||||
TILE = 'TILE',
|
||||
VECTOR_TILE = 'VECTOR_TILE',
|
||||
VECTOR = 'VECTOR',
|
||||
}
|
||||
|
||||
export default LayerType;
|
||||
64
types/ol/Map.d.ts
vendored
Normal file
64
types/ol/Map.d.ts
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import MapBrowserEvent from 'ol/MapBrowserEvent';
|
||||
import MapEvent from 'ol/MapEvent';
|
||||
import { ObjectEvent } from 'ol/Object';
|
||||
import PluggableMap, { MapOptions } from 'ol/PluggableMap';
|
||||
import RenderEvent from 'ol/render/Event';
|
||||
export default class Map extends PluggableMap {
|
||||
constructor(options: MapOptions);
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'change:layerGroup', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:layerGroup', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:layerGroup', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:size', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:size', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:size', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:target', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:target', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:target', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:view', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:view', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:view', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'click', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'click', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'click', listener: (evt: MapBrowserEvent) => void): void;
|
||||
on(type: 'dblclick', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'dblclick', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'dblclick', listener: (evt: MapBrowserEvent) => void): void;
|
||||
on(type: 'moveend', listener: (evt: MapEvent) => void): EventsKey;
|
||||
once(type: 'moveend', listener: (evt: MapEvent) => void): EventsKey;
|
||||
un(type: 'moveend', listener: (evt: MapEvent) => void): void;
|
||||
on(type: 'movestart', listener: (evt: MapEvent) => void): EventsKey;
|
||||
once(type: 'movestart', listener: (evt: MapEvent) => void): EventsKey;
|
||||
un(type: 'movestart', listener: (evt: MapEvent) => void): void;
|
||||
on(type: 'pointerdrag', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'pointerdrag', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'pointerdrag', listener: (evt: MapBrowserEvent) => void): void;
|
||||
on(type: 'pointermove', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'pointermove', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'pointermove', listener: (evt: MapBrowserEvent) => void): void;
|
||||
on(type: 'postcompose', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
once(type: 'postcompose', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
un(type: 'postcompose', listener: (evt: RenderEvent) => void): void;
|
||||
on(type: 'postrender', listener: (evt: MapEvent) => void): EventsKey;
|
||||
once(type: 'postrender', listener: (evt: MapEvent) => void): EventsKey;
|
||||
un(type: 'postrender', listener: (evt: MapEvent) => void): void;
|
||||
on(type: 'precompose', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
once(type: 'precompose', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
un(type: 'precompose', listener: (evt: RenderEvent) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'rendercomplete', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
once(type: 'rendercomplete', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
un(type: 'rendercomplete', listener: (evt: RenderEvent) => void): void;
|
||||
on(type: 'singleclick', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'singleclick', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'singleclick', listener: (evt: MapBrowserEvent) => void): void;
|
||||
}
|
||||
3
types/ol/Map/index.d.ts
vendored
3
types/ol/Map/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Map;
|
||||
11
types/ol/MapBrowserEvent.d.ts
vendored
Normal file
11
types/ol/MapBrowserEvent.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
import { Coordinate } from 'ol/coordinate';
|
||||
import MapEvent from 'ol/MapEvent';
|
||||
import { Pixel } from 'ol/pixel';
|
||||
import PluggableMap, { FrameState } from 'ol/PluggableMap';
|
||||
export default class MapBrowserEvent extends MapEvent {
|
||||
constructor(type: string, map: PluggableMap, browserEvent: Event, opt_dragging?: boolean, opt_frameState?: FrameState);
|
||||
coordinate: Coordinate;
|
||||
dragging: boolean;
|
||||
pixel: Pixel;
|
||||
originalEvent: Event;
|
||||
}
|
||||
3
types/ol/MapBrowserEvent/index.d.ts
vendored
3
types/ol/MapBrowserEvent/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.MapBrowserEvent;
|
||||
5
types/ol/MapBrowserEventHandler.d.ts
vendored
Normal file
5
types/ol/MapBrowserEventHandler.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import Target from 'ol/events/Target';
|
||||
import PluggableMap from 'ol/PluggableMap';
|
||||
export default class MapBrowserEventHandler extends Target {
|
||||
constructor(map: PluggableMap, moveTolerance?: number);
|
||||
}
|
||||
16
types/ol/MapBrowserEventType.d.ts
vendored
Normal file
16
types/ol/MapBrowserEventType.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
declare enum MapBrowserEventType {
|
||||
SINGLECLICK = 'singleclick',
|
||||
CLICK = 'click',
|
||||
DBLCLICK = 'dblclick',
|
||||
POINTERDRAG = 'pointerdrag',
|
||||
POINTERMOVE = 'pointermove',
|
||||
POINTERDOWN = 'pointerdown',
|
||||
POINTERUP = 'pointerup',
|
||||
POINTEROVER = 'pointerover',
|
||||
POINTEROUT = 'pointerout',
|
||||
POINTERENTER = 'pointerenter',
|
||||
POINTERLEAVE = 'pointerleave',
|
||||
POINTERCANCEL = 'pointercancel',
|
||||
}
|
||||
|
||||
export default MapBrowserEventType;
|
||||
6
types/ol/MapBrowserPointerEvent.d.ts
vendored
Normal file
6
types/ol/MapBrowserPointerEvent.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
import MapBrowserEvent from 'ol/MapBrowserEvent';
|
||||
import PluggableMap, { FrameState } from 'ol/PluggableMap';
|
||||
import PointerEvent from 'ol/pointer/PointerEvent';
|
||||
export default class MapBrowserPointerEvent extends MapBrowserEvent {
|
||||
constructor(type: string, map: PluggableMap, pointerEvent: PointerEvent, opt_dragging?: boolean, opt_frameState?: FrameState);
|
||||
}
|
||||
3
types/ol/MapBrowserPointerEvent/index.d.ts
vendored
3
types/ol/MapBrowserPointerEvent/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.MapBrowserPointerEvent;
|
||||
7
types/ol/MapEvent.d.ts
vendored
Normal file
7
types/ol/MapEvent.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import Event from 'ol/events/Event';
|
||||
import PluggableMap, { FrameState } from 'ol/PluggableMap';
|
||||
export default class MapEvent extends Event {
|
||||
constructor(type: string, map: PluggableMap, opt_frameState?: FrameState);
|
||||
frameState: FrameState;
|
||||
map: PluggableMap;
|
||||
}
|
||||
3
types/ol/MapEvent/index.d.ts
vendored
3
types/ol/MapEvent/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.MapEvent;
|
||||
7
types/ol/MapEventType.d.ts
vendored
Normal file
7
types/ol/MapEventType.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
declare enum MapEventType {
|
||||
POSTRENDER = 'postrender',
|
||||
MOVESTART = 'movestart',
|
||||
MOVEEND = 'moveend',
|
||||
}
|
||||
|
||||
export default MapEventType;
|
||||
8
types/ol/MapProperty.d.ts
vendored
Normal file
8
types/ol/MapProperty.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
declare enum MapProperty {
|
||||
LAYERGROUP = 'layergroup',
|
||||
SIZE = 'size',
|
||||
TARGET = 'target',
|
||||
VIEW = 'view',
|
||||
}
|
||||
|
||||
export default MapProperty;
|
||||
28
types/ol/Object.d.ts
vendored
Normal file
28
types/ol/Object.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import Observable from 'ol/Observable';
|
||||
export function getChangeEventType(key: string): string;
|
||||
export class ObjectEvent extends Event {
|
||||
constructor();
|
||||
key: string;
|
||||
oldValue: any;
|
||||
}
|
||||
export default class BaseObject extends Observable {
|
||||
constructor(opt_values?: { [key: string]: any });
|
||||
get(key: string): any;
|
||||
getKeys(): string[];
|
||||
getProperties(): { [key: string]: any };
|
||||
notify(key: string, oldValue: any): void;
|
||||
set(key: string, value: any, opt_silent?: boolean): void;
|
||||
setProperties(values: { [key: string]: any }, opt_silent?: boolean): void;
|
||||
unset(key: string, opt_silent?: boolean): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
3
types/ol/Object/index.d.ts
vendored
3
types/ol/Object/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Object;
|
||||
5
types/ol/ObjectEventType.d.ts
vendored
Normal file
5
types/ol/ObjectEventType.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
declare enum ObjectEventType {
|
||||
PROPERTYCHANGE = 'propertychange',
|
||||
}
|
||||
|
||||
export default ObjectEventType;
|
||||
15
types/ol/Observable.d.ts
vendored
Normal file
15
types/ol/Observable.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import Target from 'ol/events/Target';
|
||||
export function unByKey(key: EventsKey | EventsKey[]): void;
|
||||
export default class Observable extends Target {
|
||||
constructor();
|
||||
changed(): void;
|
||||
getRevision(): number;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
}
|
||||
3
types/ol/Observable/index.d.ts
vendored
3
types/ol/Observable/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Observable;
|
||||
86
types/ol/Overlay.d.ts
vendored
Normal file
86
types/ol/Overlay.d.ts
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
import { Coordinate } from 'ol/coordinate';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import { Extent } from 'ol/extent';
|
||||
import BaseObject, { ObjectEvent } from 'ol/Object';
|
||||
import OverlayPositioning from 'ol/OverlayPositioning';
|
||||
import { Pixel } from 'ol/pixel';
|
||||
import PluggableMap from 'ol/PluggableMap';
|
||||
import { Size } from 'ol/size';
|
||||
export interface Options {
|
||||
id?: number | string;
|
||||
element?: HTMLElement;
|
||||
offset?: number[];
|
||||
position?: Coordinate;
|
||||
positioning?: OverlayPositioning;
|
||||
stopEvent?: boolean;
|
||||
insertFirst?: boolean;
|
||||
autoPan?: boolean;
|
||||
autoPanAnimation?: PanOptions;
|
||||
autoPanMargin?: number;
|
||||
className?: string;
|
||||
}
|
||||
export default class Overlay extends BaseObject {
|
||||
constructor(options: Options);
|
||||
protected autoPan: boolean;
|
||||
protected autoPanMargin: number;
|
||||
protected element: HTMLElement;
|
||||
protected stopEvent: boolean;
|
||||
protected rendered: { [key: string]: any };
|
||||
protected options: Options;
|
||||
protected autoPanAnimation: PanOptions;
|
||||
protected id: number | string;
|
||||
protected insertFirst: boolean;
|
||||
protected mapPostrenderListenerKey: EventsKey;
|
||||
protected updateRenderedPosition(pixel: Pixel, mapSize: Size): void;
|
||||
protected getRect(element: HTMLElement, size: Size): Extent;
|
||||
protected handleElementChanged(): void;
|
||||
protected handleMapChanged(): void;
|
||||
protected handleOffsetChanged(): void;
|
||||
protected handlePositionChanged(): void;
|
||||
protected setVisible(visible: boolean): void;
|
||||
protected updatePixelPosition(): void;
|
||||
protected render(): void;
|
||||
protected panIntoView(): void;
|
||||
protected handlePositioningChanged(): void;
|
||||
getPositioning(): OverlayPositioning;
|
||||
getOptions(): Options;
|
||||
getOffset(): number[];
|
||||
setElement(element: HTMLElement): void;
|
||||
setMap(map: PluggableMap): void;
|
||||
getPosition(): Coordinate;
|
||||
setPosition(position: Coordinate): void;
|
||||
setPositioning(positioning: OverlayPositioning): void;
|
||||
getMap(): PluggableMap;
|
||||
getId(): number | string;
|
||||
getElement(): HTMLElement;
|
||||
setOffset(offset: number[]): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'change:element', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:element', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:element', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:map', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:map', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:map', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:offset', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:offset', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:offset', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:position', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:position', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:position', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:positioning', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:positioning', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:positioning', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
export interface PanOptions {
|
||||
duration?: number;
|
||||
easing?: ((param0: number) => number);
|
||||
}
|
||||
3
types/ol/Overlay/index.d.ts
vendored
3
types/ol/Overlay/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Overlay;
|
||||
13
types/ol/OverlayPositioning.d.ts
vendored
Normal file
13
types/ol/OverlayPositioning.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
declare enum OverlayPositioning {
|
||||
BOTTOM_LEFT = 'bottom-left',
|
||||
BOTTOM_CENTER = 'bottom-center',
|
||||
BOTTOM_RIGHT = 'bottom-right',
|
||||
CENTER_LEFT = 'center-left',
|
||||
CENTER_CENTER = 'center-center',
|
||||
CENTER_RIGHT = 'center-right',
|
||||
TOP_LEFT = 'top-left',
|
||||
TOP_CENTER = 'top-center',
|
||||
TOP_RIGHT = 'top-right',
|
||||
}
|
||||
|
||||
export default OverlayPositioning;
|
||||
174
types/ol/PluggableMap.d.ts
vendored
Normal file
174
types/ol/PluggableMap.d.ts
vendored
Normal file
@ -0,0 +1,174 @@
|
||||
import Collection from 'ol/Collection';
|
||||
import Control from 'ol/control/Control';
|
||||
import { Coordinate } from 'ol/coordinate';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import { Extent } from 'ol/extent';
|
||||
import Feature, { FeatureLike } from 'ol/Feature';
|
||||
import Interaction from 'ol/interaction/Interaction';
|
||||
import BaseLayer from 'ol/layer/Base';
|
||||
import LayerGroup from 'ol/layer/Group';
|
||||
import Layer, { State as State_1 } from 'ol/layer/Layer';
|
||||
import MapBrowserEvent from 'ol/MapBrowserEvent';
|
||||
import MapEvent from 'ol/MapEvent';
|
||||
import BaseObject, { ObjectEvent } from 'ol/Object';
|
||||
import Overlay from 'ol/Overlay';
|
||||
import { Pixel } from 'ol/pixel';
|
||||
import RenderEvent from 'ol/render/Event';
|
||||
import MapRenderer from 'ol/renderer/Map';
|
||||
import { Size } from 'ol/size';
|
||||
import Tile from 'ol/Tile';
|
||||
import TileQueue from 'ol/TileQueue';
|
||||
import TileRange from 'ol/TileRange';
|
||||
import { Transform } from 'ol/transform';
|
||||
import View, { State } from 'ol/View';
|
||||
export interface AtPixelOptions {
|
||||
layerFilter: ((param0: Layer) => boolean);
|
||||
hitTolerance?: number;
|
||||
}
|
||||
export interface FrameState {
|
||||
pixelRatio: number;
|
||||
time: number;
|
||||
viewState: State;
|
||||
animate: boolean;
|
||||
coordinateToPixelTransform: Transform;
|
||||
extent: Extent;
|
||||
focus: Coordinate;
|
||||
index: number;
|
||||
layerStates: { [key: string]: State_1 };
|
||||
layerStatesArray: State_1[];
|
||||
pixelToCoordinateTransform: Transform;
|
||||
postRenderFunctions: PostRenderFunction[];
|
||||
size: Size;
|
||||
skippedFeatureUids: { [key: string]: boolean };
|
||||
tileQueue: TileQueue;
|
||||
usedTiles: { [key: string]: { [key: string]: TileRange } };
|
||||
viewHints: number[];
|
||||
wantedTiles: { [key: string]: { [key: string]: boolean } };
|
||||
}
|
||||
export interface MapOptions {
|
||||
controls?: Collection<Control> | Control[];
|
||||
pixelRatio?: number;
|
||||
interactions?: Collection<Interaction> | Interaction[];
|
||||
keyboardEventTarget?: HTMLElement | Document | string;
|
||||
layers?: BaseLayer[] | Collection<BaseLayer> | LayerGroup;
|
||||
maxTilesLoading?: number;
|
||||
loadTilesWhileAnimating?: boolean;
|
||||
loadTilesWhileInteracting?: boolean;
|
||||
moveTolerance?: number;
|
||||
overlays?: Collection<Overlay> | Overlay[];
|
||||
target?: HTMLElement | string;
|
||||
view?: View;
|
||||
}
|
||||
export interface MapOptionsInternal {
|
||||
controls?: Collection<Control>;
|
||||
interactions?: Collection<Interaction>;
|
||||
keyboardEventTarget: HTMLElement | Document;
|
||||
overlays: Collection<Overlay>;
|
||||
values: { [key: string]: any };
|
||||
}
|
||||
export default class PluggableMap extends BaseObject {
|
||||
constructor(options: MapOptions);
|
||||
protected controls: Collection<Control>;
|
||||
protected interactions: Collection<Interaction>;
|
||||
protected handlePostRender(): void;
|
||||
getTarget(): HTMLElement | string;
|
||||
addControl(control: Control): void;
|
||||
createRenderer(): MapRenderer;
|
||||
forEachFeatureAtPixel<S, T>(pixel: Pixel, callback: ((this: S, param1: FeatureLike, param2: Layer) => T), opt_options?: AtPixelOptions): T;
|
||||
forEachLayerAtPixel<S, T>(pixel: Pixel, callback: ((this: S, param1: Layer, param2: Uint8ClampedArray | Uint8Array) => T), opt_options?: AtPixelOptions): T;
|
||||
getControls(): Collection<Control>;
|
||||
getCoordinateFromPixel(pixel: Pixel): Coordinate;
|
||||
getEventCoordinate(event: Event): Coordinate;
|
||||
getEventPixel(event: Event | TouchEvent): Pixel;
|
||||
getFeaturesAtPixel(pixel: Pixel, opt_options?: AtPixelOptions): FeatureLike[];
|
||||
getInteractions(): Collection<Interaction>;
|
||||
getLayerGroup(): LayerGroup;
|
||||
getLayers(): Collection<BaseLayer>;
|
||||
getOverlayById(id: string | number): Overlay;
|
||||
getOverlayContainer(): HTMLElement;
|
||||
getOverlayContainerStopEvent(): HTMLElement;
|
||||
getOverlays(): Collection<Overlay>;
|
||||
getPixelFromCoordinate(coordinate: Coordinate): Pixel;
|
||||
getRenderer(): MapRenderer;
|
||||
getSize(): Size;
|
||||
addInteraction(interaction: Interaction): void;
|
||||
getTargetElement(): HTMLElement;
|
||||
getTilePriority(tile: Tile, tileSourceKey: string, tileCenter: Coordinate, tileResolution: number): number;
|
||||
getView(): View;
|
||||
getViewport(): HTMLElement;
|
||||
handleBrowserEvent(browserEvent: Event, opt_type?: string): void;
|
||||
handleMapBrowserEvent(mapBrowserEvent: MapBrowserEvent): void;
|
||||
addLayer(layer: BaseLayer): void;
|
||||
hasFeatureAtPixel<U>(pixel: Pixel, opt_options?: AtPixelOptions): boolean;
|
||||
addOverlay(overlay: Overlay): void;
|
||||
isRendered(): boolean;
|
||||
removeControl(control: Control): Control;
|
||||
removeInteraction(interaction: Interaction): Interaction;
|
||||
removeLayer(layer: BaseLayer): BaseLayer;
|
||||
removeOverlay(overlay: Overlay): Overlay;
|
||||
render(): void;
|
||||
renderSync(): void;
|
||||
setLayerGroup(layerGroup: LayerGroup): void;
|
||||
setSize(size: Size): void;
|
||||
setTarget(target: HTMLElement | string): void;
|
||||
setView(view: View): void;
|
||||
skipFeature(feature: Feature): void;
|
||||
unskipFeature(feature: Feature): void;
|
||||
updateSize(): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'change:layerGroup', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:layerGroup', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:layerGroup', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:size', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:size', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:size', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:target', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:target', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:target', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:view', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:view', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:view', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'click', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'click', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'click', listener: (evt: MapBrowserEvent) => void): void;
|
||||
on(type: 'dblclick', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'dblclick', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'dblclick', listener: (evt: MapBrowserEvent) => void): void;
|
||||
on(type: 'moveend', listener: (evt: MapEvent) => void): EventsKey;
|
||||
once(type: 'moveend', listener: (evt: MapEvent) => void): EventsKey;
|
||||
un(type: 'moveend', listener: (evt: MapEvent) => void): void;
|
||||
on(type: 'movestart', listener: (evt: MapEvent) => void): EventsKey;
|
||||
once(type: 'movestart', listener: (evt: MapEvent) => void): EventsKey;
|
||||
un(type: 'movestart', listener: (evt: MapEvent) => void): void;
|
||||
on(type: 'pointerdrag', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'pointerdrag', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'pointerdrag', listener: (evt: MapBrowserEvent) => void): void;
|
||||
on(type: 'pointermove', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'pointermove', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'pointermove', listener: (evt: MapBrowserEvent) => void): void;
|
||||
on(type: 'postcompose', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
once(type: 'postcompose', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
un(type: 'postcompose', listener: (evt: RenderEvent) => void): void;
|
||||
on(type: 'postrender', listener: (evt: MapEvent) => void): EventsKey;
|
||||
once(type: 'postrender', listener: (evt: MapEvent) => void): EventsKey;
|
||||
un(type: 'postrender', listener: (evt: MapEvent) => void): void;
|
||||
on(type: 'precompose', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
once(type: 'precompose', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
un(type: 'precompose', listener: (evt: RenderEvent) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'rendercomplete', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
once(type: 'rendercomplete', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
un(type: 'rendercomplete', listener: (evt: RenderEvent) => void): void;
|
||||
on(type: 'singleclick', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'singleclick', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'singleclick', listener: (evt: MapBrowserEvent) => void): void;
|
||||
}
|
||||
export type PostRenderFunction = ((param0: PluggableMap, param1?: FrameState) => boolean);
|
||||
24
types/ol/Tile.d.ts
vendored
Normal file
24
types/ol/Tile.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import Target from 'ol/events/Target';
|
||||
import Projection from 'ol/proj/Projection';
|
||||
import { TileCoord } from 'ol/tilecoord';
|
||||
import TileState from 'ol/TileState';
|
||||
export type LoadFunction = ((param0: Tile, param1: string) => void);
|
||||
export interface Options {
|
||||
transition?: number;
|
||||
}
|
||||
export default class Tile extends Target {
|
||||
constructor(tileCoord: TileCoord, state: TileState, opt_options?: Options);
|
||||
protected state: TileState;
|
||||
protected changed(): void;
|
||||
getAlpha(id: string, time: number): number;
|
||||
getInterimTile(): Tile;
|
||||
getKey(): string;
|
||||
getState(): TileState;
|
||||
endTransition(id: string): void;
|
||||
inTransition(id: string): boolean;
|
||||
load(): void;
|
||||
refreshInterimChain(): void;
|
||||
setState(state: TileState): void;
|
||||
getTileCoord(): TileCoord;
|
||||
}
|
||||
export type UrlFunction = ((param0: TileCoord, param1: number, param2: Projection) => string);
|
||||
3
types/ol/Tile/index.d.ts
vendored
3
types/ol/Tile/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.Tile;
|
||||
15
types/ol/TileCache.d.ts
vendored
Normal file
15
types/ol/TileCache.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import LRUCache from 'ol/structs/LRUCache';
|
||||
import TileRange from 'ol/TileRange';
|
||||
export default class TileCache extends LRUCache<any> {
|
||||
constructor(opt_highWaterMark?: number);
|
||||
expireCache(usedTiles: { [key: string]: TileRange }): void;
|
||||
pruneExceptNewestZ(): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
}
|
||||
11
types/ol/TileQueue.d.ts
vendored
Normal file
11
types/ol/TileQueue.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
import { Coordinate } from 'ol/coordinate';
|
||||
import Event from 'ol/events/Event';
|
||||
import PriorityQueue from 'ol/structs/PriorityQueue';
|
||||
import Tile from 'ol/Tile';
|
||||
export type PriorityFunction = ((param0: Tile, param1: string, param2: Coordinate, param3: number) => number);
|
||||
export default class TileQueue extends PriorityQueue<any> {
|
||||
constructor(tilePriorityFunction: PriorityFunction, tileChangeCallback: (() => void));
|
||||
protected handleTileChange(event: Event): void;
|
||||
getTilesLoading(): number;
|
||||
loadMoreTiles(maxTotalLoading: number, maxNewLoads: number): void;
|
||||
}
|
||||
15
types/ol/TileRange.d.ts
vendored
Normal file
15
types/ol/TileRange.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import { Size } from 'ol/size';
|
||||
import { TileCoord } from 'ol/tilecoord';
|
||||
export function createOrUpdate(minX: number, maxX: number, minY: number, maxY: number, tileRange?: TileRange): TileRange;
|
||||
export default class TileRange {
|
||||
constructor(minX: number, maxX: number, minY: number, maxY: number);
|
||||
contains(tileCoord: TileCoord): boolean;
|
||||
containsTileRange(tileRange: TileRange): boolean;
|
||||
containsXY(x: number, y: number): boolean;
|
||||
equals(tileRange: TileRange): boolean;
|
||||
extend(tileRange: TileRange): void;
|
||||
getHeight(): number;
|
||||
getSize(): Size;
|
||||
getWidth(): number;
|
||||
intersects(tileRange: TileRange): boolean;
|
||||
}
|
||||
10
types/ol/TileState.d.ts
vendored
Normal file
10
types/ol/TileState.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
declare enum TileState {
|
||||
IDLE = 0,
|
||||
LOADING = 1,
|
||||
LOADED = 2,
|
||||
ERROR = 3,
|
||||
EMPTY = 4,
|
||||
ABORT = 5,
|
||||
}
|
||||
|
||||
export default TileState;
|
||||
25
types/ol/VectorImageTile.d.ts
vendored
Normal file
25
types/ol/VectorImageTile.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
import Event from 'ol/events/Event';
|
||||
import FeatureFormat from 'ol/format/Feature';
|
||||
import Layer from 'ol/layer/Layer';
|
||||
import Projection from 'ol/proj/Projection';
|
||||
import { OrderFunction } from 'ol/render';
|
||||
import VectorTile_1 from 'ol/source/VectorTile';
|
||||
import Tile, { LoadFunction, UrlFunction } from 'ol/Tile';
|
||||
import { TileCoord } from 'ol/tilecoord';
|
||||
import TileGrid from 'ol/tilegrid/TileGrid';
|
||||
import TileState from 'ol/TileState';
|
||||
import VectorTile from 'ol/VectorTile';
|
||||
export function defaultLoadFunction(tile: VectorTile, url: string): void;
|
||||
export interface ReplayState {
|
||||
dirty: boolean;
|
||||
renderedRenderOrder: OrderFunction;
|
||||
renderedTileRevision: number;
|
||||
renderedRevision: number;
|
||||
}
|
||||
export default class VectorImageTile extends Tile {
|
||||
constructor(tileCoord: TileCoord, state: TileState, sourceRevision: number, format: FeatureFormat, tileLoadFunction: LoadFunction, urlTileCoord: TileCoord, tileUrlFunction: UrlFunction, sourceTileGrid: TileGrid, tileGrid: TileGrid, sourceTiles: { [key: string]: VectorTile }, pixelRatio: number, projection: Projection, tileClass: VectorTile, handleTileChange: ((this: VectorTile_1, param1: Event) => void), zoom: number);
|
||||
getContext(layer: Layer): CanvasRenderingContext2D;
|
||||
getImage(layer: Layer): HTMLCanvasElement;
|
||||
getReplayState(layer: Layer): ReplayState;
|
||||
getTile(tileKey: string): VectorTile;
|
||||
}
|
||||
25
types/ol/VectorTile.d.ts
vendored
Normal file
25
types/ol/VectorTile.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
import { Extent } from 'ol/extent';
|
||||
import Feature, { FeatureLike } from 'ol/Feature';
|
||||
import { FeatureLoader } from 'ol/featureloader';
|
||||
import FeatureFormat from 'ol/format/Feature';
|
||||
import Layer from 'ol/layer/Layer';
|
||||
import Projection from 'ol/proj/Projection';
|
||||
import ReplayGroup from 'ol/render/ReplayGroup';
|
||||
import Tile, { LoadFunction, Options } from 'ol/Tile';
|
||||
import { TileCoord } from 'ol/tilecoord';
|
||||
import TileState from 'ol/TileState';
|
||||
export default class VectorTile extends Tile {
|
||||
constructor(tileCoord: TileCoord, state: TileState, src: string, format: FeatureFormat, tileLoadFunction: LoadFunction, opt_options?: Options);
|
||||
onLoad(features: Feature[], dataProjection: Projection, extent: Extent): void;
|
||||
getExtent(): Extent;
|
||||
getFormat(): FeatureFormat;
|
||||
getProjection(): Projection;
|
||||
getReplayGroup(layer: Layer, key: string): ReplayGroup;
|
||||
onError(): void;
|
||||
getFeatures(): FeatureLike[];
|
||||
setExtent(extent: Extent): void;
|
||||
setFeatures(features: Feature[]): void;
|
||||
setLoader(loader: FeatureLoader): void;
|
||||
setProjection(projection: Projection): void;
|
||||
setReplayGroup(layer: Layer, key: string, replayGroup: ReplayGroup): void;
|
||||
}
|
||||
3
types/ol/VectorTile/index.d.ts
vendored
3
types/ol/VectorTile/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.VectorTile;
|
||||
143
types/ol/View.d.ts
vendored
Normal file
143
types/ol/View.d.ts
vendored
Normal file
@ -0,0 +1,143 @@
|
||||
import { Type } from 'ol/centerconstraint';
|
||||
import { Coordinate } from 'ol/coordinate';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import { Extent } from 'ol/extent';
|
||||
import SimpleGeometry from 'ol/geom/SimpleGeometry';
|
||||
import BaseObject, { ObjectEvent } from 'ol/Object';
|
||||
import { Pixel } from 'ol/pixel';
|
||||
import { ProjectionLike } from 'ol/proj';
|
||||
import Projection from 'ol/proj/Projection';
|
||||
import { Type as Type_2 } from 'ol/resolutionconstraint';
|
||||
import { Type as Type_1 } from 'ol/rotationconstraint';
|
||||
import { Size } from 'ol/size';
|
||||
import ViewHint from 'ol/ViewHint';
|
||||
export function createCenterConstraint(options: ViewOptions): Type;
|
||||
export function createResolutionConstraint(options: ViewOptions): { [key: string]: any };
|
||||
export function createRotationConstraint(options: ViewOptions): Type_1;
|
||||
export function isNoopAnimation(animation: Animation): boolean;
|
||||
export interface Animation {
|
||||
sourceCenter?: Coordinate;
|
||||
targetCenter?: Coordinate;
|
||||
sourceResolution?: number;
|
||||
targetResolution?: number;
|
||||
sourceRotation?: number;
|
||||
targetRotation?: number;
|
||||
anchor?: Coordinate;
|
||||
start: number;
|
||||
duration: number;
|
||||
complete: boolean;
|
||||
easing: ((param0: number) => number);
|
||||
callback: ((param0: boolean) => void);
|
||||
}
|
||||
export interface AnimationOptions {
|
||||
center?: Coordinate;
|
||||
zoom?: number;
|
||||
resolution?: number;
|
||||
rotation?: number;
|
||||
anchor?: Coordinate;
|
||||
duration?: number;
|
||||
easing?: ((param0: number) => number);
|
||||
}
|
||||
export interface Constraints {
|
||||
center: Type;
|
||||
resolution: Type_2;
|
||||
rotation: Type_1;
|
||||
}
|
||||
export interface FitOptions {
|
||||
size?: Size;
|
||||
padding?: number[];
|
||||
constrainResolution?: boolean;
|
||||
nearest?: boolean;
|
||||
minResolution?: number;
|
||||
maxZoom?: number;
|
||||
duration?: number;
|
||||
easing?: ((param0: number) => number);
|
||||
callback?: ((param0: boolean) => void);
|
||||
}
|
||||
export interface State {
|
||||
center: Coordinate;
|
||||
projection: Projection;
|
||||
resolution: number;
|
||||
rotation: number;
|
||||
zoom: number;
|
||||
}
|
||||
export default class View extends BaseObject {
|
||||
constructor(opt_options?: ViewOptions);
|
||||
getResolution(): number;
|
||||
animate(...var_args: (AnimationOptions | ((param0: boolean) => void))[]): void;
|
||||
calculateCenterRotate(rotation: number, anchor: Coordinate): Coordinate;
|
||||
calculateCenterZoom(resolution: number, anchor: Coordinate): Coordinate;
|
||||
calculateExtent(opt_size?: Size): Extent;
|
||||
cancelAnimations(): void;
|
||||
centerOn(coordinate: Coordinate, size: Size, position: Pixel): void;
|
||||
constrainCenter(center: Coordinate): Coordinate;
|
||||
constrainResolution(resolution: number, opt_delta?: number, opt_direction?: number): number;
|
||||
constrainRotation(rotation: number, opt_delta?: number): number;
|
||||
fit(geometryOrExtent: SimpleGeometry | Extent, opt_options?: FitOptions): void;
|
||||
getAnimating(): boolean;
|
||||
getCenter(): Coordinate;
|
||||
getConstraints(): Constraints;
|
||||
getHints(opt_hints?: number[]): number[];
|
||||
getInteracting(): boolean;
|
||||
getMaxResolution(): number;
|
||||
getMaxZoom(): number;
|
||||
getMinResolution(): number;
|
||||
getMinZoom(): number;
|
||||
getProjection(): Projection;
|
||||
applyOptions_(options: ViewOptions): void;
|
||||
getResolutionForExtent(extent: Extent, opt_size?: Size): number;
|
||||
getResolutionForValueFunction(opt_power?: number): ((param0: number) => number);
|
||||
getResolutionForZoom(zoom: number): number;
|
||||
getResolutions(): number[];
|
||||
getRotation(): number;
|
||||
getState(pixelRatio: number): State;
|
||||
getUpdatedOptions_(newOptions: ViewOptions): ViewOptions;
|
||||
getValueForResolutionFunction(opt_power?: number): ((param0: number) => number);
|
||||
getZoom(): number;
|
||||
getZoomForResolution(resolution: number): number;
|
||||
isDef(): boolean;
|
||||
rotate(rotation: number, opt_anchor?: Coordinate): void;
|
||||
setCenter(center: Coordinate): void;
|
||||
setHint(hint: ViewHint, delta: number): number;
|
||||
setMaxZoom(zoom: number): void;
|
||||
setMinZoom(zoom: number): void;
|
||||
setResolution(resolution: number): void;
|
||||
setRotation(rotation: number): void;
|
||||
setZoom(zoom: number): void;
|
||||
updateAnimations_(): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'change:center', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:center', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:center', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:resolution', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:resolution', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:resolution', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:rotation', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:rotation', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:rotation', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
export interface ViewOptions {
|
||||
center?: Coordinate;
|
||||
constrainRotation?: boolean | number;
|
||||
enableRotation?: boolean;
|
||||
extent?: Extent;
|
||||
maxResolution?: number;
|
||||
minResolution?: number;
|
||||
maxZoom?: number;
|
||||
minZoom?: number;
|
||||
projection?: ProjectionLike;
|
||||
resolution?: number;
|
||||
resolutions?: number[];
|
||||
rotation?: number;
|
||||
zoom?: number;
|
||||
zoomFactor?: number;
|
||||
}
|
||||
3
types/ol/View/index.d.ts
vendored
3
types/ol/View/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.View;
|
||||
6
types/ol/ViewHint.d.ts
vendored
Normal file
6
types/ol/ViewHint.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
declare enum ViewHint {
|
||||
ANIMATING = 0,
|
||||
INTERACTING = 1,
|
||||
}
|
||||
|
||||
export default ViewHint;
|
||||
7
types/ol/ViewProperty.d.ts
vendored
Normal file
7
types/ol/ViewProperty.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
declare enum ViewProperty {
|
||||
CENTER = 'center',
|
||||
RESOLUTION = 'resolution',
|
||||
ROTATION = 'rotation',
|
||||
}
|
||||
|
||||
export default ViewProperty;
|
||||
64
types/ol/WebGLMap.d.ts
vendored
Normal file
64
types/ol/WebGLMap.d.ts
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import MapBrowserEvent from 'ol/MapBrowserEvent';
|
||||
import MapEvent from 'ol/MapEvent';
|
||||
import { ObjectEvent } from 'ol/Object';
|
||||
import PluggableMap, { MapOptions } from 'ol/PluggableMap';
|
||||
import RenderEvent from 'ol/render/Event';
|
||||
export default class WebGLMap extends PluggableMap {
|
||||
constructor(options: MapOptions);
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'change:layerGroup', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:layerGroup', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:layerGroup', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:size', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:size', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:size', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:target', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:target', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:target', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:view', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:view', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:view', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'click', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'click', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'click', listener: (evt: MapBrowserEvent) => void): void;
|
||||
on(type: 'dblclick', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'dblclick', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'dblclick', listener: (evt: MapBrowserEvent) => void): void;
|
||||
on(type: 'moveend', listener: (evt: MapEvent) => void): EventsKey;
|
||||
once(type: 'moveend', listener: (evt: MapEvent) => void): EventsKey;
|
||||
un(type: 'moveend', listener: (evt: MapEvent) => void): void;
|
||||
on(type: 'movestart', listener: (evt: MapEvent) => void): EventsKey;
|
||||
once(type: 'movestart', listener: (evt: MapEvent) => void): EventsKey;
|
||||
un(type: 'movestart', listener: (evt: MapEvent) => void): void;
|
||||
on(type: 'pointerdrag', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'pointerdrag', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'pointerdrag', listener: (evt: MapBrowserEvent) => void): void;
|
||||
on(type: 'pointermove', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'pointermove', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'pointermove', listener: (evt: MapBrowserEvent) => void): void;
|
||||
on(type: 'postcompose', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
once(type: 'postcompose', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
un(type: 'postcompose', listener: (evt: RenderEvent) => void): void;
|
||||
on(type: 'postrender', listener: (evt: MapEvent) => void): EventsKey;
|
||||
once(type: 'postrender', listener: (evt: MapEvent) => void): EventsKey;
|
||||
un(type: 'postrender', listener: (evt: MapEvent) => void): void;
|
||||
on(type: 'precompose', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
once(type: 'precompose', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
un(type: 'precompose', listener: (evt: RenderEvent) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'rendercomplete', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
once(type: 'rendercomplete', listener: (evt: RenderEvent) => void): EventsKey;
|
||||
un(type: 'rendercomplete', listener: (evt: RenderEvent) => void): void;
|
||||
on(type: 'singleclick', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
once(type: 'singleclick', listener: (evt: MapBrowserEvent) => void): EventsKey;
|
||||
un(type: 'singleclick', listener: (evt: MapBrowserEvent) => void): void;
|
||||
}
|
||||
12
types/ol/array.d.ts
vendored
Normal file
12
types/ol/array.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
export function binarySearch(haystack: any[], needle: any, opt_comparator?: (() => void)): number;
|
||||
export function equals(arr1: any[] | Uint8ClampedArray, arr2: any[] | Uint8ClampedArray): boolean;
|
||||
export function extend<VALUE>(arr: VALUE[], data: VALUE[] | VALUE): void;
|
||||
export function find<VALUE>(arr: VALUE[], func: (() => void)): VALUE;
|
||||
export function findIndex(arr: any[], func: (() => void)): number;
|
||||
export function includes(arr: any[], obj: any): boolean;
|
||||
export function isSorted(arr: any[], opt_func?: (() => void), opt_strict?: boolean): boolean;
|
||||
export function linearFindNearest(arr: number[], target: number, direction: number): number;
|
||||
export function numberSafeCompareFunction(a: any, b: any): number;
|
||||
export function remove<VALUE>(arr: VALUE[], obj: VALUE): boolean;
|
||||
export function reverseSubArray(arr: any[], begin: number, end: number): void;
|
||||
export function stableSort(arr: any[], compareFnc: (() => void)): void;
|
||||
1
types/ol/asserts.d.ts
vendored
Normal file
1
types/ol/asserts.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export function assert(assertion: any, errorCode: number): void;
|
||||
5
types/ol/centerconstraint.d.ts
vendored
Normal file
5
types/ol/centerconstraint.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import { Coordinate } from 'ol/coordinate';
|
||||
import { Extent } from 'ol/extent';
|
||||
export function createExtent(extent: Extent): Type;
|
||||
export function none(center?: Coordinate): Coordinate;
|
||||
export type Type = ((param0: Coordinate) => Coordinate);
|
||||
5
types/ol/color.d.ts
vendored
Normal file
5
types/ol/color.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export function asArray(color: Color | string): Color;
|
||||
export function asString(color: Color | string): string;
|
||||
export function normalize(color: Color): Color;
|
||||
export function toString(color: Color): string;
|
||||
export type Color = number[];
|
||||
3
types/ol/color/index.d.ts
vendored
3
types/ol/color/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.color;
|
||||
3
types/ol/colorlike.d.ts
vendored
Normal file
3
types/ol/colorlike.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { Color } from 'ol/color';
|
||||
export function asColorLike(color: Color | ColorLike): ColorLike;
|
||||
export type ColorLike = string | CanvasPattern | CanvasGradient;
|
||||
3
types/ol/colorlike/index.d.ts
vendored
3
types/ol/colorlike/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.colorlike;
|
||||
35
types/ol/control/Attribution.d.ts
vendored
35
types/ol/control/Attribution.d.ts
vendored
@ -1,3 +1,32 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.control.Attribution;
|
||||
import Control from 'ol/control/Control';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import MapEvent from 'ol/MapEvent';
|
||||
import { ObjectEvent } from 'ol/Object';
|
||||
export function render(mapEvent: MapEvent): void;
|
||||
export default class Attribution extends Control {
|
||||
constructor(opt_options?: Options);
|
||||
getCollapsed(): boolean;
|
||||
getCollapsible(): boolean;
|
||||
setCollapsed(collapsed: boolean): void;
|
||||
setCollapsible(collapsible: boolean): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
export interface Options {
|
||||
className?: string;
|
||||
target?: HTMLElement | string;
|
||||
collapsible?: boolean;
|
||||
collapsed?: boolean;
|
||||
tipLabel?: string;
|
||||
label?: string | HTMLElement;
|
||||
collapseLabel?: string | HTMLElement;
|
||||
render?: ((param0: MapEvent) => void);
|
||||
}
|
||||
|
||||
30
types/ol/control/Control.d.ts
vendored
30
types/ol/control/Control.d.ts
vendored
@ -1,3 +1,27 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.control.Control;
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import MapEvent from 'ol/MapEvent';
|
||||
import BaseObject, { ObjectEvent } from 'ol/Object';
|
||||
import PluggableMap from 'ol/PluggableMap';
|
||||
export default class Control extends BaseObject {
|
||||
constructor(options: Options);
|
||||
protected element: HTMLElement;
|
||||
protected listenerKeys: EventsKey[];
|
||||
getMap(): PluggableMap;
|
||||
setMap(map: PluggableMap): void;
|
||||
setTarget(target: HTMLElement | string): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
export interface Options {
|
||||
element?: HTMLElement;
|
||||
render?: ((param0: MapEvent) => void);
|
||||
target?: HTMLElement | string;
|
||||
}
|
||||
|
||||
25
types/ol/control/FullScreen.d.ts
vendored
Normal file
25
types/ol/control/FullScreen.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
import Control from 'ol/control/Control';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import { ObjectEvent } from 'ol/Object';
|
||||
export default class FullScreen extends Control {
|
||||
constructor(opt_options?: Options);
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
export interface Options {
|
||||
className?: string;
|
||||
label?: string | Text | HTMLElement;
|
||||
labelActive?: string | Text | HTMLElement;
|
||||
tipLabel?: string;
|
||||
keys?: boolean;
|
||||
target?: HTMLElement | string;
|
||||
source?: HTMLElement | string;
|
||||
}
|
||||
3
types/ol/control/Fullscreen.d.ts
vendored
3
types/ol/control/Fullscreen.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.control.FullScreen;
|
||||
44
types/ol/control/MousePosition.d.ts
vendored
44
types/ol/control/MousePosition.d.ts
vendored
@ -1,3 +1,41 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.control.MousePosition;
|
||||
import Control from 'ol/control/Control';
|
||||
import { CoordinateFormat } from 'ol/coordinate';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import MapEvent from 'ol/MapEvent';
|
||||
import { ObjectEvent } from 'ol/Object';
|
||||
import { ProjectionLike } from 'ol/proj';
|
||||
import Projection from 'ol/proj/Projection';
|
||||
export function render(mapEvent: MapEvent): void;
|
||||
export default class MousePosition extends Control {
|
||||
constructor(opt_options?: Options);
|
||||
protected handleMouseMove(event: Event): void;
|
||||
protected handleMouseOut(event: Event): void;
|
||||
getCoordinateFormat(): CoordinateFormat;
|
||||
getProjection(): Projection;
|
||||
setCoordinateFormat(format: CoordinateFormat): void;
|
||||
setProjection(projection: ProjectionLike): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'change:coordinateFormat', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:coordinateFormat', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:coordinateFormat', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'change:projection', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:projection', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:projection', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
export interface Options {
|
||||
className?: string;
|
||||
coordinateFormat?: CoordinateFormat;
|
||||
projection?: ProjectionLike;
|
||||
render?: ((param0: MapEvent) => void);
|
||||
target?: HTMLElement | string;
|
||||
undefinedHTML?: string;
|
||||
}
|
||||
|
||||
42
types/ol/control/OverviewMap.d.ts
vendored
42
types/ol/control/OverviewMap.d.ts
vendored
@ -1,3 +1,39 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.control.OverviewMap;
|
||||
import Collection from 'ol/Collection';
|
||||
import Control from 'ol/control/Control';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import Layer from 'ol/layer/Layer';
|
||||
import MapEvent from 'ol/MapEvent';
|
||||
import { ObjectEvent } from 'ol/Object';
|
||||
import PluggableMap from 'ol/PluggableMap';
|
||||
import View from 'ol/View';
|
||||
export function render(mapEvent: MapEvent): void;
|
||||
export interface Options {
|
||||
className?: string;
|
||||
collapsed?: boolean;
|
||||
collapseLabel?: string | HTMLElement;
|
||||
collapsible?: boolean;
|
||||
label?: string | HTMLElement;
|
||||
layers?: Layer[] | Collection<Layer>;
|
||||
render?: ((param0: MapEvent) => void);
|
||||
target?: HTMLElement | string;
|
||||
tipLabel?: string;
|
||||
view?: View;
|
||||
}
|
||||
export default class OverviewMap extends Control {
|
||||
constructor(opt_options?: Options);
|
||||
getCollapsed(): boolean;
|
||||
getCollapsible(): boolean;
|
||||
getOverviewMap(): PluggableMap;
|
||||
setCollapsed(collapsed: boolean): void;
|
||||
setCollapsible(collapsible: boolean): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
|
||||
31
types/ol/control/Rotate.d.ts
vendored
31
types/ol/control/Rotate.d.ts
vendored
@ -1,3 +1,28 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.control.Rotate;
|
||||
import Control from 'ol/control/Control';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import MapEvent from 'ol/MapEvent';
|
||||
import { ObjectEvent } from 'ol/Object';
|
||||
export function render(mapEvent: MapEvent): void;
|
||||
export interface Options {
|
||||
className?: string;
|
||||
label?: string | HTMLElement;
|
||||
tipLabel?: string;
|
||||
duration?: number;
|
||||
autoHide?: boolean;
|
||||
render?: ((param0: MapEvent) => void);
|
||||
resetNorth?: (() => void);
|
||||
target?: HTMLElement | string;
|
||||
}
|
||||
export default class Rotate extends Control {
|
||||
constructor(opt_options?: Options);
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
|
||||
40
types/ol/control/ScaleLine.d.ts
vendored
40
types/ol/control/ScaleLine.d.ts
vendored
@ -1,3 +1,37 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.control.ScaleLine;
|
||||
import Control from 'ol/control/Control';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import MapEvent from 'ol/MapEvent';
|
||||
import { ObjectEvent } from 'ol/Object';
|
||||
export function render(mapEvent: MapEvent): void;
|
||||
export interface Options {
|
||||
className?: string;
|
||||
minWidth?: number;
|
||||
render?: ((param0: MapEvent) => void);
|
||||
target?: HTMLElement | string;
|
||||
units?: Units | string;
|
||||
}
|
||||
export default class ScaleLine extends Control {
|
||||
constructor(opt_options?: Options);
|
||||
getUnits(): Units;
|
||||
setUnits(units: Units): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'change:units', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'change:units', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'change:units', listener: (evt: ObjectEvent) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
export enum Units {
|
||||
DEGREES = 'degrees',
|
||||
IMPERIAL = 'imperial',
|
||||
NAUTICAL = 'nautical',
|
||||
METRIC = 'metric',
|
||||
US = 'us',
|
||||
}
|
||||
|
||||
29
types/ol/control/Zoom.d.ts
vendored
29
types/ol/control/Zoom.d.ts
vendored
@ -1,3 +1,26 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.control.Zoom;
|
||||
import Control from 'ol/control/Control';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import { ObjectEvent } from 'ol/Object';
|
||||
export interface Options {
|
||||
duration?: number;
|
||||
className?: string;
|
||||
zoomInLabel?: string | HTMLElement;
|
||||
zoomOutLabel?: string | HTMLElement;
|
||||
zoomInTipLabel?: string;
|
||||
zoomOutTipLabel?: string;
|
||||
delta?: number;
|
||||
target?: HTMLElement | string;
|
||||
}
|
||||
export default class Zoom extends Control {
|
||||
constructor(opt_options?: Options);
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
|
||||
26
types/ol/control/ZoomSlider.d.ts
vendored
26
types/ol/control/ZoomSlider.d.ts
vendored
@ -1,3 +1,23 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.control.ZoomSlider;
|
||||
import Control from 'ol/control/Control';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import MapEvent from 'ol/MapEvent';
|
||||
import { ObjectEvent } from 'ol/Object';
|
||||
export function render(mapEvent: MapEvent): void;
|
||||
export interface Options {
|
||||
className?: string;
|
||||
duration?: number;
|
||||
render?: ((param0: MapEvent) => void);
|
||||
}
|
||||
export default class ZoomSlider extends Control {
|
||||
constructor(opt_options?: Options);
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
|
||||
29
types/ol/control/ZoomToExtent.d.ts
vendored
29
types/ol/control/ZoomToExtent.d.ts
vendored
@ -1,3 +1,26 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.control.ZoomToExtent;
|
||||
import Control from 'ol/control/Control';
|
||||
import { EventsKey } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
import { Extent } from 'ol/extent';
|
||||
import { ObjectEvent } from 'ol/Object';
|
||||
export interface Options {
|
||||
className?: string;
|
||||
target?: HTMLElement | string;
|
||||
label?: string | HTMLElement;
|
||||
tipLabel?: string;
|
||||
extent?: Extent;
|
||||
}
|
||||
export default class ZoomToExtent extends Control {
|
||||
constructor(opt_options?: Options);
|
||||
protected extent: Extent;
|
||||
protected handleZoomToExtent(): void;
|
||||
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: ((param0: any) => void)): void;
|
||||
on(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
once(type: 'change', listener: (evt: Event) => void): EventsKey;
|
||||
un(type: 'change', listener: (evt: Event) => void): void;
|
||||
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
|
||||
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
|
||||
}
|
||||
|
||||
17
types/ol/control/index.d.ts
vendored
17
types/ol/control/index.d.ts
vendored
@ -1,3 +1,14 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.control;
|
||||
import Collection from 'ol/Collection';
|
||||
import Control from 'ol/control/Control';
|
||||
import { DefaultsOptions } from 'ol/control/util';
|
||||
export { default as Attribution } from 'ol/control/Attribution';
|
||||
export { default as Control } from 'ol/control/Control';
|
||||
export { default as FullScreen } from 'ol/control/FullScreen';
|
||||
export { default as MousePosition } from 'ol/control/MousePosition';
|
||||
export { default as OverviewMap } from 'ol/control/OverviewMap';
|
||||
export { default as Rotate } from 'ol/control/Rotate';
|
||||
export { default as ScaleLine } from 'ol/control/ScaleLine';
|
||||
export { default as Zoom } from 'ol/control/Zoom';
|
||||
export { default as ZoomSlider } from 'ol/control/ZoomSlider';
|
||||
export { default as ZoomToExtent } from 'ol/control/ZoomToExtent';
|
||||
export function defaults(opt_options?: DefaultsOptions): Collection<Control>;
|
||||
|
||||
11
types/ol/control/util.d.ts
vendored
Normal file
11
types/ol/control/util.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
import { Options } from 'ol/control/Attribution';
|
||||
import { Options as Options_1 } from 'ol/control/Rotate';
|
||||
import { Options as Options_2 } from 'ol/control/Zoom';
|
||||
export interface DefaultsOptions {
|
||||
attribution?: boolean;
|
||||
attributionOptions?: Options;
|
||||
rotate?: boolean;
|
||||
rotateOptions?: Options_1;
|
||||
zoom?: boolean;
|
||||
zoomOptions?: Options_2;
|
||||
}
|
||||
17
types/ol/coordinate.d.ts
vendored
Normal file
17
types/ol/coordinate.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import Circle from 'ol/geom/Circle';
|
||||
export function add(coordinate: Coordinate, delta: Coordinate): Coordinate;
|
||||
export function closestOnCircle(coordinate: Coordinate, circle: Circle): Coordinate;
|
||||
export function closestOnSegment(coordinate: Coordinate, segment: Coordinate[]): Coordinate;
|
||||
export function createStringXY(opt_fractionDigits?: number): CoordinateFormat;
|
||||
export function degreesToStringHDMS(hemispheres: string, degrees: number, opt_fractionDigits?: number): string;
|
||||
export function distance(coord1: Coordinate, coord2: Coordinate): number;
|
||||
export function equals(coordinate1: Coordinate, coordinate2: Coordinate): boolean;
|
||||
export function format(coordinate: Coordinate, template: string, opt_fractionDigits?: number): string;
|
||||
export function rotate(coordinate: Coordinate, angle: number): Coordinate;
|
||||
export function scale(coordinate: Coordinate, scale: number): Coordinate;
|
||||
export function squaredDistance(coord1: Coordinate, coord2: Coordinate): number;
|
||||
export function squaredDistanceToSegment(coordinate: Coordinate, segment: Coordinate[]): number;
|
||||
export function toStringHDMS(coordinate: Coordinate, opt_fractionDigits?: number): string;
|
||||
export function toStringXY(coordinate: Coordinate, opt_fractionDigits?: number): string;
|
||||
export type Coordinate = number[];
|
||||
export type CoordinateFormat = ((param0: Coordinate) => string);
|
||||
3
types/ol/coordinate/index.d.ts
vendored
3
types/ol/coordinate/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.coordinate;
|
||||
7
types/ol/css.d.ts
vendored
Normal file
7
types/ol/css.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
export const CLASS_COLLAPSED: string;
|
||||
export const CLASS_CONTROL: string;
|
||||
export const CLASS_HIDDEN: string;
|
||||
export const CLASS_SELECTABLE: string;
|
||||
export const CLASS_UNSELECTABLE: string;
|
||||
export const CLASS_UNSUPPORTED: string;
|
||||
export const getFontFamilies: ((param0: string) => { [key: string]: any });
|
||||
3
types/ol/deviceorientation/index.d.ts
vendored
3
types/ol/deviceorientation/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.DeviceOrientation;
|
||||
6
types/ol/dom.d.ts
vendored
Normal file
6
types/ol/dom.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
export function createCanvasContext2D(opt_width?: number, opt_height?: number): CanvasRenderingContext2D;
|
||||
export function outerHeight(element: HTMLElement): number;
|
||||
export function outerWidth(element: HTMLElement): number;
|
||||
export function removeChildren(node: Node): void;
|
||||
export function removeNode(node: Node): Node;
|
||||
export function replaceNode(newNode: Node, oldNode: Node): void;
|
||||
5
types/ol/easing.d.ts
vendored
Normal file
5
types/ol/easing.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export function easeIn(t: number): number;
|
||||
export function easeOut(t: number): number;
|
||||
export function inAndOut(t: number): number;
|
||||
export function linear(t: number): number;
|
||||
export function upAndDown(t: number): number;
|
||||
3
types/ol/easing/index.d.ts
vendored
3
types/ol/easing/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.easing;
|
||||
12
types/ol/events/Event.d.ts
vendored
12
types/ol/events/Event.d.ts
vendored
@ -1,3 +1,9 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.events.Event;
|
||||
export function preventDefault(evt: Event | Event): void;
|
||||
export function stopPropagation(evt: Event | Event): void;
|
||||
export default class Event {
|
||||
constructor(type: string);
|
||||
target: { [key: string]: any };
|
||||
type: string;
|
||||
preventDefault(): void;
|
||||
stopPropagation(): void;
|
||||
}
|
||||
|
||||
3
types/ol/events/EventTarget.d.ts
vendored
3
types/ol/events/EventTarget.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.events.EventTarget;
|
||||
27
types/ol/events/EventType.d.ts
vendored
Normal file
27
types/ol/events/EventType.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
declare enum EventType {
|
||||
CHANGE = 'change',
|
||||
CLEAR = 'clear',
|
||||
CONTEXTMENU = 'contextmenu',
|
||||
CLICK = 'click',
|
||||
DBLCLICK = 'dblclick',
|
||||
DRAGENTER = 'dragenter',
|
||||
DRAGOVER = 'dragover',
|
||||
DROP = 'drop',
|
||||
ERROR = 'error',
|
||||
KEYDOWN = 'keydown',
|
||||
KEYPRESS = 'keypress',
|
||||
LOAD = 'load',
|
||||
MOUSEDOWN = 'mousedown',
|
||||
MOUSEMOVE = 'mousemove',
|
||||
MOUSEOUT = 'mouseout',
|
||||
MOUSEUP = 'mouseup',
|
||||
MOUSEWHEEL = 'mousewheel',
|
||||
MSPOINTERDOWN = 'MSPointerDown',
|
||||
RESIZE = 'resize',
|
||||
TOUCHSTART = 'touchstart',
|
||||
TOUCHMOVE = 'touchmove',
|
||||
TOUCHEND = 'touchend',
|
||||
WHEEL = 'wheel',
|
||||
}
|
||||
|
||||
export default EventType;
|
||||
8
types/ol/events/KeyCode.d.ts
vendored
Normal file
8
types/ol/events/KeyCode.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
declare enum KeyCode {
|
||||
LEFT = 37,
|
||||
UP = 38,
|
||||
RIGHT = 39,
|
||||
DOWN = 40,
|
||||
}
|
||||
|
||||
export default KeyCode;
|
||||
12
types/ol/events/Target.d.ts
vendored
Normal file
12
types/ol/events/Target.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import Disposable from 'ol/Disposable';
|
||||
import { ListenerFunction } from 'ol/events';
|
||||
import Event from 'ol/events/Event';
|
||||
export type EventTargetLike = EventTarget | Target;
|
||||
export default class Target extends Disposable {
|
||||
constructor();
|
||||
addEventListener(type: string, listener: ListenerFunction): void;
|
||||
dispatchEvent(event: { [key: string]: any } | Event | string): boolean;
|
||||
getListeners(type: string): ListenerFunction[];
|
||||
hasListener(opt_type?: string): boolean;
|
||||
removeEventListener(type: string, listener: ListenerFunction): void;
|
||||
}
|
||||
22
types/ol/events/condition.d.ts
vendored
22
types/ol/events/condition.d.ts
vendored
@ -1,3 +1,19 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.events.condition;
|
||||
import { TRUE, FALSE } from 'ol/functions';
|
||||
import MapBrowserEvent from 'ol/MapBrowserEvent';
|
||||
export function altKeyOnly(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
export function altShiftKeysOnly(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
export const always: typeof TRUE;
|
||||
export function click(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
export type Condition = ((this: any, param1: MapBrowserEvent) => boolean);
|
||||
export function doubleClick(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
export function focus(event: MapBrowserEvent): boolean;
|
||||
export function mouseActionButton(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
export function mouseOnly(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
export const never: typeof FALSE;
|
||||
export function noModifierKeys(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
export function platformModifierKeyOnly(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
export function pointerMove(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
export function primaryAction(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
export function shiftKeyOnly(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
export function singleClick(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
export function targetNotEditable(mapBrowserEvent: MapBrowserEvent): boolean;
|
||||
|
||||
23
types/ol/events/index.d.ts
vendored
23
types/ol/events/index.d.ts
vendored
@ -1,3 +1,20 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.events;
|
||||
import Event from 'ol/events/Event';
|
||||
import { EventTargetLike } from 'ol/events/Target';
|
||||
export function bindListener(listenerObj: EventsKey): ListenerFunction;
|
||||
export function findListener(listeners: EventsKey[], listener: (() => void), opt_this?: { [key: string]: any }, opt_setDeleteIndex?: boolean): EventsKey;
|
||||
export function getListeners(target: EventTargetLike, type: string): EventsKey[];
|
||||
export function listen(target: EventTargetLike, type: string, listener: ListenerFunction, opt_this?: { [key: string]: any }, opt_once?: boolean): EventsKey;
|
||||
export function listenOnce(target: EventTargetLike, type: string, listener: ListenerFunction, opt_this?: { [key: string]: any }): EventsKey;
|
||||
export function unlisten(target: EventTargetLike, type: string, listener: ListenerFunction, opt_this?: { [key: string]: any }): void;
|
||||
export function unlistenAll(target: EventTargetLike): void;
|
||||
export function unlistenByKey(key: EventsKey): void;
|
||||
export interface EventsKey {
|
||||
bindTo?: { [key: string]: any };
|
||||
boundListener?: ListenerFunction;
|
||||
callOnce: boolean;
|
||||
deleteIndex?: number;
|
||||
listener: ListenerFunction;
|
||||
target: EventTargetLike;
|
||||
type: string;
|
||||
}
|
||||
export type ListenerFunction = ((param0: Event | Event) => void | boolean);
|
||||
|
||||
8
types/ol/extent/Corner.d.ts
vendored
Normal file
8
types/ol/extent/Corner.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
declare enum Corner {
|
||||
BOTTOM_LEFT = 'bottom-left',
|
||||
BOTTOM_RIGHT = 'bottom-right',
|
||||
TOP_LEFT = 'top-left',
|
||||
TOP_RIGHT = 'top-right',
|
||||
}
|
||||
|
||||
export default Corner;
|
||||
10
types/ol/extent/Relationship.d.ts
vendored
Normal file
10
types/ol/extent/Relationship.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
declare enum Relationship {
|
||||
UNKNOWN = 0,
|
||||
INTERSECTING = 1,
|
||||
ABOVE = 2,
|
||||
RIGHT = 4,
|
||||
BELOW = 8,
|
||||
LEFT = 16,
|
||||
}
|
||||
|
||||
export default Relationship;
|
||||
53
types/ol/extent/index.d.ts
vendored
53
types/ol/extent/index.d.ts
vendored
@ -1,3 +1,50 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.extent;
|
||||
import { Coordinate } from 'ol/coordinate';
|
||||
import Corner from 'ol/extent/Corner';
|
||||
import Relationship from 'ol/extent/Relationship';
|
||||
import { TransformFunction } from 'ol/proj';
|
||||
import { Size } from 'ol/size';
|
||||
export function applyTransform(extent: Extent, transformFn: TransformFunction, opt_extent?: Extent): Extent;
|
||||
export function boundingExtent(coordinates: Coordinate[]): Extent;
|
||||
export function buffer(extent: Extent, value: number, opt_extent?: Extent): Extent;
|
||||
export function clone(extent: Extent, opt_extent?: Extent): Extent;
|
||||
export function closestSquaredDistanceXY(extent: Extent, x: number, y: number): number;
|
||||
export function containsCoordinate(extent: Extent, coordinate: Coordinate): boolean;
|
||||
export function containsExtent(extent1: Extent, extent2: Extent): boolean;
|
||||
export function containsXY(extent: Extent, x: number, y: number): boolean;
|
||||
export function coordinateRelationship(extent: Extent, coordinate: Coordinate): Relationship;
|
||||
export function createEmpty(): Extent;
|
||||
export function createOrUpdate(minX: number, minY: number, maxX: number, maxY: number, opt_extent?: Extent): Extent;
|
||||
export function createOrUpdateEmpty(opt_extent?: Extent): Extent;
|
||||
export function createOrUpdateFromCoordinate(coordinate: Coordinate, opt_extent?: Extent): Extent;
|
||||
export function createOrUpdateFromCoordinates(coordinates: Coordinate[], opt_extent?: Extent): Extent;
|
||||
export function createOrUpdateFromFlatCoordinates(flatCoordinates: number[], offset: number, end: number, stride: number, opt_extent?: Extent): Extent;
|
||||
export function createOrUpdateFromRings(rings: Coordinate[][], opt_extent?: Extent): Extent;
|
||||
export function equals(extent1: Extent, extent2: Extent): boolean;
|
||||
export function extend(extent1: Extent, extent2: Extent): Extent;
|
||||
export function extendCoordinate(extent: Extent, coordinate: Coordinate): void;
|
||||
export function extendCoordinates(extent: Extent, coordinates: Coordinate[]): Extent;
|
||||
export function extendFlatCoordinates(extent: Extent, flatCoordinates: number[], offset: number, end: number, stride: number): Extent;
|
||||
export function extendRings(extent: Extent, rings: Coordinate[][]): Extent;
|
||||
export function extendXY(extent: Extent, x: number, y: number): void;
|
||||
export function forEachCorner<S, T>(extent: Extent, callback: ((this: T, param1: Coordinate) => S), opt_this?: T): S | boolean;
|
||||
export function getArea(extent: Extent): number;
|
||||
export function getBottomLeft(extent: Extent): Coordinate;
|
||||
export function getBottomRight(extent: Extent): Coordinate;
|
||||
export function getCenter(extent: Extent): Coordinate;
|
||||
export function getCorner(extent: Extent, corner: Corner): Coordinate;
|
||||
export function getEnlargedArea(extent1: Extent, extent2: Extent): number;
|
||||
export function getForViewAndSize(center: Coordinate, resolution: number, rotation: number, size: Size, opt_extent?: Extent): Extent;
|
||||
export function getHeight(extent: Extent): number;
|
||||
export function getIntersection(extent1: Extent, extent2: Extent, opt_extent?: Extent): Extent;
|
||||
export function getIntersectionArea(extent1: Extent, extent2: Extent): number;
|
||||
export function getMargin(extent: Extent): number;
|
||||
export function getSize(extent: Extent): Size;
|
||||
export function getTopLeft(extent: Extent): Coordinate;
|
||||
export function getTopRight(extent: Extent): Coordinate;
|
||||
export function getWidth(extent: Extent): number;
|
||||
export function intersects(extent1: Extent, extent2: Extent): boolean;
|
||||
export function intersectsSegment(extent: Extent, start: Coordinate, end: Coordinate): boolean;
|
||||
export function isEmpty(extent: Extent): boolean;
|
||||
export function returnOrUpdate(extent: Extent, opt_extent?: Extent): Extent;
|
||||
export function scaleFromCenter(extent: Extent, value: number): void;
|
||||
export type Extent = number[];
|
||||
|
||||
9
types/ol/featureloader.d.ts
vendored
Normal file
9
types/ol/featureloader.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { Extent } from 'ol/extent';
|
||||
import FeatureFormat from 'ol/format/Feature';
|
||||
import Projection from 'ol/proj/Projection';
|
||||
import VectorSource from 'ol/source/Vector';
|
||||
import VectorTile from 'ol/VectorTile';
|
||||
export function loadFeaturesXhr(url: string | FeatureUrlFunction, format: FeatureFormat, success: (() => void) | (() => void), failure: ((this: VectorSource) => void) | (() => void)): FeatureLoader;
|
||||
export function xhr(url: string | FeatureUrlFunction, format: FeatureFormat): FeatureLoader;
|
||||
export type FeatureLoader = ((this: VectorSource | VectorTile, param1: Extent, param2: number, param3: Projection) => void);
|
||||
export type FeatureUrlFunction = ((param0: Extent, param1: number, param2: Projection) => string);
|
||||
3
types/ol/featureloader/index.d.ts
vendored
3
types/ol/featureloader/index.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.featureloader;
|
||||
42
types/ol/format/EsriJSON.d.ts
vendored
42
types/ol/format/EsriJSON.d.ts
vendored
@ -1,3 +1,39 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.format.EsriJSON;
|
||||
import {
|
||||
Feature,
|
||||
FeatureSet,
|
||||
Geometry,
|
||||
HasZM,
|
||||
Multipoint,
|
||||
Point,
|
||||
Polygon,
|
||||
Polyline,
|
||||
Position,
|
||||
SpatialReferenceWkid
|
||||
} from 'arcgis-rest-api';
|
||||
import { ReadOptions, WriteOptions } from 'ol/format/Feature';
|
||||
import JSONFeature from 'ol/format/JSONFeature';
|
||||
import Geometry_1 from 'ol/geom/Geometry';
|
||||
import GeometryLayout from 'ol/geom/GeometryLayout';
|
||||
import SimpleGeometry from 'ol/geom/SimpleGeometry';
|
||||
export default class EsriJSON extends JSONFeature {
|
||||
constructor(opt_options?: Options);
|
||||
}
|
||||
export type EsriJSONFeature = Feature;
|
||||
export type EsriJSONFeatureSet = FeatureSet;
|
||||
export type EsriJSONGeometry = Geometry;
|
||||
export type EsriJSONHasZM = HasZM;
|
||||
export type EsriJSONMultipoint = Multipoint;
|
||||
export interface EsriJSONMultiPolygon {
|
||||
rings: number[][][][];
|
||||
hasM?: boolean;
|
||||
hasZ?: boolean;
|
||||
spatialReference?: EsriJSONSpatialReferenceWkid;
|
||||
}
|
||||
export type EsriJSONPoint = Point;
|
||||
export type EsriJSONPolygon = Polygon;
|
||||
export type EsriJSONPolyline = Polyline;
|
||||
export type EsriJSONPosition = Position;
|
||||
export type EsriJSONSpatialReferenceWkid = SpatialReferenceWkid;
|
||||
export interface Options {
|
||||
geometryName?: string;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user