diff --git a/@types/ol/Collection.d.ts b/@types/ol/Collection.d.ts index 4d04f025..05fca201 100644 --- a/@types/ol/Collection.d.ts +++ b/@types/ol/Collection.d.ts @@ -1,6 +1,7 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import BaseObject, { ObjectEvent } from 'ol/Object'; +import { EventsKey } from './events'; +import Event from './events/Event'; +import BaseObject, { ObjectEvent } from './Object'; + export class CollectionEvent extends Event { constructor(); element: T; diff --git a/@types/ol/Feature.d.ts b/@types/ol/Feature.d.ts index 4782b9c4..f455cd0b 100644 --- a/@types/ol/Feature.d.ts +++ b/@types/ol/Feature.d.ts @@ -1,9 +1,10 @@ -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'; +import { EventsKey } from './events'; +import Event from './events/Event'; +import Geometry from './geom/Geometry'; +import BaseObject, { ObjectEvent } from './Object'; +import RenderFeature from './render/Feature'; +import Style, { StyleFunction, StyleLike } from './style/Style'; + export function createStyleFunction(obj: StyleFunction | Style[] | Style): StyleFunction; export default class Feature extends BaseObject { constructor(opt_geometryOrProperties?: Geometry | { [key: string]: any }); diff --git a/@types/ol/Geolocation.d.ts b/@types/ol/Geolocation.d.ts index df6871e2..070c2a7d 100644 --- a/@types/ol/Geolocation.d.ts +++ b/@types/ol/Geolocation.d.ts @@ -1,10 +1,11 @@ -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'; +import { Coordinate } from './coordinate'; +import { EventsKey } from './events'; +import Event from './events/Event'; +import Polygon from './geom/Polygon'; +import BaseObject, { ObjectEvent } from './Object'; +import { ProjectionLike } from './proj'; +import Projection from './proj/Projection'; + export default class Geolocation extends BaseObject { constructor(opt_options?: Options); getProjection(): Projection; diff --git a/@types/ol/Graticule.d.ts b/@types/ol/Graticule.d.ts index 4046c533..994f9efe 100644 --- a/@types/ol/Graticule.d.ts +++ b/@types/ol/Graticule.d.ts @@ -1,8 +1,9 @@ -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'; +import LineString from './geom/LineString'; +import Point from './geom/Point'; +import PluggableMap from './PluggableMap'; +import Stroke from './style/Stroke'; +import Text from './style/Text'; + export default class Graticule { constructor(opt_options?: Options); getMap(): PluggableMap; diff --git a/@types/ol/Image.d.ts b/@types/ol/Image.d.ts index c1dd7891..5cdfd441 100644 --- a/@types/ol/Image.d.ts +++ b/@types/ol/Image.d.ts @@ -1,6 +1,7 @@ -import { Extent } from 'ol/extent'; -import ImageBase from 'ol/ImageBase'; -import ImageState from 'ol/ImageState'; +import { Extent } from './extent'; +import ImageBase from './ImageBase'; +import ImageState from './ImageState'; + export default class ImageWrapper extends ImageBase { constructor(extent: Extent, resolution: number, pixelRatio: number, src: string, crossOrigin: string, imageLoadFunction: LoadFunction); protected state: ImageState; diff --git a/@types/ol/ImageBase.d.ts b/@types/ol/ImageBase.d.ts index 38e31c0c..9db74021 100644 --- a/@types/ol/ImageBase.d.ts +++ b/@types/ol/ImageBase.d.ts @@ -1,6 +1,7 @@ -import Target from 'ol/events/Target'; -import { Extent } from 'ol/extent'; -import ImageState from 'ol/ImageState'; +import Target from './events/Target'; +import { Extent } from './extent'; +import ImageState from './ImageState'; + export default class ImageBase extends Target { constructor(extent: Extent, resolution: number, pixelRatio: number, state: ImageState); protected extent: Extent; diff --git a/@types/ol/ImageCanvas.d.ts b/@types/ol/ImageCanvas.d.ts index fcc14d63..9f068dc6 100644 --- a/@types/ol/ImageCanvas.d.ts +++ b/@types/ol/ImageCanvas.d.ts @@ -1,5 +1,6 @@ -import { Extent } from 'ol/extent'; -import ImageBase from 'ol/ImageBase'; +import { Extent } from './extent'; +import ImageBase from './ImageBase'; + export default class ImageCanvas extends ImageBase { constructor(extent: Extent, resolution: number, pixelRatio: number, canvas: HTMLCanvasElement, opt_loader?: Loader); getError(): Error; diff --git a/@types/ol/ImageTile.d.ts b/@types/ol/ImageTile.d.ts index 96671d48..6708ec09 100644 --- a/@types/ol/ImageTile.d.ts +++ b/@types/ol/ImageTile.d.ts @@ -1,6 +1,7 @@ -import Tile, { LoadFunction, Options } from 'ol/Tile'; -import { TileCoord } from 'ol/tilecoord'; -import TileState from 'ol/TileState'; +import Tile, { LoadFunction, Options } from './Tile'; +import { TileCoord } from './tilecoord'; +import TileState from './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; diff --git a/@types/ol/Map.d.ts b/@types/ol/Map.d.ts index 16a2df39..16e8c9ba 100644 --- a/@types/ol/Map.d.ts +++ b/@types/ol/Map.d.ts @@ -1,10 +1,11 @@ -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'; +import { EventsKey } from './events'; +import Event from './events/Event'; +import MapBrowserEvent from './MapBrowserEvent'; +import MapEvent from './MapEvent'; +import { ObjectEvent } from './Object'; +import PluggableMap, { MapOptions } from './PluggableMap'; +import RenderEvent from './render/Event'; + export default class Map extends PluggableMap { constructor(options: MapOptions); on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[]; diff --git a/@types/ol/MapBrowserEvent.d.ts b/@types/ol/MapBrowserEvent.d.ts index 83ff5d9c..b9fab238 100644 --- a/@types/ol/MapBrowserEvent.d.ts +++ b/@types/ol/MapBrowserEvent.d.ts @@ -1,7 +1,8 @@ -import { Coordinate } from 'ol/coordinate'; -import MapEvent from 'ol/MapEvent'; -import { Pixel } from 'ol/pixel'; -import PluggableMap, { FrameState } from 'ol/PluggableMap'; +import { Coordinate } from './coordinate'; +import MapEvent from './MapEvent'; +import { Pixel } from './pixel'; +import PluggableMap, { FrameState } from './PluggableMap'; + export default class MapBrowserEvent extends MapEvent { constructor(type: string, map: PluggableMap, browserEvent: Event, opt_dragging?: boolean, opt_frameState?: FrameState); coordinate: Coordinate; diff --git a/@types/ol/MapBrowserEventHandler.d.ts b/@types/ol/MapBrowserEventHandler.d.ts index fb28be56..3a379d0b 100644 --- a/@types/ol/MapBrowserEventHandler.d.ts +++ b/@types/ol/MapBrowserEventHandler.d.ts @@ -1,5 +1,6 @@ -import Target from 'ol/events/Target'; -import PluggableMap from 'ol/PluggableMap'; +import Target from './events/Target'; +import PluggableMap from './PluggableMap'; + export default class MapBrowserEventHandler extends Target { constructor(map: PluggableMap, moveTolerance?: number); } diff --git a/@types/ol/MapBrowserPointerEvent.d.ts b/@types/ol/MapBrowserPointerEvent.d.ts index e107cd5e..86a99377 100644 --- a/@types/ol/MapBrowserPointerEvent.d.ts +++ b/@types/ol/MapBrowserPointerEvent.d.ts @@ -1,6 +1,7 @@ -import MapBrowserEvent from 'ol/MapBrowserEvent'; -import PluggableMap, { FrameState } from 'ol/PluggableMap'; -import PointerEvent from 'ol/pointer/PointerEvent'; +import MapBrowserEvent from './MapBrowserEvent'; +import PluggableMap, { FrameState } from './PluggableMap'; +import PointerEvent from './pointer/PointerEvent'; + export default class MapBrowserPointerEvent extends MapBrowserEvent { constructor(type: string, map: PluggableMap, pointerEvent: PointerEvent, opt_dragging?: boolean, opt_frameState?: FrameState); } diff --git a/@types/ol/MapEvent.d.ts b/@types/ol/MapEvent.d.ts index 5a155039..1128f5ae 100644 --- a/@types/ol/MapEvent.d.ts +++ b/@types/ol/MapEvent.d.ts @@ -1,5 +1,6 @@ -import Event from 'ol/events/Event'; -import PluggableMap, { FrameState } from 'ol/PluggableMap'; +import Event from './events/Event'; +import PluggableMap, { FrameState } from './PluggableMap'; + export default class MapEvent extends Event { constructor(type: string, map: PluggableMap, opt_frameState?: FrameState); frameState: FrameState; diff --git a/@types/ol/Object.d.ts b/@types/ol/Object.d.ts index d847f639..c38ec581 100644 --- a/@types/ol/Object.d.ts +++ b/@types/ol/Object.d.ts @@ -1,6 +1,7 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Observable from 'ol/Observable'; +import { EventsKey } from './events'; +import Event from './events/Event'; +import Observable from './Observable'; + export function getChangeEventType(key: string): string; export class ObjectEvent extends Event { constructor(); diff --git a/@types/ol/Observable.d.ts b/@types/ol/Observable.d.ts index d5ce43d0..de10ff4b 100644 --- a/@types/ol/Observable.d.ts +++ b/@types/ol/Observable.d.ts @@ -1,6 +1,7 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Target from 'ol/events/Target'; +import { EventsKey } from './events'; +import Event from './events/Event'; +import Target from './events/Target'; + export function unByKey(key: EventsKey | EventsKey[]): void; export default class Observable extends Target { constructor(); diff --git a/@types/ol/Overlay.d.ts b/@types/ol/Overlay.d.ts index 0dd5fff5..199e4d27 100644 --- a/@types/ol/Overlay.d.ts +++ b/@types/ol/Overlay.d.ts @@ -1,12 +1,13 @@ -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'; +import { Coordinate } from './coordinate'; +import { EventsKey } from './events'; +import Event from './events/Event'; +import { Extent } from './extent'; +import BaseObject, { ObjectEvent } from './Object'; +import OverlayPositioning from './OverlayPositioning'; +import { Pixel } from './pixel'; +import PluggableMap from './PluggableMap'; +import { Size } from './size'; + export interface Options { id?: number | string; element?: HTMLElement; @@ -26,7 +27,7 @@ export default class Overlay extends BaseObject { protected autoPanMargin: number; protected element: HTMLElement; protected stopEvent: boolean; - protected rendered: { [key: string]: any }; + protected rendered: any; protected options: Options; protected autoPanAnimation: PanOptions; protected id: number | string; diff --git a/@types/ol/PluggableMap.d.ts b/@types/ol/PluggableMap.d.ts index 710fba53..6530b32c 100644 --- a/@types/ol/PluggableMap.d.ts +++ b/@types/ol/PluggableMap.d.ts @@ -1,27 +1,28 @@ -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'; +import Collection from './Collection'; +import Control from './control/Control'; +import { Coordinate } from './coordinate'; +import { EventsKey } from './events'; +import Event from './events/Event'; +import { Extent } from './extent'; +import Feature, { FeatureLike } from './Feature'; +import Interaction from './interaction/Interaction'; +import BaseLayer from './layer/Base'; +import LayerGroup from './layer/Group'; +import Layer, { State as State_1 } from './layer/Layer'; +import MapBrowserEvent from './MapBrowserEvent'; +import MapEvent from './MapEvent'; +import BaseObject, { ObjectEvent } from './Object'; +import Overlay from './Overlay'; +import { Pixel } from './pixel'; +import RenderEvent from './render/Event'; +import MapRenderer from './renderer/Map'; +import { Size } from './size'; +import Tile from './Tile'; +import TileQueue from './TileQueue'; +import TileRange from './TileRange'; +import { Transform } from './transform'; +import View, { State } from './View'; + export interface AtPixelOptions { layerFilter: ((param0: Layer) => boolean); hitTolerance?: number; diff --git a/@types/ol/Tile.d.ts b/@types/ol/Tile.d.ts index d96fcb69..7b063876 100644 --- a/@types/ol/Tile.d.ts +++ b/@types/ol/Tile.d.ts @@ -1,7 +1,8 @@ -import Target from 'ol/events/Target'; -import Projection from 'ol/proj/Projection'; -import { TileCoord } from 'ol/tilecoord'; -import TileState from 'ol/TileState'; +import Target from './events/Target'; +import Projection from './proj/Projection'; +import { TileCoord } from './tilecoord'; +import TileState from './TileState'; + export type LoadFunction = ((param0: Tile, param1: string) => void); export interface Options { transition?: number; diff --git a/@types/ol/TileCache.d.ts b/@types/ol/TileCache.d.ts index 24f430bd..381200da 100644 --- a/@types/ol/TileCache.d.ts +++ b/@types/ol/TileCache.d.ts @@ -1,7 +1,8 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import LRUCache from 'ol/structs/LRUCache'; -import TileRange from 'ol/TileRange'; +import { EventsKey } from './events'; +import Event from './events/Event'; +import LRUCache from './structs/LRUCache'; +import TileRange from './TileRange'; + export default class TileCache extends LRUCache { constructor(opt_highWaterMark?: number); expireCache(usedTiles: { [key: string]: TileRange }): void; diff --git a/@types/ol/TileQueue.d.ts b/@types/ol/TileQueue.d.ts index 2a16ce6b..8992bb19 100644 --- a/@types/ol/TileQueue.d.ts +++ b/@types/ol/TileQueue.d.ts @@ -1,7 +1,8 @@ -import { Coordinate } from 'ol/coordinate'; -import Event from 'ol/events/Event'; -import PriorityQueue from 'ol/structs/PriorityQueue'; -import Tile from 'ol/Tile'; +import { Coordinate } from './coordinate'; +import Event from './events/Event'; +import PriorityQueue from './structs/PriorityQueue'; +import Tile from './Tile'; + export type PriorityFunction = ((param0: Tile, param1: string, param2: Coordinate, param3: number) => number); export default class TileQueue extends PriorityQueue { constructor(tilePriorityFunction: PriorityFunction, tileChangeCallback: (() => void)); diff --git a/@types/ol/TileRange.d.ts b/@types/ol/TileRange.d.ts index 3875643a..f181f7eb 100644 --- a/@types/ol/TileRange.d.ts +++ b/@types/ol/TileRange.d.ts @@ -1,5 +1,6 @@ -import { Size } from 'ol/size'; -import { TileCoord } from 'ol/tilecoord'; +import { Size } from './size'; +import { TileCoord } from './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); diff --git a/@types/ol/VectorImageTile.d.ts b/@types/ol/VectorImageTile.d.ts index 36e9cb7c..145d0541 100644 --- a/@types/ol/VectorImageTile.d.ts +++ b/@types/ol/VectorImageTile.d.ts @@ -1,14 +1,15 @@ -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'; +import Event from './events/Event'; +import FeatureFormat from './format/Feature'; +import Layer from './layer/Layer'; +import Projection from './proj/Projection'; +import { OrderFunction } from './render'; +import VectorTile_1 from './source/VectorTile'; +import Tile, { LoadFunction, UrlFunction } from './Tile'; +import { TileCoord } from './tilecoord'; +import TileGrid from './tilegrid/TileGrid'; +import TileState from './TileState'; +import VectorTile from './VectorTile'; + export function defaultLoadFunction(tile: VectorTile, url: string): void; export interface ReplayState { dirty: boolean; diff --git a/@types/ol/VectorTile.d.ts b/@types/ol/VectorTile.d.ts index d2720ca4..c1ae3fd7 100644 --- a/@types/ol/VectorTile.d.ts +++ b/@types/ol/VectorTile.d.ts @@ -1,13 +1,14 @@ -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'; +import { Extent } from './extent'; +import Feature, { FeatureLike } from './Feature'; +import { FeatureLoader } from './featureloader'; +import FeatureFormat from './format/Feature'; +import Layer from './layer/Layer'; +import Projection from './proj/Projection'; +import ReplayGroup from './render/ReplayGroup'; +import Tile, { LoadFunction, Options } from './Tile'; +import { TileCoord } from './tilecoord'; +import TileState from './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; diff --git a/@types/ol/View.d.ts b/@types/ol/View.d.ts index 51913d4d..cdd69d23 100644 --- a/@types/ol/View.d.ts +++ b/@types/ol/View.d.ts @@ -1,19 +1,20 @@ -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'; +import { Type } from './centerconstraint'; +import { Coordinate } from './coordinate'; +import { EventsKey } from './events'; +import Event from './events/Event'; +import { Extent } from './extent'; +import SimpleGeometry from './geom/SimpleGeometry'; +import BaseObject, { ObjectEvent } from './Object'; +import { Pixel } from './pixel'; +import { ProjectionLike } from './proj'; +import Projection from './proj/Projection'; +import { Type as Type_2 } from './resolutionconstraint'; +import { Type as Type_1 } from './rotationconstraint'; +import { Size } from './size'; +import ViewHint from './ViewHint'; + export function createCenterConstraint(options: ViewOptions): Type; -export function createResolutionConstraint(options: ViewOptions): { [key: string]: any }; +export function createResolutionConstraint(options: ViewOptions): any; export function createRotationConstraint(options: ViewOptions): Type_1; export function isNoopAnimation(animation: Animation): boolean; export interface Animation { diff --git a/@types/ol/WebGLMap.d.ts b/@types/ol/WebGLMap.d.ts index b2b6db90..1e04111c 100644 --- a/@types/ol/WebGLMap.d.ts +++ b/@types/ol/WebGLMap.d.ts @@ -1,10 +1,11 @@ -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'; +import { EventsKey } from './events'; +import Event from './events/Event'; +import MapBrowserEvent from './MapBrowserEvent'; +import MapEvent from './MapEvent'; +import { ObjectEvent } from './Object'; +import PluggableMap, { MapOptions } from './PluggableMap'; +import RenderEvent from './render/Event'; + export default class WebGLMap extends PluggableMap { constructor(options: MapOptions); on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[]; diff --git a/@types/ol/centerconstraint.d.ts b/@types/ol/centerconstraint.d.ts index 0704f6be..3ece4ac0 100644 --- a/@types/ol/centerconstraint.d.ts +++ b/@types/ol/centerconstraint.d.ts @@ -1,5 +1,6 @@ -import { Coordinate } from 'ol/coordinate'; -import { Extent } from 'ol/extent'; +import { Coordinate } from './coordinate'; +import { Extent } from './extent'; + export function createExtent(extent: Extent): Type; export function none(center?: Coordinate): Coordinate; export type Type = ((param0: Coordinate) => Coordinate); diff --git a/@types/ol/colorlike.d.ts b/@types/ol/colorlike.d.ts index d7ce2bc1..3c532624 100644 --- a/@types/ol/colorlike.d.ts +++ b/@types/ol/colorlike.d.ts @@ -1,3 +1,4 @@ -import { Color } from 'ol/color'; +import { Color } from './color'; + export function asColorLike(color: Color | ColorLike): ColorLike; export type ColorLike = string | CanvasPattern | CanvasGradient; diff --git a/@types/ol/control.d.ts b/@types/ol/control.d.ts new file mode 100644 index 00000000..35baded6 --- /dev/null +++ b/@types/ol/control.d.ts @@ -0,0 +1,15 @@ +import Collection from './Collection'; +import Control from './control/Control'; +import { DefaultsOptions } from './control/util'; +export { default as Attribution } from './control/Attribution'; +export { default as Control } from './control/Control'; +export { default as FullScreen } from './control/FullScreen'; +export { default as MousePosition } from './control/MousePosition'; +export { default as OverviewMap } from './control/OverviewMap'; +export { default as Rotate } from './control/Rotate'; +export { default as ScaleLine } from './control/ScaleLine'; +export { default as Zoom } from './control/Zoom'; +export { default as ZoomSlider } from './control/ZoomSlider'; +export { default as ZoomToExtent } from './control/ZoomToExtent'; + +export function defaults(opt_options?: DefaultsOptions): Collection; diff --git a/@types/ol/control/Attribution.d.ts b/@types/ol/control/Attribution.d.ts index a3927cae..afb4e3f8 100644 --- a/@types/ol/control/Attribution.d.ts +++ b/@types/ol/control/Attribution.d.ts @@ -1,8 +1,9 @@ -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'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import MapEvent from '../MapEvent'; +import { ObjectEvent } from '../Object'; +import Control from './Control'; + export function render(mapEvent: MapEvent): void; export default class Attribution extends Control { constructor(opt_options?: Options); diff --git a/@types/ol/control/Control.d.ts b/@types/ol/control/Control.d.ts index c50e3a42..eb4f145e 100644 --- a/@types/ol/control/Control.d.ts +++ b/@types/ol/control/Control.d.ts @@ -1,8 +1,9 @@ -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'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import MapEvent from '../MapEvent'; +import BaseObject, { ObjectEvent } from '../Object'; +import PluggableMap from '../PluggableMap'; + export default class Control extends BaseObject { constructor(options: Options); protected element: HTMLElement; diff --git a/@types/ol/control/FullScreen.d.ts b/@types/ol/control/FullScreen.d.ts index e20d424b..d3821d3b 100644 --- a/@types/ol/control/FullScreen.d.ts +++ b/@types/ol/control/FullScreen.d.ts @@ -1,7 +1,8 @@ -import Control from 'ol/control/Control'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import Control from './Control'; + export default class FullScreen extends Control { constructor(opt_options?: Options); on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[]; diff --git a/@types/ol/control/MousePosition.d.ts b/@types/ol/control/MousePosition.d.ts index a8470087..1169d066 100644 --- a/@types/ol/control/MousePosition.d.ts +++ b/@types/ol/control/MousePosition.d.ts @@ -1,11 +1,12 @@ -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'; +import { CoordinateFormat } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import MapEvent from '../MapEvent'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import Projection from '../proj/Projection'; +import Control from './Control'; + export function render(mapEvent: MapEvent): void; export default class MousePosition extends Control { constructor(opt_options?: Options); diff --git a/@types/ol/control/OverviewMap.d.ts b/@types/ol/control/OverviewMap.d.ts index 068a9ae1..b694ac05 100644 --- a/@types/ol/control/OverviewMap.d.ts +++ b/@types/ol/control/OverviewMap.d.ts @@ -1,12 +1,13 @@ -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'; +import Collection from '../Collection'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import Layer from '../layer/Layer'; +import MapEvent from '../MapEvent'; +import { ObjectEvent } from '../Object'; +import PluggableMap from '../PluggableMap'; +import View from '../View'; +import Control from './Control'; + export function render(mapEvent: MapEvent): void; export interface Options { className?: string; diff --git a/@types/ol/control/Rotate.d.ts b/@types/ol/control/Rotate.d.ts index cdf4fe9c..e691f2eb 100644 --- a/@types/ol/control/Rotate.d.ts +++ b/@types/ol/control/Rotate.d.ts @@ -1,8 +1,9 @@ -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'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import MapEvent from '../MapEvent'; +import { ObjectEvent } from '../Object'; +import Control from './Control'; + export function render(mapEvent: MapEvent): void; export interface Options { className?: string; diff --git a/@types/ol/control/ScaleLine.d.ts b/@types/ol/control/ScaleLine.d.ts index fa0f27aa..6821778a 100644 --- a/@types/ol/control/ScaleLine.d.ts +++ b/@types/ol/control/ScaleLine.d.ts @@ -1,8 +1,9 @@ -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'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import MapEvent from '../MapEvent'; +import { ObjectEvent } from '../Object'; +import Control from './Control'; + export function render(mapEvent: MapEvent): void; export interface Options { className?: string; diff --git a/@types/ol/control/Zoom.d.ts b/@types/ol/control/Zoom.d.ts index 385f10b8..81eff576 100644 --- a/@types/ol/control/Zoom.d.ts +++ b/@types/ol/control/Zoom.d.ts @@ -1,7 +1,8 @@ -import Control from 'ol/control/Control'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import Control from './Control'; + export interface Options { duration?: number; className?: string; diff --git a/@types/ol/control/ZoomSlider.d.ts b/@types/ol/control/ZoomSlider.d.ts index 27c284d5..9f5c94c1 100644 --- a/@types/ol/control/ZoomSlider.d.ts +++ b/@types/ol/control/ZoomSlider.d.ts @@ -1,8 +1,9 @@ -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'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import MapEvent from '../MapEvent'; +import { ObjectEvent } from '../Object'; +import Control from './Control'; + export function render(mapEvent: MapEvent): void; export interface Options { className?: string; diff --git a/@types/ol/control/ZoomToExtent.d.ts b/@types/ol/control/ZoomToExtent.d.ts index ac094398..404d87c1 100644 --- a/@types/ol/control/ZoomToExtent.d.ts +++ b/@types/ol/control/ZoomToExtent.d.ts @@ -1,8 +1,9 @@ -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'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import { ObjectEvent } from '../Object'; +import Control from './Control'; + export interface Options { className?: string; target?: HTMLElement | string; diff --git a/@types/ol/control/index.d.ts b/@types/ol/control/index.d.ts deleted file mode 100644 index 628d72f9..00000000 --- a/@types/ol/control/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -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; diff --git a/@types/ol/control/util.d.ts b/@types/ol/control/util.d.ts index 391ed3e4..a0c9713d 100644 --- a/@types/ol/control/util.d.ts +++ b/@types/ol/control/util.d.ts @@ -1,6 +1,7 @@ -import { Options } from 'ol/control/Attribution'; -import { Options as Options_1 } from 'ol/control/Rotate'; -import { Options as Options_2 } from 'ol/control/Zoom'; +import { Options } from './Attribution'; +import { Options as Options_1 } from './Rotate'; +import { Options as Options_2 } from './Zoom'; + export interface DefaultsOptions { attribution?: boolean; attributionOptions?: Options; diff --git a/@types/ol/coordinate.d.ts b/@types/ol/coordinate.d.ts index c4ec695e..20b953ad 100644 --- a/@types/ol/coordinate.d.ts +++ b/@types/ol/coordinate.d.ts @@ -1,4 +1,5 @@ -import Circle from 'ol/geom/Circle'; +import Circle from './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; diff --git a/@types/ol/events/index.d.ts b/@types/ol/events.d.ts similarity index 63% rename from @types/ol/events/index.d.ts rename to @types/ol/events.d.ts index 4b594f3a..144a1c4d 100644 --- a/@types/ol/events/index.d.ts +++ b/@types/ol/events.d.ts @@ -1,15 +1,16 @@ -import Event from 'ol/events/Event'; -import { EventTargetLike } from 'ol/events/Target'; +import Event from './events/Event'; +import { EventTargetLike } from './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 findListener(listeners: EventsKey[], listener: (() => void), opt_this?: 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 listen(target: EventTargetLike, type: string, listener: ListenerFunction, opt_this?: any, opt_once?: boolean): EventsKey; +export function listenOnce(target: EventTargetLike, type: string, listener: ListenerFunction, opt_this?: any): EventsKey; +export function unlisten(target: EventTargetLike, type: string, listener: ListenerFunction, opt_this?: any): void; export function unlistenAll(target: EventTargetLike): void; export function unlistenByKey(key: EventsKey): void; export interface EventsKey { - bindTo?: { [key: string]: any }; + bindTo?: any; boundListener?: ListenerFunction; callOnce: boolean; deleteIndex?: number; diff --git a/@types/ol/events/Event.d.ts b/@types/ol/events/Event.d.ts index 60441c5e..5d166626 100644 --- a/@types/ol/events/Event.d.ts +++ b/@types/ol/events/Event.d.ts @@ -2,7 +2,7 @@ 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 }; + target: any; type: string; preventDefault(): void; stopPropagation(): void; diff --git a/@types/ol/events/Target.d.ts b/@types/ol/events/Target.d.ts index 179b1354..2746e445 100644 --- a/@types/ol/events/Target.d.ts +++ b/@types/ol/events/Target.d.ts @@ -1,11 +1,12 @@ -import Disposable from 'ol/Disposable'; -import { ListenerFunction } from 'ol/events'; -import Event from 'ol/events/Event'; +import Disposable from '../Disposable'; +import { ListenerFunction } from '../events'; +import Event from './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; + dispatchEvent(event: object | Event | string): boolean; getListeners(type: string): ListenerFunction[]; hasListener(opt_type?: string): boolean; removeEventListener(type: string, listener: ListenerFunction): void; diff --git a/@types/ol/events/condition.d.ts b/@types/ol/events/condition.d.ts index 4838d7c1..f4c92b14 100644 --- a/@types/ol/events/condition.d.ts +++ b/@types/ol/events/condition.d.ts @@ -1,5 +1,6 @@ -import { TRUE, FALSE } from 'ol/functions'; -import MapBrowserEvent from 'ol/MapBrowserEvent'; +import { TRUE, FALSE } from '../functions'; +import MapBrowserEvent from '../MapBrowserEvent'; + export function altKeyOnly(mapBrowserEvent: MapBrowserEvent): boolean; export function altShiftKeysOnly(mapBrowserEvent: MapBrowserEvent): boolean; export const always: typeof TRUE; diff --git a/@types/ol/extent/index.d.ts b/@types/ol/extent.d.ts similarity index 94% rename from @types/ol/extent/index.d.ts rename to @types/ol/extent.d.ts index 9031790b..054d9817 100644 --- a/@types/ol/extent/index.d.ts +++ b/@types/ol/extent.d.ts @@ -1,8 +1,9 @@ -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'; +import { Coordinate } from './coordinate'; +import Corner from './extent/Corner'; +import Relationship from './extent/Relationship'; +import { TransformFunction } from './proj'; +import { Size } from './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; diff --git a/@types/ol/featureloader.d.ts b/@types/ol/featureloader.d.ts index f8ac9f37..194bf784 100644 --- a/@types/ol/featureloader.d.ts +++ b/@types/ol/featureloader.d.ts @@ -1,8 +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'; +import { Extent } from './extent'; +import FeatureFormat from './format/Feature'; +import Projection from './proj/Projection'; +import VectorSource from './source/Vector'; +import VectorTile from './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); diff --git a/@types/ol/format.d.ts b/@types/ol/format.d.ts new file mode 100644 index 00000000..805efd6f --- /dev/null +++ b/@types/ol/format.d.ts @@ -0,0 +1,15 @@ +export { default as EsriJSON } from './format/EsriJSON'; +export { default as GeoJSON } from './format/GeoJSON'; +export { default as GML } from './format/GML'; +export { default as GPX } from './format/GPX'; +export { default as IGC } from './format/IGC'; +export { default as KML } from './format/KML'; +export { default as MVT } from './format/MVT'; +export { default as OWS } from './format/OWS'; +export { default as Polyline } from './format/Polyline'; +export { default as TopoJSON } from './format/TopoJSON'; +export { default as WFS } from './format/WFS'; +export { default as WKT } from './format/WKT'; +export { default as WMSCapabilities } from './format/WMSCapabilities'; +export { default as WMSGetFeatureInfo } from './format/WMSGetFeatureInfo'; +export { default as WMTSCapabilities } from './format/WMTSCapabilities'; diff --git a/@types/ol/format/EsriJSON.d.ts b/@types/ol/format/EsriJSON.d.ts index 895cd120..20b56f39 100644 --- a/@types/ol/format/EsriJSON.d.ts +++ b/@types/ol/format/EsriJSON.d.ts @@ -10,11 +10,12 @@ import { 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'; +import Geometry_1 from '../geom/Geometry'; +import GeometryLayout from '../geom/GeometryLayout'; +import SimpleGeometry from '../geom/SimpleGeometry'; +import { ReadOptions, WriteOptions } from './Feature'; +import JSONFeature from './JSONFeature'; + export default class EsriJSON extends JSONFeature { constructor(opt_options?: Options); } diff --git a/@types/ol/format/Feature.d.ts b/@types/ol/format/Feature.d.ts index 3b1dcb41..311a97d2 100644 --- a/@types/ol/format/Feature.d.ts +++ b/@types/ol/format/Feature.d.ts @@ -1,25 +1,26 @@ -import { Extent } from 'ol/extent'; -import Feature, { FeatureLike } from 'ol/Feature'; -import FormatType from 'ol/format/FormatType'; -import Geometry from 'ol/geom/Geometry'; -import { ProjectionLike } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; +import { Extent } from '../extent'; +import Feature, { FeatureLike } from '../Feature'; +import Geometry from '../geom/Geometry'; +import { ProjectionLike } from '../proj'; +import Projection from '../proj/Projection'; +import FormatType from './FormatType'; + export function transformWithOptions(geometry: Geometry | Extent, write: boolean, opt_options?: WriteOptions | ReadOptions): Geometry | Extent; export default class FeatureFormat { constructor(); protected defaultFeatureProjection: Projection; protected dataProjection: Projection; protected adaptOptions(options: WriteOptions | ReadOptions): WriteOptions | ReadOptions; - protected getReadOptions(source: Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): ReadOptions; + protected getReadOptions(source: Document | Node | object | string, opt_options?: ReadOptions): ReadOptions; writeGeometry(geometry: Geometry, opt_options?: WriteOptions): string; getType(): FormatType; getLastExtent(): Extent; - readFeatures(source: Document | Node | ArrayBuffer | { [key: string]: any } | string, opt_options?: ReadOptions): FeatureLike[]; - readGeometry(source: Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): Geometry; - readProjection(source: Document | Node | { [key: string]: any } | string): Projection; + readFeatures(source: Document | Node | ArrayBuffer | object | string, opt_options?: ReadOptions): FeatureLike[]; + readGeometry(source: Document | Node | object | string, opt_options?: ReadOptions): Geometry; + readProjection(source: Document | Node | object | string): Projection; writeFeature(feature: Feature, opt_options?: WriteOptions): string; writeFeatures(features: Feature[], opt_options?: WriteOptions): string; - readFeature(source: Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): FeatureLike; + readFeature(source: Document | Node | object | string, opt_options?: ReadOptions): FeatureLike; } export interface ReadOptions { dataProjection?: ProjectionLike; diff --git a/@types/ol/format/GML.d.ts b/@types/ol/format/GML.d.ts index 2cb15664..2aed83e9 100644 --- a/@types/ol/format/GML.d.ts +++ b/@types/ol/format/GML.d.ts @@ -1,4 +1,5 @@ -import GML3 from 'ol/format/GML3'; +import GML3 from './GML3'; + declare const GML: GML3; export default GML; diff --git a/@types/ol/format/GML2.d.ts b/@types/ol/format/GML2.d.ts index 41d089d1..b372b47e 100644 --- a/@types/ol/format/GML2.d.ts +++ b/@types/ol/format/GML2.d.ts @@ -1,8 +1,9 @@ -import { Extent } from 'ol/extent'; -import Feature from 'ol/Feature'; -import GMLBase, { Options } from 'ol/format/GMLBase'; -import Geometry from 'ol/geom/Geometry'; -import { Parser } from 'ol/xml'; +import { Extent } from '../extent'; +import Feature from '../Feature'; +import Geometry from '../geom/Geometry'; +import { Parser } from '../xml'; +import GMLBase, { Options } from './GMLBase'; + export default class GML2 extends GMLBase { constructor(opt_options?: Options); protected FLAT_LINEAR_RINGS_PARSERS: { [key: string]: { [key: string]: Parser } }; diff --git a/@types/ol/format/GML3.d.ts b/@types/ol/format/GML3.d.ts index edae6d4a..4504b412 100644 --- a/@types/ol/format/GML3.d.ts +++ b/@types/ol/format/GML3.d.ts @@ -1,9 +1,10 @@ -import { Extent } from 'ol/extent'; -import Feature from 'ol/Feature'; -import { WriteOptions } from 'ol/format/Feature'; -import GMLBase, { Options } from 'ol/format/GMLBase'; -import Geometry from 'ol/geom/Geometry'; -import { Parser } from 'ol/xml'; +import { Extent } from '../extent'; +import Feature from '../Feature'; +import Geometry from '../geom/Geometry'; +import { Parser } from '../xml'; +import { WriteOptions } from './Feature'; +import GMLBase, { Options } from './GMLBase'; + export default class GML3 extends GMLBase { constructor(opt_options?: Options); protected FLAT_LINEAR_RINGS_PARSERS: { [key: string]: { [key: string]: Parser } }; diff --git a/@types/ol/format/GML32.d.ts b/@types/ol/format/GML32.d.ts index 45fa05af..985d34d0 100644 --- a/@types/ol/format/GML32.d.ts +++ b/@types/ol/format/GML32.d.ts @@ -1,6 +1,7 @@ -import GML3 from 'ol/format/GML3'; -import { Options } from 'ol/format/GMLBase'; -import { Parser } from 'ol/xml'; +import { Parser } from '../xml'; +import GML3 from './GML3'; +import { Options } from './GMLBase'; + export default class GML32 extends GML3 { constructor(opt_options?: Options); protected FLAT_LINEAR_RINGS_PARSERS: { [key: string]: { [key: string]: Parser } }; diff --git a/@types/ol/format/GMLBase.d.ts b/@types/ol/format/GMLBase.d.ts index a353a6a9..b7005948 100644 --- a/@types/ol/format/GMLBase.d.ts +++ b/@types/ol/format/GMLBase.d.ts @@ -1,14 +1,15 @@ -import Feature from 'ol/Feature'; -import XMLFeature from 'ol/format/XMLFeature'; -import Geometry from 'ol/geom/Geometry'; -import LinearRing from 'ol/geom/LinearRing'; -import LineString from 'ol/geom/LineString'; -import MultiLineString from 'ol/geom/MultiLineString'; -import MultiPoint from 'ol/geom/MultiPoint'; -import MultiPolygon from 'ol/geom/MultiPolygon'; -import Point from 'ol/geom/Point'; -import Polygon from 'ol/geom/Polygon'; -import { Parser } from 'ol/xml'; +import Feature from '../Feature'; +import Geometry from '../geom/Geometry'; +import LinearRing from '../geom/LinearRing'; +import LineString from '../geom/LineString'; +import MultiLineString from '../geom/MultiLineString'; +import MultiPoint from '../geom/MultiPoint'; +import MultiPolygon from '../geom/MultiPolygon'; +import Point from '../geom/Point'; +import Polygon from '../geom/Polygon'; +import { Parser } from '../xml'; +import XMLFeature from './XMLFeature'; + export default class GMLBase extends XMLFeature { constructor(opt_options?: Options); protected featureNS: { [key: string]: string } | string; @@ -27,7 +28,7 @@ export default class GMLBase extends XMLFeature { readMultiPolygon(node: Element, objectStack: any[]): MultiPolygon; readPoint(node: Element, objectStack: any[]): Point; readPolygon(node: Element, objectStack: any[]): Polygon; - readFeatureElementInternal(node: Element, objectStack: any[], asFeature: boolean): Feature | { [key: string]: any }; + readFeatureElementInternal(node: Element, objectStack: any[], asFeature: boolean): Feature | object; readFeaturesInternal(node: Element, objectStack: any[]): Feature[]; readMultiLineString(node: Element, objectStack: any[]): MultiLineString; } diff --git a/@types/ol/format/GPX.d.ts b/@types/ol/format/GPX.d.ts index 344c9651..ef6b150a 100644 --- a/@types/ol/format/GPX.d.ts +++ b/@types/ol/format/GPX.d.ts @@ -1,8 +1,9 @@ -import { Coordinate } from 'ol/coordinate'; -import Feature from 'ol/Feature'; -import XMLFeature from 'ol/format/XMLFeature'; -import GeometryLayout from 'ol/geom/GeometryLayout'; -import LineString from 'ol/geom/LineString'; +import { Coordinate } from '../coordinate'; +import Feature from '../Feature'; +import GeometryLayout from '../geom/GeometryLayout'; +import LineString from '../geom/LineString'; +import XMLFeature from './XMLFeature'; + export default class GPX extends XMLFeature { constructor(opt_options?: Options); } diff --git a/@types/ol/format/GeoJSON.d.ts b/@types/ol/format/GeoJSON.d.ts index 68216824..18c3b292 100644 --- a/@types/ol/format/GeoJSON.d.ts +++ b/@types/ol/format/GeoJSON.d.ts @@ -10,17 +10,18 @@ import { Point, Polygon } from 'geojson'; -import { ReadOptions, WriteOptions } from 'ol/format/Feature'; -import JSONFeature from 'ol/format/JSONFeature'; -import Geometry_1 from 'ol/geom/Geometry'; -import GeometryCollection_1 from 'ol/geom/GeometryCollection'; -import LineString_1 from 'ol/geom/LineString'; -import MultiLineString_1 from 'ol/geom/MultiLineString'; -import MultiPoint_1 from 'ol/geom/MultiPoint'; -import MultiPolygon_1 from 'ol/geom/MultiPolygon'; -import Point_1 from 'ol/geom/Point'; -import Polygon_1 from 'ol/geom/Polygon'; -import { ProjectionLike } from 'ol/proj'; +import Geometry_1 from '../geom/Geometry'; +import GeometryCollection_1 from '../geom/GeometryCollection'; +import LineString_1 from '../geom/LineString'; +import MultiLineString_1 from '../geom/MultiLineString'; +import MultiPoint_1 from '../geom/MultiPoint'; +import MultiPolygon_1 from '../geom/MultiPolygon'; +import Point_1 from '../geom/Point'; +import Polygon_1 from '../geom/Polygon'; +import { ProjectionLike } from '../proj'; +import { ReadOptions, WriteOptions } from './Feature'; +import JSONFeature from './JSONFeature'; + export default class GeoJSON extends JSONFeature { constructor(opt_options?: Options); } diff --git a/@types/ol/format/IGC.d.ts b/@types/ol/format/IGC.d.ts index c21982c4..52ac7dd0 100644 --- a/@types/ol/format/IGC.d.ts +++ b/@types/ol/format/IGC.d.ts @@ -1,4 +1,5 @@ -import TextFeature from 'ol/format/TextFeature'; +import TextFeature from './TextFeature'; + export default class IGC extends TextFeature { constructor(opt_options?: Options); } diff --git a/@types/ol/format/JSONFeature.d.ts b/@types/ol/format/JSONFeature.d.ts index 67342b25..b11a697c 100644 --- a/@types/ol/format/JSONFeature.d.ts +++ b/@types/ol/format/JSONFeature.d.ts @@ -1,25 +1,26 @@ -import Feature, { FeatureLike } from 'ol/Feature'; -import FeatureFormat, { ReadOptions, WriteOptions } from 'ol/format/Feature'; -import Geometry from 'ol/geom/Geometry'; -import Projection from 'ol/proj/Projection'; +import Feature, { FeatureLike } from '../Feature'; +import Geometry from '../geom/Geometry'; +import Projection from '../proj/Projection'; +import FeatureFormat, { ReadOptions, WriteOptions } from './Feature'; + export default class JSONFeature extends FeatureFormat { constructor(); - protected readProjectionFromObject(object: { [key: string]: any }): Projection; - protected readFeaturesFromObject(object: { [key: string]: any }, opt_options?: ReadOptions): Feature[]; - protected readGeometryFromObject(object: { [key: string]: any }, opt_options?: ReadOptions): Geometry; - protected readFeatureFromObject(object: { [key: string]: any }, opt_options?: ReadOptions): Feature; - readGeometry(source: ArrayBuffer | Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): Geometry; - readGeometry(source: Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): Geometry; - readFeatures(source: ArrayBuffer | Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): Feature[]; - readFeatures(source: Document | Node | ArrayBuffer | { [key: string]: any } | string, opt_options?: ReadOptions): FeatureLike[]; - readProjection(source: ArrayBuffer | Document | Node | { [key: string]: any } | string): Projection; - readProjection(source: Document | Node | { [key: string]: any } | string): Projection; - readFeature(source: ArrayBuffer | Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): Feature; - readFeature(source: Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): FeatureLike; + protected readProjectionFromObject(object: any): Projection; + protected readFeaturesFromObject(object: any, opt_options?: ReadOptions): Feature[]; + protected readGeometryFromObject(object: any, opt_options?: ReadOptions): Geometry; + protected readFeatureFromObject(object: any, opt_options?: ReadOptions): Feature; + readGeometry(source: ArrayBuffer | Document | Node | object | string, opt_options?: ReadOptions): Geometry; + readGeometry(source: Document | Node | object | string, opt_options?: ReadOptions): Geometry; + readFeatures(source: ArrayBuffer | Document | Node | object | string, opt_options?: ReadOptions): Feature[]; + readFeatures(source: Document | Node | ArrayBuffer | object | string, opt_options?: ReadOptions): FeatureLike[]; + readProjection(source: ArrayBuffer | Document | Node | object | string): Projection; + readProjection(source: Document | Node | object | string): Projection; + readFeature(source: ArrayBuffer | Document | Node | object | string, opt_options?: ReadOptions): Feature; + readFeature(source: Document | Node | object | string, opt_options?: ReadOptions): FeatureLike; writeFeature(feature: Feature, opt_options?: WriteOptions): string; - writeFeatureObject(feature: Feature, opt_options?: WriteOptions): { [key: string]: any }; + writeFeatureObject(feature: Feature, opt_options?: WriteOptions): any; writeFeatures(features: Feature[], opt_options?: WriteOptions): string; - writeFeaturesObject(features: Feature[], opt_options?: WriteOptions): { [key: string]: any }; + writeFeaturesObject(features: Feature[], opt_options?: WriteOptions): any; writeGeometry(geometry: Geometry, opt_options?: WriteOptions): string; - writeGeometryObject(geometry: Geometry, opt_options?: WriteOptions): { [key: string]: any }; + writeGeometryObject(geometry: Geometry, opt_options?: WriteOptions): any; } diff --git a/@types/ol/format/KML.d.ts b/@types/ol/format/KML.d.ts index cca9c0eb..0d2f2c98 100644 --- a/@types/ol/format/KML.d.ts +++ b/@types/ol/format/KML.d.ts @@ -1,23 +1,24 @@ -import { Color } from 'ol/color'; -import Feature from 'ol/Feature'; -import XMLFeature from 'ol/format/XMLFeature'; -import Geometry from 'ol/geom/Geometry'; -import LinearRing from 'ol/geom/LinearRing'; -import LineString from 'ol/geom/LineString'; -import MultiLineString from 'ol/geom/MultiLineString'; -import MultiPoint from 'ol/geom/MultiPoint'; -import MultiPolygon from 'ol/geom/MultiPolygon'; -import Point from 'ol/geom/Point'; -import Polygon from 'ol/geom/Polygon'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import Fill from 'ol/style/Fill'; -import Icon from 'ol/style/Icon'; -import IconAnchorUnits from 'ol/style/IconAnchorUnits'; -import IconOrigin from 'ol/style/IconOrigin'; -import ImageStyle from 'ol/style/Image'; -import Stroke from 'ol/style/Stroke'; -import Style, { StyleFunction } from 'ol/style/Style'; -import Text from 'ol/style/Text'; +import { Color } from '../color'; +import Feature from '../Feature'; +import Geometry from '../geom/Geometry'; +import LinearRing from '../geom/LinearRing'; +import LineString from '../geom/LineString'; +import MultiLineString from '../geom/MultiLineString'; +import MultiPoint from '../geom/MultiPoint'; +import MultiPolygon from '../geom/MultiPolygon'; +import Point from '../geom/Point'; +import Polygon from '../geom/Polygon'; +import SimpleGeometry from '../geom/SimpleGeometry'; +import Fill from '../style/Fill'; +import Icon from '../style/Icon'; +import IconAnchorUnits from '../style/IconAnchorUnits'; +import IconOrigin from '../style/IconOrigin'; +import ImageStyle from '../style/Image'; +import Stroke from '../style/Stroke'; +import Style, { StyleFunction } from '../style/Style'; +import Text from '../style/Text'; +import XMLFeature from './XMLFeature'; + export function getDefaultFillStyle(): Fill; export function getDefaultImageStyle(): ImageStyle; export function getDefaultStrokeStyle(): Stroke; @@ -34,12 +35,12 @@ export default class KML extends XMLFeature { readName(source: Document | Element | string): string; readNameFromDocument(doc: Document): string; readNameFromNode(node: Element): string; - readNetworkLinks(source: Document | Element | string): { [key: string]: any }[]; - readNetworkLinksFromDocument(doc: Document): { [key: string]: any }[]; - readNetworkLinksFromNode(node: Element): { [key: string]: any }[]; - readRegion(source: Document | Element | string): { [key: string]: any }[]; - readRegionFromDocument(doc: Document): { [key: string]: any }[]; - readRegionFromNode(node: Element): { [key: string]: any }[]; + readNetworkLinks(source: Document | Element | string): object[]; + readNetworkLinksFromDocument(doc: Document): object[]; + readNetworkLinksFromNode(node: Element): object[]; + readRegion(source: Document | Element | string): object[]; + readRegionFromDocument(doc: Document): object[]; + readRegionFromNode(node: Element): object[]; } export interface Options { extractStyles?: boolean; diff --git a/@types/ol/format/MVT.d.ts b/@types/ol/format/MVT.d.ts index c1360247..c4065823 100644 --- a/@types/ol/format/MVT.d.ts +++ b/@types/ol/format/MVT.d.ts @@ -1,6 +1,7 @@ -import { FeatureClass } from 'ol/Feature'; -import FeatureFormat from 'ol/format/Feature'; -import GeometryType from 'ol/geom/GeometryType'; +import { FeatureClass } from '../Feature'; +import GeometryType from '../geom/GeometryType'; +import FeatureFormat from './Feature'; + export default class MVT extends FeatureFormat { constructor(opt_options?: Options); setLayers(layers: string[]): void; diff --git a/@types/ol/format/OSMXML.d.ts b/@types/ol/format/OSMXML.d.ts index 7e80fa4b..23576e0e 100644 --- a/@types/ol/format/OSMXML.d.ts +++ b/@types/ol/format/OSMXML.d.ts @@ -1,4 +1,5 @@ -import XMLFeature from 'ol/format/XMLFeature'; +import XMLFeature from './XMLFeature'; + export default class OSMXML extends XMLFeature { constructor(); } diff --git a/@types/ol/format/OWS.d.ts b/@types/ol/format/OWS.d.ts index efcd8ddf..072d8d41 100644 --- a/@types/ol/format/OWS.d.ts +++ b/@types/ol/format/OWS.d.ts @@ -1,4 +1,5 @@ -import XML from 'ol/format/XML'; +import XML from './XML'; + export default class OWS extends XML { constructor(); } diff --git a/@types/ol/format/Polyline.d.ts b/@types/ol/format/Polyline.d.ts index 41e0f8ae..bf02c987 100644 --- a/@types/ol/format/Polyline.d.ts +++ b/@types/ol/format/Polyline.d.ts @@ -1,5 +1,6 @@ -import TextFeature from 'ol/format/TextFeature'; -import GeometryLayout from 'ol/geom/GeometryLayout'; +import GeometryLayout from '../geom/GeometryLayout'; +import TextFeature from './TextFeature'; + export function decodeDeltas(encoded: string, stride: number, opt_factor?: number): number[]; export function decodeFloats(encoded: string, opt_factor?: number): number[]; export function decodeSignedIntegers(encoded: string): number[]; diff --git a/@types/ol/format/TextFeature.d.ts b/@types/ol/format/TextFeature.d.ts index 7552a7f9..531ded26 100644 --- a/@types/ol/format/TextFeature.d.ts +++ b/@types/ol/format/TextFeature.d.ts @@ -1,7 +1,8 @@ -import Feature, { FeatureLike } from 'ol/Feature'; -import FeatureFormat, { WriteOptions, ReadOptions } from 'ol/format/Feature'; -import Geometry from 'ol/geom/Geometry'; -import Projection from 'ol/proj/Projection'; +import Feature, { FeatureLike } from '../Feature'; +import Geometry from '../geom/Geometry'; +import Projection from '../proj/Projection'; +import FeatureFormat, { WriteOptions, ReadOptions } from './Feature'; + export default class TextFeature extends FeatureFormat { constructor(); protected readProjectionFromText(text: string): Projection; @@ -11,13 +12,13 @@ export default class TextFeature extends FeatureFormat { protected writeFeaturesText(features: Feature[], opt_options?: WriteOptions): string; protected readGeometryFromText(text: string, opt_options?: ReadOptions): Geometry; protected readFeatureFromText(text: string, opt_options?: ReadOptions): Feature; - readProjection(source: Document | Node | { [key: string]: any } | string): Projection; + readProjection(source: Document | Node | object | string): Projection; writeFeature(feature: Feature, opt_options?: WriteOptions): string; writeFeatures(features: Feature[], opt_options?: WriteOptions): string; - readGeometry(source: Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): Geometry; - readFeatures(source: Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): Feature[]; - readFeatures(source: Document | Node | ArrayBuffer | { [key: string]: any } | string, opt_options?: ReadOptions): FeatureLike[]; + readGeometry(source: Document | Node | object | string, opt_options?: ReadOptions): Geometry; + readFeatures(source: Document | Node | object | string, opt_options?: ReadOptions): Feature[]; + readFeatures(source: Document | Node | ArrayBuffer | object | string, opt_options?: ReadOptions): FeatureLike[]; writeGeometry(geometry: Geometry, opt_options?: WriteOptions): string; - readFeature(source: Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): Feature; - readFeature(source: Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): FeatureLike; + readFeature(source: Document | Node | object | string, opt_options?: ReadOptions): Feature; + readFeature(source: Document | Node | object | string, opt_options?: ReadOptions): FeatureLike; } diff --git a/@types/ol/format/TopoJSON.d.ts b/@types/ol/format/TopoJSON.d.ts index bb97ca28..fe3eab4a 100644 --- a/@types/ol/format/TopoJSON.d.ts +++ b/@types/ol/format/TopoJSON.d.ts @@ -1,14 +1,3 @@ -import { Coordinate } from 'ol/coordinate'; -import Feature from 'ol/Feature'; -import { ReadOptions } from 'ol/format/Feature'; -import JSONFeature from 'ol/format/JSONFeature'; -import LineString from 'ol/geom/LineString'; -import MultiLineString from 'ol/geom/MultiLineString'; -import MultiPoint from 'ol/geom/MultiPoint'; -import MultiPolygon from 'ol/geom/MultiPolygon'; -import Point from 'ol/geom/Point'; -import Polygon from 'ol/geom/Polygon'; -import { ProjectionLike } from 'ol/proj'; import { GeometryObject, GeometryCollection, @@ -20,6 +9,18 @@ import { Polygon as Polygon_1, Topology } from 'topojson-specification'; +import { Coordinate } from '../coordinate'; +import Feature from '../Feature'; +import LineString from '../geom/LineString'; +import MultiLineString from '../geom/MultiLineString'; +import MultiPoint from '../geom/MultiPoint'; +import MultiPolygon from '../geom/MultiPolygon'; +import Point from '../geom/Point'; +import Polygon from '../geom/Polygon'; +import { ProjectionLike } from '../proj'; +import { ReadOptions } from './Feature'; +import JSONFeature from './JSONFeature'; + export interface Options { dataProjection?: ProjectionLike; layerName?: string; diff --git a/@types/ol/format/WFS.d.ts b/@types/ol/format/WFS.d.ts index 34601ca5..8c623bbe 100644 --- a/@types/ol/format/WFS.d.ts +++ b/@types/ol/format/WFS.d.ts @@ -1,19 +1,20 @@ -import { Extent } from 'ol/extent'; -import Feature from 'ol/Feature'; -import Bbox from 'ol/format/filter/Bbox'; -import ComparisonBinary from 'ol/format/filter/ComparisonBinary'; -import Contains from 'ol/format/filter/Contains'; -import During from 'ol/format/filter/During'; -import Filter from 'ol/format/filter/Filter'; -import Intersects from 'ol/format/filter/Intersects'; -import IsBetween from 'ol/format/filter/IsBetween'; -import IsLike from 'ol/format/filter/IsLike'; -import IsNull from 'ol/format/filter/IsNull'; -import LogicalNary from 'ol/format/filter/LogicalNary'; -import Not from 'ol/format/filter/Not'; -import Within from 'ol/format/filter/Within'; -import GMLBase, { Options as Options_1 } from 'ol/format/GMLBase'; -import XMLFeature from 'ol/format/XMLFeature'; +import { Extent } from '../extent'; +import Feature from '../Feature'; +import Bbox from './filter/Bbox'; +import ComparisonBinary from './filter/ComparisonBinary'; +import Contains from './filter/Contains'; +import During from './filter/During'; +import Filter from './filter/Filter'; +import Intersects from './filter/Intersects'; +import IsBetween from './filter/IsBetween'; +import IsLike from './filter/IsLike'; +import IsNull from './filter/IsNull'; +import LogicalNary from './filter/LogicalNary'; +import Not from './filter/Not'; +import Within from './filter/Within'; +import GMLBase, { Options as Options_1 } from './GMLBase'; +import XMLFeature from './XMLFeature'; + export function writeFilter(filter: Filter): Node; export interface FeatureCollectionMetadata { numberOfFeatures: number; @@ -34,10 +35,10 @@ export interface TransactionResponse { export default class WFS extends XMLFeature { constructor(opt_options?: Options); getFeatureType(): string[] | string; - readFeatureCollectionMetadata(source: Document | Element | { [key: string]: any } | string): FeatureCollectionMetadata; + readFeatureCollectionMetadata(source: Document | Element | object | string): FeatureCollectionMetadata; readFeatureCollectionMetadataFromDocument(doc: Document): FeatureCollectionMetadata; readFeatureCollectionMetadataFromNode(node: Element): FeatureCollectionMetadata; - readTransactionResponse(source: Document | Element | { [key: string]: any } | string): TransactionResponse; + readTransactionResponse(source: Document | Element | object | string): TransactionResponse; readTransactionResponseFromDocument(doc: Document): TransactionResponse; readTransactionResponseFromNode(node: Element): TransactionResponse; setFeatureType(featureType: string[] | string): void; @@ -68,7 +69,7 @@ export interface WriteTransactionOptions { srsName?: string; handle?: string; hasZ?: boolean; - nativeElements: { [key: string]: any }[]; + nativeElements: object[]; gmlOptions?: Options_1; version?: string; } diff --git a/@types/ol/format/WKT.d.ts b/@types/ol/format/WKT.d.ts index f93fea78..86d10ce5 100644 --- a/@types/ol/format/WKT.d.ts +++ b/@types/ol/format/WKT.d.ts @@ -1,14 +1,15 @@ -import TextFeature from 'ol/format/TextFeature'; -import Geometry from 'ol/geom/Geometry'; -import GeometryCollection from 'ol/geom/GeometryCollection'; -import LinearRing from 'ol/geom/LinearRing'; -import LineString from 'ol/geom/LineString'; -import MultiLineString from 'ol/geom/MultiLineString'; -import MultiPoint from 'ol/geom/MultiPoint'; -import MultiPolygon from 'ol/geom/MultiPolygon'; -import Point from 'ol/geom/Point'; -import Polygon from 'ol/geom/Polygon'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; +import Geometry from '../geom/Geometry'; +import GeometryCollection from '../geom/GeometryCollection'; +import LinearRing from '../geom/LinearRing'; +import LineString from '../geom/LineString'; +import MultiLineString from '../geom/MultiLineString'; +import MultiPoint from '../geom/MultiPoint'; +import MultiPolygon from '../geom/MultiPolygon'; +import Point from '../geom/Point'; +import Polygon from '../geom/Polygon'; +import SimpleGeometry from '../geom/SimpleGeometry'; +import TextFeature from './TextFeature'; + export interface Options { splitCollection?: boolean; } diff --git a/@types/ol/format/WMSCapabilities.d.ts b/@types/ol/format/WMSCapabilities.d.ts index 83948169..a2b167a7 100644 --- a/@types/ol/format/WMSCapabilities.d.ts +++ b/@types/ol/format/WMSCapabilities.d.ts @@ -1,5 +1,6 @@ -import { Extent } from 'ol/extent'; -import XML from 'ol/format/XML'; +import { Extent } from '../extent'; +import XML from './XML'; + export default class WMSCapabilities extends XML { constructor(); } diff --git a/@types/ol/format/WMSGetFeatureInfo.d.ts b/@types/ol/format/WMSGetFeatureInfo.d.ts index 2e150e61..790fa908 100644 --- a/@types/ol/format/WMSGetFeatureInfo.d.ts +++ b/@types/ol/format/WMSGetFeatureInfo.d.ts @@ -1,4 +1,5 @@ -import XMLFeature from 'ol/format/XMLFeature'; +import XMLFeature from './XMLFeature'; + export interface Options { layers?: string[]; } diff --git a/@types/ol/format/WMTSCapabilities.d.ts b/@types/ol/format/WMTSCapabilities.d.ts index de2a6398..9e05ffe7 100644 --- a/@types/ol/format/WMTSCapabilities.d.ts +++ b/@types/ol/format/WMTSCapabilities.d.ts @@ -1,4 +1,5 @@ -import XML from 'ol/format/XML'; +import XML from './XML'; + export default class WMTSCapabilities extends XML { constructor(); } diff --git a/@types/ol/format/XML.d.ts b/@types/ol/format/XML.d.ts index e3dac6a3..35cac67c 100644 --- a/@types/ol/format/XML.d.ts +++ b/@types/ol/format/XML.d.ts @@ -1,6 +1,6 @@ export default class XML { constructor(); - read(source: Document | Element | string): { [key: string]: any }; - readFromDocument(doc: Document): { [key: string]: any }; - readFromNode(node: Element): { [key: string]: any }; + read(source: Document | Element | string): any; + readFromDocument(doc: Document): any; + readFromNode(node: Element): any; } diff --git a/@types/ol/format/XMLFeature.d.ts b/@types/ol/format/XMLFeature.d.ts index 9aa06364..80f97707 100644 --- a/@types/ol/format/XMLFeature.d.ts +++ b/@types/ol/format/XMLFeature.d.ts @@ -1,7 +1,8 @@ -import Feature, { FeatureLike } from 'ol/Feature'; -import FeatureFormat, { ReadOptions, WriteOptions } from 'ol/format/Feature'; -import Geometry from 'ol/geom/Geometry'; -import Projection from 'ol/proj/Projection'; +import Feature, { FeatureLike } from '../Feature'; +import Geometry from '../geom/Geometry'; +import Projection from '../proj/Projection'; +import FeatureFormat, { ReadOptions, WriteOptions } from './Feature'; + export default class XMLFeature extends FeatureFormat { constructor(); protected readGeometryFromNode(node: Node, opt_options?: ReadOptions): Geometry; @@ -12,12 +13,12 @@ export default class XMLFeature extends FeatureFormat { protected readProjectionFromNode(node: Node): Projection; protected writeFeatureNode(feature: Feature, opt_options?: WriteOptions): Node; readFeatureFromDocument(doc: Document, opt_options?: ReadOptions): Feature; - readProjection(source: Document | Node | { [key: string]: any } | string): Projection; - readFeature(source: Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): Feature; - readFeature(source: Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): FeatureLike; + readProjection(source: Document | Node | object | string): Projection; + readFeature(source: Document | Node | object | string, opt_options?: ReadOptions): Feature; + readFeature(source: Document | Node | object | string, opt_options?: ReadOptions): FeatureLike; readFeatureFromNode(node: Node, opt_options?: ReadOptions): Feature; - readFeatures(source: Document | Node | { [key: string]: any } | string, opt_options?: ReadOptions): Feature[]; - readFeatures(source: Document | Node | ArrayBuffer | { [key: string]: any } | string, opt_options?: ReadOptions): FeatureLike[]; + readFeatures(source: Document | Node | object | string, opt_options?: ReadOptions): Feature[]; + readFeatures(source: Document | Node | ArrayBuffer | object | string, opt_options?: ReadOptions): FeatureLike[]; writeFeatures(features: Feature[], opt_options?: WriteOptions): string; writeFeaturesNode(features: Feature[], opt_options?: WriteOptions): Node; writeGeometryNode(geometry: Geometry, opt_options?: WriteOptions): Node; diff --git a/@types/ol/format/filter/index.d.ts b/@types/ol/format/filter.d.ts similarity index 61% rename from @types/ol/format/filter/index.d.ts rename to @types/ol/format/filter.d.ts index aff4359e..3888a29e 100644 --- a/@types/ol/format/filter/index.d.ts +++ b/@types/ol/format/filter.d.ts @@ -1,23 +1,24 @@ -import { Extent } from 'ol/extent'; -import And from 'ol/format/filter/And'; -import Bbox from 'ol/format/filter/Bbox'; -import Contains from 'ol/format/filter/Contains'; -import During from 'ol/format/filter/During'; -import EqualTo from 'ol/format/filter/EqualTo'; -import Filter from 'ol/format/filter/Filter'; -import GreaterThan from 'ol/format/filter/GreaterThan'; -import GreaterThanOrEqualTo from 'ol/format/filter/GreaterThanOrEqualTo'; -import Intersects from 'ol/format/filter/Intersects'; -import IsBetween from 'ol/format/filter/IsBetween'; -import IsLike from 'ol/format/filter/IsLike'; -import IsNull from 'ol/format/filter/IsNull'; -import LessThan from 'ol/format/filter/LessThan'; -import LessThanOrEqualTo from 'ol/format/filter/LessThanOrEqualTo'; -import Not from 'ol/format/filter/Not'; -import NotEqualTo from 'ol/format/filter/NotEqualTo'; -import Or from 'ol/format/filter/Or'; -import Within from 'ol/format/filter/Within'; -import Geometry from 'ol/geom/Geometry'; +import { Extent } from '../extent'; +import Geometry from '../geom/Geometry'; +import And from './filter/And'; +import Bbox from './filter/Bbox'; +import Contains from './filter/Contains'; +import During from './filter/During'; +import EqualTo from './filter/EqualTo'; +import Filter from './filter/Filter'; +import GreaterThan from './filter/GreaterThan'; +import GreaterThanOrEqualTo from './filter/GreaterThanOrEqualTo'; +import Intersects from './filter/Intersects'; +import IsBetween from './filter/IsBetween'; +import IsLike from './filter/IsLike'; +import IsNull from './filter/IsNull'; +import LessThan from './filter/LessThan'; +import LessThanOrEqualTo from './filter/LessThanOrEqualTo'; +import Not from './filter/Not'; +import NotEqualTo from './filter/NotEqualTo'; +import Or from './filter/Or'; +import Within from './filter/Within'; + export function and(...conditions: Filter[]): And; export function bbox(geometryName: string, extent: Extent, opt_srsName?: string): Bbox; export function between(propertyName: string, lowerBoundary: number, upperBoundary: number): IsBetween; diff --git a/@types/ol/format/filter/And.d.ts b/@types/ol/format/filter/And.d.ts index ffd1051e..ab5f124a 100644 --- a/@types/ol/format/filter/And.d.ts +++ b/@types/ol/format/filter/And.d.ts @@ -1,5 +1,6 @@ -import Filter from 'ol/format/filter/Filter'; -import LogicalNary from 'ol/format/filter/LogicalNary'; +import Filter from './Filter'; +import LogicalNary from './LogicalNary'; + export default class And extends LogicalNary { constructor(...conditions: Filter[]); } diff --git a/@types/ol/format/filter/Bbox.d.ts b/@types/ol/format/filter/Bbox.d.ts index d2472ecd..e169325f 100644 --- a/@types/ol/format/filter/Bbox.d.ts +++ b/@types/ol/format/filter/Bbox.d.ts @@ -1,5 +1,6 @@ -import { Extent } from 'ol/extent'; -import Filter from 'ol/format/filter/Filter'; +import { Extent } from '../../extent'; +import Filter from './Filter'; + export default class Bbox extends Filter { constructor(geometryName: string, extent: Extent, opt_srsName?: string); } diff --git a/@types/ol/format/filter/Comparison.d.ts b/@types/ol/format/filter/Comparison.d.ts index 025bb17d..3f17bf62 100644 --- a/@types/ol/format/filter/Comparison.d.ts +++ b/@types/ol/format/filter/Comparison.d.ts @@ -1,4 +1,5 @@ -import Filter from 'ol/format/filter/Filter'; +import Filter from './Filter'; + export default class Comparison extends Filter { constructor(tagName: string, propertyName: string); } diff --git a/@types/ol/format/filter/ComparisonBinary.d.ts b/@types/ol/format/filter/ComparisonBinary.d.ts index b6c17139..af3345dd 100644 --- a/@types/ol/format/filter/ComparisonBinary.d.ts +++ b/@types/ol/format/filter/ComparisonBinary.d.ts @@ -1,4 +1,5 @@ -import Comparison from 'ol/format/filter/Comparison'; +import Comparison from './Comparison'; + export default class ComparisonBinary extends Comparison { constructor(tagName: string, propertyName: string, expression: string | number, opt_matchCase?: boolean); } diff --git a/@types/ol/format/filter/Contains.d.ts b/@types/ol/format/filter/Contains.d.ts index 8b486f68..dc7e9a38 100644 --- a/@types/ol/format/filter/Contains.d.ts +++ b/@types/ol/format/filter/Contains.d.ts @@ -1,5 +1,6 @@ -import Spatial from 'ol/format/filter/Spatial'; -import Geometry from 'ol/geom/Geometry'; +import Geometry from '../../geom/Geometry'; +import Spatial from './Spatial'; + export default class Contains extends Spatial { constructor(geometryName: string, geometry: Geometry, opt_srsName?: string); } diff --git a/@types/ol/format/filter/During.d.ts b/@types/ol/format/filter/During.d.ts index 3cd6a8d6..e5c98daf 100644 --- a/@types/ol/format/filter/During.d.ts +++ b/@types/ol/format/filter/During.d.ts @@ -1,4 +1,5 @@ -import Comparison from 'ol/format/filter/Comparison'; +import Comparison from './Comparison'; + export default class During extends Comparison { constructor(propertyName: string, begin: string, end: string); } diff --git a/@types/ol/format/filter/EqualTo.d.ts b/@types/ol/format/filter/EqualTo.d.ts index bceaf270..5a6766a4 100644 --- a/@types/ol/format/filter/EqualTo.d.ts +++ b/@types/ol/format/filter/EqualTo.d.ts @@ -1,4 +1,5 @@ -import ComparisonBinary from 'ol/format/filter/ComparisonBinary'; +import ComparisonBinary from './ComparisonBinary'; + export default class EqualTo extends ComparisonBinary { constructor(propertyName: string, expression: string | number, opt_matchCase?: boolean); } diff --git a/@types/ol/format/filter/GreaterThan.d.ts b/@types/ol/format/filter/GreaterThan.d.ts index d0e3b1e9..c9e0f8c8 100644 --- a/@types/ol/format/filter/GreaterThan.d.ts +++ b/@types/ol/format/filter/GreaterThan.d.ts @@ -1,4 +1,5 @@ -import ComparisonBinary from 'ol/format/filter/ComparisonBinary'; +import ComparisonBinary from './ComparisonBinary'; + export default class GreaterThan extends ComparisonBinary { constructor(propertyName: string, expression: number); } diff --git a/@types/ol/format/filter/GreaterThanOrEqualTo.d.ts b/@types/ol/format/filter/GreaterThanOrEqualTo.d.ts index b75e033f..e569c0e3 100644 --- a/@types/ol/format/filter/GreaterThanOrEqualTo.d.ts +++ b/@types/ol/format/filter/GreaterThanOrEqualTo.d.ts @@ -1,4 +1,5 @@ -import ComparisonBinary from 'ol/format/filter/ComparisonBinary'; +import ComparisonBinary from './ComparisonBinary'; + export default class GreaterThanOrEqualTo extends ComparisonBinary { constructor(propertyName: string, expression: number); } diff --git a/@types/ol/format/filter/Intersects.d.ts b/@types/ol/format/filter/Intersects.d.ts index fced0562..3060c1a4 100644 --- a/@types/ol/format/filter/Intersects.d.ts +++ b/@types/ol/format/filter/Intersects.d.ts @@ -1,5 +1,6 @@ -import Spatial from 'ol/format/filter/Spatial'; -import Geometry from 'ol/geom/Geometry'; +import Geometry from '../../geom/Geometry'; +import Spatial from './Spatial'; + export default class Intersects extends Spatial { constructor(geometryName: string, geometry: Geometry, opt_srsName?: string); } diff --git a/@types/ol/format/filter/IsBetween.d.ts b/@types/ol/format/filter/IsBetween.d.ts index daec6910..e68a3384 100644 --- a/@types/ol/format/filter/IsBetween.d.ts +++ b/@types/ol/format/filter/IsBetween.d.ts @@ -1,4 +1,5 @@ -import Comparison from 'ol/format/filter/Comparison'; +import Comparison from './Comparison'; + export default class IsBetween extends Comparison { constructor(propertyName: string, lowerBoundary: number, upperBoundary: number); } diff --git a/@types/ol/format/filter/IsLike.d.ts b/@types/ol/format/filter/IsLike.d.ts index 77d1a6d5..d5eef8d9 100644 --- a/@types/ol/format/filter/IsLike.d.ts +++ b/@types/ol/format/filter/IsLike.d.ts @@ -1,4 +1,5 @@ -import Comparison from 'ol/format/filter/Comparison'; +import Comparison from './Comparison'; + export default class IsLike extends Comparison { constructor(propertyName: string, pattern: string, opt_wildCard?: string, opt_singleChar?: string, opt_escapeChar?: string, opt_matchCase?: boolean); } diff --git a/@types/ol/format/filter/IsNull.d.ts b/@types/ol/format/filter/IsNull.d.ts index 4fb2f22d..2422bea6 100644 --- a/@types/ol/format/filter/IsNull.d.ts +++ b/@types/ol/format/filter/IsNull.d.ts @@ -1,4 +1,5 @@ -import Comparison from 'ol/format/filter/Comparison'; +import Comparison from './Comparison'; + export default class IsNull extends Comparison { constructor(propertyName: string); } diff --git a/@types/ol/format/filter/LessThan.d.ts b/@types/ol/format/filter/LessThan.d.ts index dec0c662..ddaa6cae 100644 --- a/@types/ol/format/filter/LessThan.d.ts +++ b/@types/ol/format/filter/LessThan.d.ts @@ -1,4 +1,5 @@ -import ComparisonBinary from 'ol/format/filter/ComparisonBinary'; +import ComparisonBinary from './ComparisonBinary'; + export default class LessThan extends ComparisonBinary { constructor(propertyName: string, expression: number); } diff --git a/@types/ol/format/filter/LessThanOrEqualTo.d.ts b/@types/ol/format/filter/LessThanOrEqualTo.d.ts index c35311a4..c33d6b0e 100644 --- a/@types/ol/format/filter/LessThanOrEqualTo.d.ts +++ b/@types/ol/format/filter/LessThanOrEqualTo.d.ts @@ -1,4 +1,5 @@ -import ComparisonBinary from 'ol/format/filter/ComparisonBinary'; +import ComparisonBinary from './ComparisonBinary'; + export default class LessThanOrEqualTo extends ComparisonBinary { constructor(propertyName: string, expression: number); } diff --git a/@types/ol/format/filter/LogicalNary.d.ts b/@types/ol/format/filter/LogicalNary.d.ts index ff1aaa14..d9317b70 100644 --- a/@types/ol/format/filter/LogicalNary.d.ts +++ b/@types/ol/format/filter/LogicalNary.d.ts @@ -1,4 +1,5 @@ -import Filter from 'ol/format/filter/Filter'; +import Filter from './Filter'; + export default class LogicalNary extends Filter { constructor(tagName: string, conditions: Filter[]); } diff --git a/@types/ol/format/filter/Not.d.ts b/@types/ol/format/filter/Not.d.ts index 61ecad24..620e6cac 100644 --- a/@types/ol/format/filter/Not.d.ts +++ b/@types/ol/format/filter/Not.d.ts @@ -1,4 +1,5 @@ -import Filter from 'ol/format/filter/Filter'; +import Filter from './Filter'; + export default class Not extends Filter { constructor(condition: Filter); } diff --git a/@types/ol/format/filter/NotEqualTo.d.ts b/@types/ol/format/filter/NotEqualTo.d.ts index 35116c02..b0229875 100644 --- a/@types/ol/format/filter/NotEqualTo.d.ts +++ b/@types/ol/format/filter/NotEqualTo.d.ts @@ -1,4 +1,5 @@ -import ComparisonBinary from 'ol/format/filter/ComparisonBinary'; +import ComparisonBinary from './ComparisonBinary'; + export default class NotEqualTo extends ComparisonBinary { constructor(propertyName: string, expression: string | number, opt_matchCase?: boolean); } diff --git a/@types/ol/format/filter/Or.d.ts b/@types/ol/format/filter/Or.d.ts index 9f177b58..31826cfa 100644 --- a/@types/ol/format/filter/Or.d.ts +++ b/@types/ol/format/filter/Or.d.ts @@ -1,5 +1,6 @@ -import Filter from 'ol/format/filter/Filter'; -import LogicalNary from 'ol/format/filter/LogicalNary'; +import Filter from './Filter'; +import LogicalNary from './LogicalNary'; + export default class Or extends LogicalNary { constructor(...conditions: Filter[]); } diff --git a/@types/ol/format/filter/Spatial.d.ts b/@types/ol/format/filter/Spatial.d.ts index 4b56079b..1132e812 100644 --- a/@types/ol/format/filter/Spatial.d.ts +++ b/@types/ol/format/filter/Spatial.d.ts @@ -1,5 +1,6 @@ -import Filter from 'ol/format/filter/Filter'; -import Geometry from 'ol/geom/Geometry'; +import Geometry from '../../geom/Geometry'; +import Filter from './Filter'; + export default class Spatial extends Filter { constructor(tagName: string, geometryName: string, geometry: Geometry, opt_srsName?: string); } diff --git a/@types/ol/format/filter/Within.d.ts b/@types/ol/format/filter/Within.d.ts index 9d593e53..35fdbf72 100644 --- a/@types/ol/format/filter/Within.d.ts +++ b/@types/ol/format/filter/Within.d.ts @@ -1,5 +1,6 @@ -import Spatial from 'ol/format/filter/Spatial'; -import Geometry from 'ol/geom/Geometry'; +import Geometry from '../../geom/Geometry'; +import Spatial from './Spatial'; + export default class Within extends Spatial { constructor(geometryName: string, geometry: Geometry, opt_srsName?: string); } diff --git a/@types/ol/format/index.d.ts b/@types/ol/format/index.d.ts deleted file mode 100644 index 9a23306c..00000000 --- a/@types/ol/format/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export { default as EsriJSON } from 'ol/format/EsriJSON'; -export { default as GeoJSON } from 'ol/format/GeoJSON'; -export { default as GML } from 'ol/format/GML'; -export { default as GPX } from 'ol/format/GPX'; -export { default as IGC } from 'ol/format/IGC'; -export { default as KML } from 'ol/format/KML'; -export { default as MVT } from 'ol/format/MVT'; -export { default as OWS } from 'ol/format/OWS'; -export { default as Polyline } from 'ol/format/Polyline'; -export { default as TopoJSON } from 'ol/format/TopoJSON'; -export { default as WFS } from 'ol/format/WFS'; -export { default as WKT } from 'ol/format/WKT'; -export { default as WMSCapabilities } from 'ol/format/WMSCapabilities'; -export { default as WMSGetFeatureInfo } from 'ol/format/WMSGetFeatureInfo'; -export { default as WMTSCapabilities } from 'ol/format/WMTSCapabilities'; diff --git a/@types/ol/geom.d.ts b/@types/ol/geom.d.ts new file mode 100644 index 00000000..57722111 --- /dev/null +++ b/@types/ol/geom.d.ts @@ -0,0 +1,8 @@ +export { default as Circle } from './geom/Circle'; +export { default as Geometry } from './geom/Geometry'; +export { default as LineString } from './geom/LineString'; +export { default as MultiLineString } from './geom/MultiLineString'; +export { default as MultiPoint } from './geom/MultiPoint'; +export { default as MultiPolygon } from './geom/MultiPolygon'; +export { default as Point } from './geom/Point'; +export { default as Polygon } from './geom/Polygon'; diff --git a/@types/ol/geom/Circle.d.ts b/@types/ol/geom/Circle.d.ts index e31780db..51df99aa 100644 --- a/@types/ol/geom/Circle.d.ts +++ b/@types/ol/geom/Circle.d.ts @@ -1,11 +1,12 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Geometry from 'ol/geom/Geometry'; -import GeometryLayout from 'ol/geom/GeometryLayout'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import Geometry from './Geometry'; +import GeometryLayout from './GeometryLayout'; +import SimpleGeometry from './SimpleGeometry'; + export default class Circle extends SimpleGeometry { constructor(center: Coordinate, opt_radius?: number, opt_layout?: GeometryLayout); getCenter(): Coordinate; diff --git a/@types/ol/geom/Geometry.d.ts b/@types/ol/geom/Geometry.d.ts index 553cb2be..1bc54af1 100644 --- a/@types/ol/geom/Geometry.d.ts +++ b/@types/ol/geom/Geometry.d.ts @@ -1,10 +1,11 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import GeometryType from 'ol/geom/GeometryType'; -import BaseObject, { ObjectEvent } from 'ol/Object'; -import { TransformFunction, ProjectionLike } from 'ol/proj'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import BaseObject, { ObjectEvent } from '../Object'; +import { TransformFunction, ProjectionLike } from '../proj'; +import GeometryType from './GeometryType'; + export default class Geometry extends BaseObject { constructor(); protected simplifiedGeometryCache: { [key: string]: Geometry }; diff --git a/@types/ol/geom/GeometryCollection.d.ts b/@types/ol/geom/GeometryCollection.d.ts index cb227c97..56b8b17e 100644 --- a/@types/ol/geom/GeometryCollection.d.ts +++ b/@types/ol/geom/GeometryCollection.d.ts @@ -1,7 +1,8 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Geometry from 'ol/geom/Geometry'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import Geometry from './Geometry'; + export default class GeometryCollection extends Geometry { constructor(opt_geometries?: Geometry[]); getGeometries(): Geometry[]; diff --git a/@types/ol/geom/LineString.d.ts b/@types/ol/geom/LineString.d.ts index b2ae10b0..2122e779 100644 --- a/@types/ol/geom/LineString.d.ts +++ b/@types/ol/geom/LineString.d.ts @@ -1,9 +1,10 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import GeometryLayout from 'ol/geom/GeometryLayout'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import { ObjectEvent } from 'ol/Object'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import GeometryLayout from './GeometryLayout'; +import SimpleGeometry from './SimpleGeometry'; + export default class LineString extends SimpleGeometry { constructor(coordinates: Coordinate[] | number[], opt_layout?: GeometryLayout); appendCoordinate(coordinate: Coordinate): void; diff --git a/@types/ol/geom/LinearRing.d.ts b/@types/ol/geom/LinearRing.d.ts index 7479e063..324a2e64 100644 --- a/@types/ol/geom/LinearRing.d.ts +++ b/@types/ol/geom/LinearRing.d.ts @@ -1,9 +1,10 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import GeometryLayout from 'ol/geom/GeometryLayout'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import { ObjectEvent } from 'ol/Object'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import GeometryLayout from './GeometryLayout'; +import SimpleGeometry from './SimpleGeometry'; + export default class LinearRing extends SimpleGeometry { constructor(coordinates: Coordinate[] | number[], opt_layout?: GeometryLayout); getArea(): number; diff --git a/@types/ol/geom/MultiLineString.d.ts b/@types/ol/geom/MultiLineString.d.ts index 539fd7d0..c4c6c3d8 100644 --- a/@types/ol/geom/MultiLineString.d.ts +++ b/@types/ol/geom/MultiLineString.d.ts @@ -1,10 +1,11 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import GeometryLayout from 'ol/geom/GeometryLayout'; -import LineString from 'ol/geom/LineString'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import { ObjectEvent } from 'ol/Object'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import GeometryLayout from './GeometryLayout'; +import LineString from './LineString'; +import SimpleGeometry from './SimpleGeometry'; + export default class MultiLineString extends SimpleGeometry { constructor(coordinates: any[] | number[], opt_layout?: GeometryLayout, opt_ends?: number[]); appendLineString(lineString: LineString): void; diff --git a/@types/ol/geom/MultiPoint.d.ts b/@types/ol/geom/MultiPoint.d.ts index 40971d04..c44df89a 100644 --- a/@types/ol/geom/MultiPoint.d.ts +++ b/@types/ol/geom/MultiPoint.d.ts @@ -1,10 +1,11 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import GeometryLayout from 'ol/geom/GeometryLayout'; -import Point from 'ol/geom/Point'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import { ObjectEvent } from 'ol/Object'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import GeometryLayout from './GeometryLayout'; +import Point from './Point'; +import SimpleGeometry from './SimpleGeometry'; + export default class MultiPoint extends SimpleGeometry { constructor(coordinates: Coordinate[] | number[], opt_layout?: GeometryLayout); appendPoint(point: Point): void; diff --git a/@types/ol/geom/MultiPolygon.d.ts b/@types/ol/geom/MultiPolygon.d.ts index 426578c5..b980f9fa 100644 --- a/@types/ol/geom/MultiPolygon.d.ts +++ b/@types/ol/geom/MultiPolygon.d.ts @@ -1,10 +1,11 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import GeometryLayout from 'ol/geom/GeometryLayout'; -import MultiPoint from 'ol/geom/MultiPoint'; -import Polygon from 'ol/geom/Polygon'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import GeometryLayout from './GeometryLayout'; +import MultiPoint from './MultiPoint'; +import Polygon from './Polygon'; +import SimpleGeometry from './SimpleGeometry'; + export default class MultiPolygon extends SimpleGeometry { constructor(coordinates: any[] | number[], opt_layout?: GeometryLayout, opt_endss?: number[][]); appendPolygon(polygon: Polygon): void; diff --git a/@types/ol/geom/Point.d.ts b/@types/ol/geom/Point.d.ts index 94814342..015cc52b 100644 --- a/@types/ol/geom/Point.d.ts +++ b/@types/ol/geom/Point.d.ts @@ -1,9 +1,10 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import GeometryLayout from 'ol/geom/GeometryLayout'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import { ObjectEvent } from 'ol/Object'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import GeometryLayout from './GeometryLayout'; +import SimpleGeometry from './SimpleGeometry'; + export default class Point extends SimpleGeometry { constructor(coordinates: Coordinate, opt_layout?: GeometryLayout); on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[]; diff --git a/@types/ol/geom/Polygon.d.ts b/@types/ol/geom/Polygon.d.ts index 7f573fed..d9b05652 100644 --- a/@types/ol/geom/Polygon.d.ts +++ b/@types/ol/geom/Polygon.d.ts @@ -1,13 +1,14 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import Circle from 'ol/geom/Circle'; -import GeometryLayout from 'ol/geom/GeometryLayout'; -import LinearRing from 'ol/geom/LinearRing'; -import Point from 'ol/geom/Point'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import { ObjectEvent } from 'ol/Object'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import { ObjectEvent } from '../Object'; +import Circle from './Circle'; +import GeometryLayout from './GeometryLayout'; +import LinearRing from './LinearRing'; +import Point from './Point'; +import SimpleGeometry from './SimpleGeometry'; + export function circular(center: Coordinate, radius: number, opt_n?: number, opt_sphereRadius?: number): Polygon; export function fromCircle(circle: Circle, opt_sides?: number, opt_angle?: number): Polygon; export function fromExtent(extent: Extent): Polygon; diff --git a/@types/ol/geom/SimpleGeometry.d.ts b/@types/ol/geom/SimpleGeometry.d.ts index d1c1395e..68dd548d 100644 --- a/@types/ol/geom/SimpleGeometry.d.ts +++ b/@types/ol/geom/SimpleGeometry.d.ts @@ -1,10 +1,11 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Geometry from 'ol/geom/Geometry'; -import GeometryLayout from 'ol/geom/GeometryLayout'; -import { ObjectEvent } from 'ol/Object'; -import { Transform } from 'ol/transform'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import { Transform } from '../transform'; +import Geometry from './Geometry'; +import GeometryLayout from './GeometryLayout'; + export function getStrideForLayout(layout: GeometryLayout): number; export function transformGeom2D(simpleGeometry: SimpleGeometry, transform: Transform, opt_dest?: number[]): number[]; export default class SimpleGeometry extends Geometry { diff --git a/@types/ol/geom/flat/contains.d.ts b/@types/ol/geom/flat/contains.d.ts index 64cdec88..b7caadc3 100644 --- a/@types/ol/geom/flat/contains.d.ts +++ b/@types/ol/geom/flat/contains.d.ts @@ -1,4 +1,5 @@ -import { Extent } from 'ol/extent'; +import { Extent } from '../../extent'; + export function linearRingContainsExtent(flatCoordinates: number[], offset: number, end: number, stride: number, extent: Extent): boolean; export function linearRingContainsXY(flatCoordinates: number[], offset: number, end: number, stride: number, x: number, y: number): boolean; export function linearRingsContainsXY(flatCoordinates: number[], offset: number, ends: number[], stride: number, x: number, y: number): boolean; diff --git a/@types/ol/geom/flat/deflate.d.ts b/@types/ol/geom/flat/deflate.d.ts index 6630816e..620c8e34 100644 --- a/@types/ol/geom/flat/deflate.d.ts +++ b/@types/ol/geom/flat/deflate.d.ts @@ -1,4 +1,5 @@ -import { Coordinate } from 'ol/coordinate'; +import { Coordinate } from '../../coordinate'; + export function deflateCoordinate(flatCoordinates: number[], offset: number, coordinate: Coordinate, stride: number): number; export function deflateCoordinates(flatCoordinates: number[], offset: number, coordinates: Coordinate[], stride: number): number; export function deflateCoordinatesArray(flatCoordinates: number[], offset: number, coordinatess: Coordinate[][], stride: number, opt_ends?: number[]): number[]; diff --git a/@types/ol/geom/flat/geodesic.d.ts b/@types/ol/geom/flat/geodesic.d.ts index fe56d95f..08b7c882 100644 --- a/@types/ol/geom/flat/geodesic.d.ts +++ b/@types/ol/geom/flat/geodesic.d.ts @@ -1,6 +1,7 @@ -import { Coordinate } from 'ol/coordinate'; -import { TransformFunction } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; +import { Coordinate } from '../../coordinate'; +import { TransformFunction } from '../../proj'; +import Projection from '../../proj/Projection'; + export function greatCircleArc(lon1: number, lat1: number, lon2: number, lat2: number, projection: Projection, squaredTolerance: number): number[]; export function meridian(lon: number, lat1: number, lat2: number, projection: Projection, squaredTolerance: number): number[]; export function parallel(lat: number, lon1: number, lon2: number, projection: Projection, squaredTolerance: number): number[]; diff --git a/@types/ol/geom/flat/inflate.d.ts b/@types/ol/geom/flat/inflate.d.ts index 872eb428..03c3468b 100644 --- a/@types/ol/geom/flat/inflate.d.ts +++ b/@types/ol/geom/flat/inflate.d.ts @@ -1,4 +1,5 @@ -import { Coordinate } from 'ol/coordinate'; +import { Coordinate } from '../../coordinate'; + export function inflateCoordinates(flatCoordinates: number[], offset: number, end: number, stride: number, opt_coordinates?: Coordinate[]): Coordinate[]; export function inflateCoordinatesArray(flatCoordinates: number[], offset: number, ends: number[], stride: number, opt_coordinatess?: Coordinate[][]): Coordinate[][]; export function inflateMultiCoordinatesArray(flatCoordinates: number[], offset: number, endss: number[][], stride: number, opt_coordinatesss?: Coordinate[][][]): Coordinate[][][]; diff --git a/@types/ol/geom/flat/interpolate.d.ts b/@types/ol/geom/flat/interpolate.d.ts index 9e5d5996..09ce9f09 100644 --- a/@types/ol/geom/flat/interpolate.d.ts +++ b/@types/ol/geom/flat/interpolate.d.ts @@ -1,4 +1,5 @@ -import { Coordinate } from 'ol/coordinate'; +import { Coordinate } from '../../coordinate'; + export function interpolatePoint(flatCoordinates: number[], offset: number, end: number, stride: number, fraction: number, opt_dest?: number[]): number[]; export function lineStringCoordinateAtM(flatCoordinates: number[], offset: number, end: number, stride: number, m: number, extrapolate: boolean): Coordinate; export function lineStringsCoordinateAtM(flatCoordinates: number[], offset: number, ends: number[], stride: number, m: number, extrapolate: boolean, interpolate: boolean): Coordinate; diff --git a/@types/ol/geom/flat/intersectsextent.d.ts b/@types/ol/geom/flat/intersectsextent.d.ts index 5f4fe4d9..5c27d1c4 100644 --- a/@types/ol/geom/flat/intersectsextent.d.ts +++ b/@types/ol/geom/flat/intersectsextent.d.ts @@ -1,4 +1,5 @@ -import { Extent } from 'ol/extent'; +import { Extent } from '../../extent'; + export function intersectsLinearRing(flatCoordinates: number[], offset: number, end: number, stride: number, extent: Extent): boolean; export function intersectsLinearRingArray(flatCoordinates: number[], offset: number, ends: number[], stride: number, extent: Extent): boolean; export function intersectsLinearRingMultiArray(flatCoordinates: number[], offset: number, endss: number[][], stride: number, extent: Extent): boolean; diff --git a/@types/ol/geom/flat/segments.d.ts b/@types/ol/geom/flat/segments.d.ts index d12d3a5c..eb8fd78c 100644 --- a/@types/ol/geom/flat/segments.d.ts +++ b/@types/ol/geom/flat/segments.d.ts @@ -1,2 +1,3 @@ -import { Coordinate } from 'ol/coordinate'; +import { Coordinate } from '../../coordinate'; + export function forEach(flatCoordinates: number[], offset: number, end: number, stride: number, callback: ((this: S, param1: Coordinate, param2: Coordinate) => T), opt_this?: S): T | boolean; diff --git a/@types/ol/geom/flat/transform.d.ts b/@types/ol/geom/flat/transform.d.ts index 745a0317..9a8ef122 100644 --- a/@types/ol/geom/flat/transform.d.ts +++ b/@types/ol/geom/flat/transform.d.ts @@ -1,4 +1,5 @@ -import { Transform } from 'ol/transform'; +import { Transform } from '../../transform'; + export function rotate(flatCoordinates: number[], offset: number, end: number, stride: number, angle: number, anchor: number[], opt_dest?: number[]): number[]; export function scale(flatCoordinates: number[], offset: number, end: number, stride: number, sx: number, sy: number, anchor: number[], opt_dest?: number[]): number[]; export function transform2D(flatCoordinates: number[], offset: number, end: number, stride: number, transform: Transform, opt_dest?: number[]): number[]; diff --git a/@types/ol/geom/index.d.ts b/@types/ol/geom/index.d.ts deleted file mode 100644 index 05d84ec5..00000000 --- a/@types/ol/geom/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export { default as Circle } from 'ol/geom/Circle'; -export { default as Geometry } from 'ol/geom/Geometry'; -export { default as LineString } from 'ol/geom/LineString'; -export { default as MultiLineString } from 'ol/geom/MultiLineString'; -export { default as MultiPoint } from 'ol/geom/MultiPoint'; -export { default as MultiPolygon } from 'ol/geom/MultiPolygon'; -export { default as Point } from 'ol/geom/Point'; -export { default as Polygon } from 'ol/geom/Polygon'; diff --git a/@types/ol/has.d.ts b/@types/ol/has.d.ts index da480b86..5673d965 100644 --- a/@types/ol/has.d.ts +++ b/@types/ol/has.d.ts @@ -1,4 +1,5 @@ -export { HAS as WEBGL } from 'ol/webgl'; +export { HAS as WEBGL } from './webgl'; + export const DEVICE_PIXEL_RATIO: number; export const GEOLOCATION: boolean; export const TOUCH: boolean; diff --git a/@types/ol/index.d.ts b/@types/ol/index.d.ts index 6ad2a235..6d938254 100644 --- a/@types/ol/index.d.ts +++ b/@types/ol/index.d.ts @@ -1,31 +1,32 @@ -export { default as AssertionError } from 'ol/AssertionError'; -export { default as Collection } from 'ol/Collection'; -export { default as Disposable } from 'ol/Disposable'; -export { default as Feature } from 'ol/Feature'; -export { default as Geolocation } from 'ol/Geolocation'; -export { default as Graticule } from 'ol/Graticule'; -export { default as Image } from 'ol/Image'; -export { default as ImageBase } from 'ol/ImageBase'; -export { default as ImageCanvas } from 'ol/ImageCanvas'; -export { default as ImageTile } from 'ol/ImageTile'; -export { default as Kinetic } from 'ol/Kinetic'; -export { default as Map } from 'ol/Map'; -export { default as MapBrowserEvent } from 'ol/MapBrowserEvent'; -export { default as MapBrowserEventHandler } from 'ol/MapBrowserEventHandler'; -export { default as MapBrowserPointerEvent } from 'ol/MapBrowserPointerEvent'; -export { default as MapEvent } from 'ol/MapEvent'; -export { default as Object } from 'ol/Object'; -export { default as Observable } from 'ol/Observable'; -export { default as Overlay } from 'ol/Overlay'; -export { default as PluggableMap } from 'ol/PluggableMap'; -export { default as Tile } from 'ol/Tile'; -export { default as TileCache } from 'ol/TileCache'; -export { default as TileQueue } from 'ol/TileQueue'; -export { default as TileRange } from 'ol/TileRange'; -export { default as VectorImageTile } from 'ol/VectorImageTile'; -export { default as VectorTile } from 'ol/VectorTile'; -export { default as View } from 'ol/View'; -export { default as WebGLMap } from 'ol/WebGLMap'; -export { VERSION } from 'ol/util'; -export function getUid(obj: { [key: string]: any }): string; +export { default as AssertionError } from './AssertionError'; +export { default as Collection } from './Collection'; +export { default as Disposable } from './Disposable'; +export { default as Feature } from './Feature'; +export { default as Geolocation } from './Geolocation'; +export { default as Graticule } from './Graticule'; +export { default as Image } from './Image'; +export { default as ImageBase } from './ImageBase'; +export { default as ImageCanvas } from './ImageCanvas'; +export { default as ImageTile } from './ImageTile'; +export { default as Kinetic } from './Kinetic'; +export { default as Map } from './Map'; +export { default as MapBrowserEvent } from './MapBrowserEvent'; +export { default as MapBrowserEventHandler } from './MapBrowserEventHandler'; +export { default as MapBrowserPointerEvent } from './MapBrowserPointerEvent'; +export { default as MapEvent } from './MapEvent'; +export { default as Object } from './Object'; +export { default as Observable } from './Observable'; +export { default as Overlay } from './Overlay'; +export { default as PluggableMap } from './PluggableMap'; +export { default as Tile } from './Tile'; +export { default as TileCache } from './TileCache'; +export { default as TileQueue } from './TileQueue'; +export { default as TileRange } from './TileRange'; +export { default as VectorImageTile } from './VectorImageTile'; +export { default as VectorTile } from './VectorTile'; +export { default as View } from './View'; +export { default as WebGLMap } from './WebGLMap'; +export { VERSION } from './util'; + +export function getUid(obj: any): string; export function inherits(childCtor: (() => void), parentCtor: (() => void)): void; diff --git a/@types/ol/interaction.d.ts b/@types/ol/interaction.d.ts new file mode 100644 index 00000000..4907d1be --- /dev/null +++ b/@types/ol/interaction.d.ts @@ -0,0 +1,38 @@ +import Collection from './Collection'; +import Interaction from './interaction/Interaction'; +export { default as DoubleClickZoom } from './interaction/DoubleClickZoom'; +export { default as DragAndDrop } from './interaction/DragAndDrop'; +export { default as DragBox } from './interaction/DragBox'; +export { default as DragPan } from './interaction/DragPan'; +export { default as DragRotate } from './interaction/DragRotate'; +export { default as DragRotateAndZoom } from './interaction/DragRotateAndZoom'; +export { default as DragZoom } from './interaction/DragZoom'; +export { default as Draw } from './interaction/Draw'; +export { default as Extent } from './interaction/Extent'; +export { default as Interaction } from './interaction/Interaction'; +export { default as KeyboardPan } from './interaction/KeyboardPan'; +export { default as KeyboardZoom } from './interaction/KeyboardZoom'; +export { default as Modify } from './interaction/Modify'; +export { default as MouseWheelZoom } from './interaction/MouseWheelZoom'; +export { default as PinchRotate } from './interaction/PinchRotate'; +export { default as PinchZoom } from './interaction/PinchZoom'; +export { default as Pointer } from './interaction/Pointer'; +export { default as Select } from './interaction/Select'; +export { default as Snap } from './interaction/Snap'; +export { default as Translate } from './interaction/Translate'; + +export function defaults(opt_options?: DefaultsOptions): Collection; +export interface DefaultsOptions { + altShiftDragRotate?: boolean; + onFocusOnly?: boolean; + constrainResolution?: boolean; + doubleClickZoom?: boolean; + keyboard?: boolean; + mouseWheelZoom?: boolean; + shiftDragZoom?: boolean; + dragPan?: boolean; + pinchRotate?: boolean; + pinchZoom?: boolean; + zoomDelta?: number; + zoomDuration?: number; +} diff --git a/@types/ol/interaction/DoubleClickZoom.d.ts b/@types/ol/interaction/DoubleClickZoom.d.ts index 882c5375..57501b00 100644 --- a/@types/ol/interaction/DoubleClickZoom.d.ts +++ b/@types/ol/interaction/DoubleClickZoom.d.ts @@ -1,8 +1,9 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Interaction from 'ol/interaction/Interaction'; -import MapBrowserEvent from 'ol/MapBrowserEvent'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import MapBrowserEvent from '../MapBrowserEvent'; +import { ObjectEvent } from '../Object'; +import Interaction from './Interaction'; + export default class DoubleClickZoom extends Interaction { constructor(opt_options?: Options); on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[]; diff --git a/@types/ol/interaction/DragAndDrop.d.ts b/@types/ol/interaction/DragAndDrop.d.ts index a51a7885..1bb20307 100644 --- a/@types/ol/interaction/DragAndDrop.d.ts +++ b/@types/ol/interaction/DragAndDrop.d.ts @@ -1,12 +1,13 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Feature, { FeatureLike } from 'ol/Feature'; -import FeatureFormat from 'ol/format/Feature'; -import Interaction from 'ol/interaction/Interaction'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; -import VectorSource from 'ol/source/Vector'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import Feature, { FeatureLike } from '../Feature'; +import FeatureFormat from '../format/Feature'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import Projection from '../proj/Projection'; +import VectorSource from '../source/Vector'; +import Interaction from './Interaction'; + export default class DragAndDrop extends Interaction { constructor(opt_options?: Options); on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[]; diff --git a/@types/ol/interaction/DragBox.d.ts b/@types/ol/interaction/DragBox.d.ts index aadef1ba..44c58240 100644 --- a/@types/ol/interaction/DragBox.d.ts +++ b/@types/ol/interaction/DragBox.d.ts @@ -1,12 +1,13 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import { Condition } from 'ol/events/condition'; -import Event from 'ol/events/Event'; -import Polygon from 'ol/geom/Polygon'; -import PointerInteraction from 'ol/interaction/Pointer'; -import MapBrowserEvent from 'ol/MapBrowserEvent'; -import { ObjectEvent } from 'ol/Object'; -import { Pixel } from 'ol/pixel'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import { Condition } from '../events/condition'; +import Event from '../events/Event'; +import Polygon from '../geom/Polygon'; +import MapBrowserEvent from '../MapBrowserEvent'; +import { ObjectEvent } from '../Object'; +import { Pixel } from '../pixel'; +import PointerInteraction from './Pointer'; + export default class DragBox extends PointerInteraction { constructor(opt_options?: Options); defaultBoxEndCondition(mapBrowserEvent: MapBrowserEvent, startPixel: Pixel, endPixel: Pixel): boolean; diff --git a/@types/ol/interaction/DragPan.d.ts b/@types/ol/interaction/DragPan.d.ts index 91a51151..e9a3e3e2 100644 --- a/@types/ol/interaction/DragPan.d.ts +++ b/@types/ol/interaction/DragPan.d.ts @@ -1,9 +1,10 @@ -import { EventsKey } from 'ol/events'; -import { Condition } from 'ol/events/condition'; -import Event from 'ol/events/Event'; -import PointerInteraction from 'ol/interaction/Pointer'; -import Kinetic from 'ol/Kinetic'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import { Condition } from '../events/condition'; +import Event from '../events/Event'; +import Kinetic from '../Kinetic'; +import { ObjectEvent } from '../Object'; +import PointerInteraction from './Pointer'; + export default class DragPan extends PointerInteraction { constructor(opt_options?: Options); on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[]; diff --git a/@types/ol/interaction/DragRotate.d.ts b/@types/ol/interaction/DragRotate.d.ts index 59ad39e5..df9956c8 100644 --- a/@types/ol/interaction/DragRotate.d.ts +++ b/@types/ol/interaction/DragRotate.d.ts @@ -1,8 +1,9 @@ -import { EventsKey } from 'ol/events'; -import { Condition } from 'ol/events/condition'; -import Event from 'ol/events/Event'; -import PointerInteraction from 'ol/interaction/Pointer'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import { Condition } from '../events/condition'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import PointerInteraction from './Pointer'; + export default class DragRotate extends PointerInteraction { constructor(opt_options?: Options); on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[]; diff --git a/@types/ol/interaction/DragRotateAndZoom.d.ts b/@types/ol/interaction/DragRotateAndZoom.d.ts index cbcf4a2c..59388ca8 100644 --- a/@types/ol/interaction/DragRotateAndZoom.d.ts +++ b/@types/ol/interaction/DragRotateAndZoom.d.ts @@ -1,8 +1,9 @@ -import { EventsKey } from 'ol/events'; -import { Condition } from 'ol/events/condition'; -import Event from 'ol/events/Event'; -import PointerInteraction from 'ol/interaction/Pointer'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import { Condition } from '../events/condition'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import PointerInteraction from './Pointer'; + export default class DragRotateAndZoom extends PointerInteraction { constructor(opt_options?: Options); on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[]; diff --git a/@types/ol/interaction/DragZoom.d.ts b/@types/ol/interaction/DragZoom.d.ts index f3ff658c..1b3ec283 100644 --- a/@types/ol/interaction/DragZoom.d.ts +++ b/@types/ol/interaction/DragZoom.d.ts @@ -1,8 +1,9 @@ -import { EventsKey } from 'ol/events'; -import { Condition } from 'ol/events/condition'; -import Event from 'ol/events/Event'; -import DragBox, { DragBoxEvent } from 'ol/interaction/DragBox'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import { Condition } from '../events/condition'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import DragBox, { DragBoxEvent } from './DragBox'; + export default class DragZoom extends DragBox { constructor(opt_options?: Options); on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[]; diff --git a/@types/ol/interaction/Draw.d.ts b/@types/ol/interaction/Draw.d.ts index e5b43387..afea0b3c 100644 --- a/@types/ol/interaction/Draw.d.ts +++ b/@types/ol/interaction/Draw.d.ts @@ -1,16 +1,17 @@ -import Collection from 'ol/Collection'; -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import { Condition } from 'ol/events/condition'; -import Event from 'ol/events/Event'; -import Feature from 'ol/Feature'; -import GeometryType from 'ol/geom/GeometryType'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import PointerInteraction from 'ol/interaction/Pointer'; -import VectorLayer from 'ol/layer/Vector'; -import { ObjectEvent } from 'ol/Object'; -import VectorSource from 'ol/source/Vector'; -import { StyleFunction, StyleLike } from 'ol/style/Style'; +import Collection from '../Collection'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import { Condition } from '../events/condition'; +import Event from '../events/Event'; +import Feature from '../Feature'; +import GeometryType from '../geom/GeometryType'; +import SimpleGeometry from '../geom/SimpleGeometry'; +import VectorLayer from '../layer/Vector'; +import { ObjectEvent } from '../Object'; +import VectorSource from '../source/Vector'; +import { StyleFunction, StyleLike } from '../style/Style'; +import PointerInteraction from './Pointer'; + export function createBox(): GeometryFunction; export function createRegularPolygon(opt_sides?: number, opt_angle?: number): GeometryFunction; export default class Draw extends PointerInteraction { diff --git a/@types/ol/interaction/Extent.d.ts b/@types/ol/interaction/Extent.d.ts index 9435cd59..e06f5725 100644 --- a/@types/ol/interaction/Extent.d.ts +++ b/@types/ol/interaction/Extent.d.ts @@ -1,10 +1,11 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import PointerInteraction from 'ol/interaction/Pointer'; -import { ObjectEvent } from 'ol/Object'; -import { StyleFunction, StyleLike } from 'ol/style/Style'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import { ObjectEvent } from '../Object'; +import { StyleFunction, StyleLike } from '../style/Style'; +import PointerInteraction from './Pointer'; + export default class ExtentInteraction extends PointerInteraction { constructor(opt_options?: Options); getExtent(): Extent; diff --git a/@types/ol/interaction/Interaction.d.ts b/@types/ol/interaction/Interaction.d.ts index e30710db..801975f5 100644 --- a/@types/ol/interaction/Interaction.d.ts +++ b/@types/ol/interaction/Interaction.d.ts @@ -1,10 +1,11 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import MapBrowserEvent from 'ol/MapBrowserEvent'; -import BaseObject, { ObjectEvent } from 'ol/Object'; -import PluggableMap from 'ol/PluggableMap'; -import View from 'ol/View'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import MapBrowserEvent from '../MapBrowserEvent'; +import BaseObject, { ObjectEvent } from '../Object'; +import PluggableMap from '../PluggableMap'; +import View from '../View'; + export function pan(view: View, delta: Coordinate, opt_duration?: number): void; export function rotate(view: View, rotation: number, opt_anchor?: Coordinate, opt_duration?: number): void; export function rotateWithoutConstraints(view: View, rotation: number, opt_anchor?: Coordinate, opt_duration?: number): void; diff --git a/@types/ol/interaction/KeyboardPan.d.ts b/@types/ol/interaction/KeyboardPan.d.ts index 04730a8b..733c6968 100644 --- a/@types/ol/interaction/KeyboardPan.d.ts +++ b/@types/ol/interaction/KeyboardPan.d.ts @@ -1,9 +1,10 @@ -import { EventsKey } from 'ol/events'; -import { Condition } from 'ol/events/condition'; -import Event from 'ol/events/Event'; -import Interaction from 'ol/interaction/Interaction'; -import MapBrowserEvent from 'ol/MapBrowserEvent'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import { Condition } from '../events/condition'; +import Event from '../events/Event'; +import MapBrowserEvent from '../MapBrowserEvent'; +import { ObjectEvent } from '../Object'; +import Interaction from './Interaction'; + export default class KeyboardPan extends Interaction { constructor(opt_options?: Options); on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[]; diff --git a/@types/ol/interaction/KeyboardZoom.d.ts b/@types/ol/interaction/KeyboardZoom.d.ts index bb4a40bb..90720740 100644 --- a/@types/ol/interaction/KeyboardZoom.d.ts +++ b/@types/ol/interaction/KeyboardZoom.d.ts @@ -1,9 +1,10 @@ -import { EventsKey } from 'ol/events'; -import { Condition } from 'ol/events/condition'; -import Event from 'ol/events/Event'; -import Interaction from 'ol/interaction/Interaction'; -import MapBrowserEvent from 'ol/MapBrowserEvent'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import { Condition } from '../events/condition'; +import Event from '../events/Event'; +import MapBrowserEvent from '../MapBrowserEvent'; +import { ObjectEvent } from '../Object'; +import Interaction from './Interaction'; + export default class KeyboardZoom extends Interaction { constructor(opt_options?: Options); on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[]; diff --git a/@types/ol/interaction/Modify.d.ts b/@types/ol/interaction/Modify.d.ts index d9067ce2..91413811 100644 --- a/@types/ol/interaction/Modify.d.ts +++ b/@types/ol/interaction/Modify.d.ts @@ -1,17 +1,18 @@ -import Collection from 'ol/Collection'; -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import { Condition } from 'ol/events/condition'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import Feature from 'ol/Feature'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import PointerInteraction from 'ol/interaction/Pointer'; -import VectorLayer from 'ol/layer/Vector'; -import MapBrowserEvent from 'ol/MapBrowserEvent'; -import { ObjectEvent } from 'ol/Object'; -import VectorSource from 'ol/source/Vector'; -import { StyleFunction, StyleLike } from 'ol/style/Style'; +import Collection from '../Collection'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import { Condition } from '../events/condition'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import Feature from '../Feature'; +import SimpleGeometry from '../geom/SimpleGeometry'; +import VectorLayer from '../layer/Vector'; +import MapBrowserEvent from '../MapBrowserEvent'; +import { ObjectEvent } from '../Object'; +import VectorSource from '../source/Vector'; +import { StyleFunction, StyleLike } from '../style/Style'; +import PointerInteraction from './Pointer'; + export class ModifyEvent extends Event { constructor(); features: Collection; diff --git a/@types/ol/interaction/MouseWheelZoom.d.ts b/@types/ol/interaction/MouseWheelZoom.d.ts index 8e60079c..e492aade 100644 --- a/@types/ol/interaction/MouseWheelZoom.d.ts +++ b/@types/ol/interaction/MouseWheelZoom.d.ts @@ -1,8 +1,9 @@ -import { EventsKey } from 'ol/events'; -import { Condition } from 'ol/events/condition'; -import Event from 'ol/events/Event'; -import Interaction from 'ol/interaction/Interaction'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import { Condition } from '../events/condition'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import Interaction from './Interaction'; + export enum Mode { TRACKPAD = 'trackpad', WHEEL = 'wheel', diff --git a/@types/ol/interaction/PinchRotate.d.ts b/@types/ol/interaction/PinchRotate.d.ts index ecfc4f35..77d6a0e9 100644 --- a/@types/ol/interaction/PinchRotate.d.ts +++ b/@types/ol/interaction/PinchRotate.d.ts @@ -1,7 +1,8 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import PointerInteraction from 'ol/interaction/Pointer'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import PointerInteraction from './Pointer'; + export interface Options { duration?: number; threshold?: number; diff --git a/@types/ol/interaction/PinchZoom.d.ts b/@types/ol/interaction/PinchZoom.d.ts index c8c92b11..fdc625b0 100644 --- a/@types/ol/interaction/PinchZoom.d.ts +++ b/@types/ol/interaction/PinchZoom.d.ts @@ -1,7 +1,8 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import PointerInteraction from 'ol/interaction/Pointer'; -import { ObjectEvent } from 'ol/Object'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import PointerInteraction from './Pointer'; + export interface Options { duration?: number; constrainResolution?: boolean; diff --git a/@types/ol/interaction/Pointer.d.ts b/@types/ol/interaction/Pointer.d.ts index 67febbd8..4a6b6e7d 100644 --- a/@types/ol/interaction/Pointer.d.ts +++ b/@types/ol/interaction/Pointer.d.ts @@ -1,11 +1,12 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Interaction from 'ol/interaction/Interaction'; -import MapBrowserEvent from 'ol/MapBrowserEvent'; -import MapBrowserPointerEvent from 'ol/MapBrowserPointerEvent'; -import { ObjectEvent } from 'ol/Object'; -import { Pixel } from 'ol/pixel'; -import PointerEvent from 'ol/pointer/PointerEvent'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import MapBrowserEvent from '../MapBrowserEvent'; +import MapBrowserPointerEvent from '../MapBrowserPointerEvent'; +import { ObjectEvent } from '../Object'; +import { Pixel } from '../pixel'; +import PointerEvent from '../pointer/PointerEvent'; +import Interaction from './Interaction'; + export function centroid(pointerEvents: PointerEvent[]): Pixel; export interface Options { handleDownEvent?: ((param0: MapBrowserPointerEvent) => boolean); diff --git a/@types/ol/interaction/Select.d.ts b/@types/ol/interaction/Select.d.ts index d051bf0a..f0af019e 100644 --- a/@types/ol/interaction/Select.d.ts +++ b/@types/ol/interaction/Select.d.ts @@ -1,14 +1,15 @@ -import Collection from 'ol/Collection'; -import { EventsKey } from 'ol/events'; -import { Condition } from 'ol/events/condition'; -import Event from 'ol/events/Event'; -import Feature, { FeatureLike } from 'ol/Feature'; -import Interaction from 'ol/interaction/Interaction'; -import Layer from 'ol/layer/Layer'; -import VectorLayer from 'ol/layer/Vector'; -import MapBrowserEvent from 'ol/MapBrowserEvent'; -import { ObjectEvent } from 'ol/Object'; -import { StyleFunction, StyleLike } from 'ol/style/Style'; +import Collection from '../Collection'; +import { EventsKey } from '../events'; +import { Condition } from '../events/condition'; +import Event from '../events/Event'; +import Feature, { FeatureLike } from '../Feature'; +import Layer from '../layer/Layer'; +import VectorLayer from '../layer/Vector'; +import MapBrowserEvent from '../MapBrowserEvent'; +import { ObjectEvent } from '../Object'; +import { StyleFunction, StyleLike } from '../style/Style'; +import Interaction from './Interaction'; + export type FilterFunction = ((param0: FeatureLike, param1: Layer) => boolean); export interface Options { addCondition?: Condition; diff --git a/@types/ol/interaction/Snap.d.ts b/@types/ol/interaction/Snap.d.ts index 4950233b..e834b9cc 100644 --- a/@types/ol/interaction/Snap.d.ts +++ b/@types/ol/interaction/Snap.d.ts @@ -1,13 +1,14 @@ -import Collection, { CollectionEvent } from 'ol/Collection'; -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Feature from 'ol/Feature'; -import PointerInteraction from 'ol/interaction/Pointer'; -import { ObjectEvent } from 'ol/Object'; -import { Pixel } from 'ol/pixel'; -import PluggableMap from 'ol/PluggableMap'; -import VectorSource, { VectorSourceEvent } from 'ol/source/Vector'; +import Collection, { CollectionEvent } from '../Collection'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import Feature from '../Feature'; +import { ObjectEvent } from '../Object'; +import { Pixel } from '../pixel'; +import PluggableMap from '../PluggableMap'; +import VectorSource, { VectorSourceEvent } from '../source/Vector'; +import PointerInteraction from './Pointer'; + export interface Options { features?: Collection; edge?: boolean; diff --git a/@types/ol/interaction/Translate.d.ts b/@types/ol/interaction/Translate.d.ts index cfdf426d..bd7693c7 100644 --- a/@types/ol/interaction/Translate.d.ts +++ b/@types/ol/interaction/Translate.d.ts @@ -1,11 +1,12 @@ -import Collection from 'ol/Collection'; -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Feature from 'ol/Feature'; -import PointerInteraction from 'ol/interaction/Pointer'; -import Layer from 'ol/layer/Layer'; -import { ObjectEvent } from 'ol/Object'; +import Collection from '../Collection'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import Feature from '../Feature'; +import Layer from '../layer/Layer'; +import { ObjectEvent } from '../Object'; +import PointerInteraction from './Pointer'; + export class TranslateEvent extends Event { constructor(); features: Collection; diff --git a/@types/ol/interaction/index.d.ts b/@types/ol/interaction/index.d.ts deleted file mode 100644 index cca93d59..00000000 --- a/@types/ol/interaction/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import Collection from 'ol/Collection'; -import Interaction from 'ol/interaction/Interaction'; -export { default as DoubleClickZoom } from 'ol/interaction/DoubleClickZoom'; -export { default as DragAndDrop } from 'ol/interaction/DragAndDrop'; -export { default as DragBox } from 'ol/interaction/DragBox'; -export { default as DragPan } from 'ol/interaction/DragPan'; -export { default as DragRotate } from 'ol/interaction/DragRotate'; -export { default as DragRotateAndZoom } from 'ol/interaction/DragRotateAndZoom'; -export { default as DragZoom } from 'ol/interaction/DragZoom'; -export { default as Draw } from 'ol/interaction/Draw'; -export { default as Extent } from 'ol/interaction/Extent'; -export { default as Interaction } from 'ol/interaction/Interaction'; -export { default as KeyboardPan } from 'ol/interaction/KeyboardPan'; -export { default as KeyboardZoom } from 'ol/interaction/KeyboardZoom'; -export { default as Modify } from 'ol/interaction/Modify'; -export { default as MouseWheelZoom } from 'ol/interaction/MouseWheelZoom'; -export { default as PinchRotate } from 'ol/interaction/PinchRotate'; -export { default as PinchZoom } from 'ol/interaction/PinchZoom'; -export { default as Pointer } from 'ol/interaction/Pointer'; -export { default as Select } from 'ol/interaction/Select'; -export { default as Snap } from 'ol/interaction/Snap'; -export { default as Translate } from 'ol/interaction/Translate'; -export function defaults(opt_options?: DefaultsOptions): Collection; -export interface DefaultsOptions { - altShiftDragRotate?: boolean; - onFocusOnly?: boolean; - constrainResolution?: boolean; - doubleClickZoom?: boolean; - keyboard?: boolean; - mouseWheelZoom?: boolean; - shiftDragZoom?: boolean; - dragPan?: boolean; - pinchRotate?: boolean; - pinchZoom?: boolean; - zoomDelta?: number; - zoomDuration?: number; -} diff --git a/@types/ol/layer.d.ts b/@types/ol/layer.d.ts new file mode 100644 index 00000000..6011b895 --- /dev/null +++ b/@types/ol/layer.d.ts @@ -0,0 +1,7 @@ +export { default as Group } from './layer/Group'; +export { default as Heatmap } from './layer/Heatmap'; +export { default as Image } from './layer/Image'; +export { default as Layer } from './layer/Layer'; +export { default as Tile } from './layer/Tile'; +export { default as Vector } from './layer/Vector'; +export { default as VectorTile } from './layer/VectorTile'; diff --git a/@types/ol/layer/Base.d.ts b/@types/ol/layer/Base.d.ts index 5ceb7ed7..30bcfa3b 100644 --- a/@types/ol/layer/Base.d.ts +++ b/@types/ol/layer/Base.d.ts @@ -1,10 +1,11 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import Layer, { State } from 'ol/layer/Layer'; -import LayerType from 'ol/LayerType'; -import BaseObject, { ObjectEvent } from 'ol/Object'; -import State_1 from 'ol/source/State'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import LayerType from '../LayerType'; +import BaseObject, { ObjectEvent } from '../Object'; +import State_1 from '../source/State'; +import Layer, { State } from './Layer'; + export default class BaseLayer extends BaseObject { constructor(options: Options); getType(): LayerType; diff --git a/@types/ol/layer/Group.d.ts b/@types/ol/layer/Group.d.ts index 40f4fddd..dc2157cf 100644 --- a/@types/ol/layer/Group.d.ts +++ b/@types/ol/layer/Group.d.ts @@ -1,9 +1,10 @@ -import Collection from 'ol/Collection'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import BaseLayer from 'ol/layer/Base'; -import { ObjectEvent } from 'ol/Object'; +import Collection from '../Collection'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import { ObjectEvent } from '../Object'; +import BaseLayer from './Base'; + export default class LayerGroup extends BaseLayer { constructor(opt_options?: Options); getLayers(): Collection; diff --git a/@types/ol/layer/Heatmap.d.ts b/@types/ol/layer/Heatmap.d.ts index d3001fa6..a2aa502e 100644 --- a/@types/ol/layer/Heatmap.d.ts +++ b/@types/ol/layer/Heatmap.d.ts @@ -1,12 +1,13 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import Feature from 'ol/Feature'; -import VectorLayer from 'ol/layer/Vector'; -import VectorRenderType from 'ol/layer/VectorRenderType'; -import { ObjectEvent } from 'ol/Object'; -import RenderEvent from 'ol/render/Event'; -import VectorSource from 'ol/source/Vector'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import Feature from '../Feature'; +import { ObjectEvent } from '../Object'; +import RenderEvent from '../render/Event'; +import VectorSource from '../source/Vector'; +import VectorLayer from './Vector'; +import VectorRenderType from './VectorRenderType'; + export default class Heatmap extends VectorLayer { constructor(opt_options?: Options); getBlur(): number; diff --git a/@types/ol/layer/Image.d.ts b/@types/ol/layer/Image.d.ts index c6e6cc44..c38287ad 100644 --- a/@types/ol/layer/Image.d.ts +++ b/@types/ol/layer/Image.d.ts @@ -1,13 +1,14 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import Layer from 'ol/layer/Layer'; -import LayerType from 'ol/LayerType'; -import { ObjectEvent } from 'ol/Object'; -import PluggableMap from 'ol/PluggableMap'; -import RenderEvent from 'ol/render/Event'; -import ImageSource from 'ol/source/Image'; -import Source from 'ol/source/Source'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import LayerType from '../LayerType'; +import { ObjectEvent } from '../Object'; +import PluggableMap from '../PluggableMap'; +import RenderEvent from '../render/Event'; +import ImageSource from '../source/Image'; +import Source from '../source/Source'; +import Layer from './Layer'; + export default class ImageLayer extends Layer { constructor(opt_options?: Options); protected type: LayerType; diff --git a/@types/ol/layer/Layer.d.ts b/@types/ol/layer/Layer.d.ts index f8167e37..3e276742 100644 --- a/@types/ol/layer/Layer.d.ts +++ b/@types/ol/layer/Layer.d.ts @@ -1,12 +1,13 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import BaseLayer from 'ol/layer/Base'; -import { ObjectEvent } from 'ol/Object'; -import PluggableMap from 'ol/PluggableMap'; -import RenderEvent from 'ol/render/Event'; -import Source from 'ol/source/Source'; -import State_1 from 'ol/source/State'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import { ObjectEvent } from '../Object'; +import PluggableMap from '../PluggableMap'; +import RenderEvent from '../render/Event'; +import Source from '../source/Source'; +import State_1 from '../source/State'; +import BaseLayer from './Base'; + export function visibleAtResolution(layerState: State, resolution: number): boolean; export default class Layer extends BaseLayer { constructor(options: Options); diff --git a/@types/ol/layer/Tile.d.ts b/@types/ol/layer/Tile.d.ts index d2212f4c..6988830c 100644 --- a/@types/ol/layer/Tile.d.ts +++ b/@types/ol/layer/Tile.d.ts @@ -1,13 +1,14 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import Layer from 'ol/layer/Layer'; -import LayerType from 'ol/LayerType'; -import { ObjectEvent } from 'ol/Object'; -import PluggableMap from 'ol/PluggableMap'; -import RenderEvent from 'ol/render/Event'; -import Source from 'ol/source/Source'; -import TileSource from 'ol/source/Tile'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import LayerType from '../LayerType'; +import { ObjectEvent } from '../Object'; +import PluggableMap from '../PluggableMap'; +import RenderEvent from '../render/Event'; +import Source from '../source/Source'; +import TileSource from '../source/Tile'; +import Layer from './Layer'; + export interface Options { opacity?: number; visible?: boolean; diff --git a/@types/ol/layer/Vector.d.ts b/@types/ol/layer/Vector.d.ts index 44a16d3f..be6c68ba 100644 --- a/@types/ol/layer/Vector.d.ts +++ b/@types/ol/layer/Vector.d.ts @@ -1,17 +1,18 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import Feature from 'ol/Feature'; -import Layer from 'ol/layer/Layer'; -import VectorRenderType from 'ol/layer/VectorRenderType'; -import LayerType from 'ol/LayerType'; -import { ObjectEvent } from 'ol/Object'; -import PluggableMap from 'ol/PluggableMap'; -import { OrderFunction } from 'ol/render'; -import RenderEvent from 'ol/render/Event'; -import Source from 'ol/source/Source'; -import VectorSource from 'ol/source/Vector'; -import Style, { StyleLike, StyleFunction } from 'ol/style/Style'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import Feature from '../Feature'; +import LayerType from '../LayerType'; +import { ObjectEvent } from '../Object'; +import PluggableMap from '../PluggableMap'; +import { OrderFunction } from '../render'; +import RenderEvent from '../render/Event'; +import Source from '../source/Source'; +import VectorSource from '../source/Vector'; +import Style, { StyleLike, StyleFunction } from '../style/Style'; +import Layer from './Layer'; +import VectorRenderType from './VectorRenderType'; + export interface Options { opacity?: number; visible?: boolean; diff --git a/@types/ol/layer/VectorTile.d.ts b/@types/ol/layer/VectorTile.d.ts index 655895cd..8473c97a 100644 --- a/@types/ol/layer/VectorTile.d.ts +++ b/@types/ol/layer/VectorTile.d.ts @@ -1,16 +1,17 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import VectorLayer from 'ol/layer/Vector'; -import VectorTileRenderType from 'ol/layer/VectorTileRenderType'; -import LayerType from 'ol/LayerType'; -import { ObjectEvent } from 'ol/Object'; -import PluggableMap from 'ol/PluggableMap'; -import { OrderFunction } from 'ol/render'; -import RenderEvent from 'ol/render/Event'; -import VectorSource from 'ol/source/Vector'; -import VectorTile from 'ol/source/VectorTile'; -import { StyleLike } from 'ol/style/Style'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import LayerType from '../LayerType'; +import { ObjectEvent } from '../Object'; +import PluggableMap from '../PluggableMap'; +import { OrderFunction } from '../render'; +import RenderEvent from '../render/Event'; +import VectorSource from '../source/Vector'; +import VectorTile from '../source/VectorTile'; +import { StyleLike } from '../style/Style'; +import VectorLayer from './Vector'; +import VectorTileRenderType from './VectorTileRenderType'; + export interface Options { opacity?: number; visible?: boolean; diff --git a/@types/ol/layer/index.d.ts b/@types/ol/layer/index.d.ts deleted file mode 100644 index 7d1a01a3..00000000 --- a/@types/ol/layer/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { default as Group } from 'ol/layer/Group'; -export { default as Heatmap } from 'ol/layer/Heatmap'; -export { default as Image } from 'ol/layer/Image'; -export { default as Layer } from 'ol/layer/Layer'; -export { default as Tile } from 'ol/layer/Tile'; -export { default as Vector } from 'ol/layer/Vector'; -export { default as VectorTile } from 'ol/layer/VectorTile'; diff --git a/@types/ol/loadingstrategy.d.ts b/@types/ol/loadingstrategy.d.ts index f5b01c51..1add3eb8 100644 --- a/@types/ol/loadingstrategy.d.ts +++ b/@types/ol/loadingstrategy.d.ts @@ -1,5 +1,6 @@ -import { Extent } from 'ol/extent'; -import TileGrid from 'ol/tilegrid/TileGrid'; +import { Extent } from './extent'; +import TileGrid from './tilegrid/TileGrid'; + export function all(extent: Extent, resolution: number): Extent[]; export function bbox(extent: Extent, resolution: number): Extent[]; export function tile(tileGrid: TileGrid): ((param0: Extent, param1: number) => Extent[]); diff --git a/@types/ol/obj.d.ts b/@types/ol/obj.d.ts index 2dc25199..21d96c35 100644 --- a/@types/ol/obj.d.ts +++ b/@types/ol/obj.d.ts @@ -1,4 +1,4 @@ -export function clear(object: { [key: string]: any }): void; +export function clear(object: any): void; export function getValues(obj: { [key: string]: V }): V[]; export function getValues(obj: { [key: number]: V }): V[]; -export function isEmpty(object: { [key: string]: any }): boolean; +export function isEmpty(object: any): boolean; diff --git a/@types/ol/pointer/EventSource.d.ts b/@types/ol/pointer/EventSource.d.ts index 90aed376..a4a3aa2d 100644 --- a/@types/ol/pointer/EventSource.d.ts +++ b/@types/ol/pointer/EventSource.d.ts @@ -1,4 +1,5 @@ -import PointerEventHandler from 'ol/pointer/PointerEventHandler'; +import PointerEventHandler from './PointerEventHandler'; + export default class EventSource { constructor(dispatcher: PointerEventHandler, mapping: { [key: string]: any }); getEvents(): string[]; diff --git a/@types/ol/pointer/MouseSource.d.ts b/@types/ol/pointer/MouseSource.d.ts index 633d84d6..f0495b74 100644 --- a/@types/ol/pointer/MouseSource.d.ts +++ b/@types/ol/pointer/MouseSource.d.ts @@ -1,6 +1,7 @@ -import EventSource from 'ol/pointer/EventSource'; -import PointerEventHandler from 'ol/pointer/PointerEventHandler'; -export function prepareEvent(inEvent: Event, dispatcher: PointerEventHandler): { [key: string]: any }; +import EventSource from './EventSource'; +import PointerEventHandler from './PointerEventHandler'; + +export function prepareEvent(inEvent: Event, dispatcher: PointerEventHandler): any; export default class MouseSource extends EventSource { constructor(dispatcher: PointerEventHandler); cancel(inEvent: Event): void; diff --git a/@types/ol/pointer/MsSource.d.ts b/@types/ol/pointer/MsSource.d.ts index 915b871c..51c06b03 100644 --- a/@types/ol/pointer/MsSource.d.ts +++ b/@types/ol/pointer/MsSource.d.ts @@ -1,5 +1,6 @@ -import EventSource from 'ol/pointer/EventSource'; -import PointerEventHandler from 'ol/pointer/PointerEventHandler'; +import EventSource from './EventSource'; +import PointerEventHandler from './PointerEventHandler'; + export default class MsSource extends EventSource { constructor(dispatcher: PointerEventHandler); cleanup(pointerId: number): void; diff --git a/@types/ol/pointer/NativeSource.d.ts b/@types/ol/pointer/NativeSource.d.ts index fc2aa4ba..cf05059e 100644 --- a/@types/ol/pointer/NativeSource.d.ts +++ b/@types/ol/pointer/NativeSource.d.ts @@ -1,5 +1,6 @@ -import EventSource from 'ol/pointer/EventSource'; -import PointerEventHandler from 'ol/pointer/PointerEventHandler'; +import EventSource from './EventSource'; +import PointerEventHandler from './PointerEventHandler'; + export default class NativeSource extends EventSource { constructor(dispatcher: PointerEventHandler); } diff --git a/@types/ol/pointer/PointerEvent.d.ts b/@types/ol/pointer/PointerEvent.d.ts index b5891677..a9908a47 100644 --- a/@types/ol/pointer/PointerEvent.d.ts +++ b/@types/ol/pointer/PointerEvent.d.ts @@ -1,4 +1,5 @@ -import Event from 'ol/events/Event'; +import Event from '../events/Event'; + export default class PointerEvent extends Event { constructor(type: string, originalEvent: Event, opt_eventDict?: { [key: string]: any }); } diff --git a/@types/ol/pointer/PointerEventHandler.d.ts b/@types/ol/pointer/PointerEventHandler.d.ts index be6b019b..edf442d4 100644 --- a/@types/ol/pointer/PointerEventHandler.d.ts +++ b/@types/ol/pointer/PointerEventHandler.d.ts @@ -1,23 +1,24 @@ -import Target from 'ol/events/Target'; -import EventSource from 'ol/pointer/EventSource'; -import PointerEvent from 'ol/pointer/PointerEvent'; +import Target from '../events/Target'; +import EventSource from './EventSource'; +import PointerEvent from './PointerEvent'; + export default class PointerEventHandler extends Target { constructor(element: Element | HTMLDocument); - leaveOut(data: { [key: string]: any }, event: Event): void; - cancel(data: { [key: string]: any }, event: Event): void; - down(data: { [key: string]: any }, event: Event): void; - enter(data: { [key: string]: any }, event: Event): void; - enterOver(data: { [key: string]: any }, event: Event): void; - fireEvent(inType: string, data: { [key: string]: any }, event: Event): void; + leaveOut(data: any, event: Event): void; + cancel(data: any, event: Event): void; + down(data: any, event: Event): void; + enter(data: any, event: Event): void; + enterOver(data: any, event: Event): void; + fireEvent(inType: string, data: any, event: Event): void; fireNativeEvent(event: Event): void; - leave(data: { [key: string]: any }, event: Event): void; - cloneEvent(event: Event, inEvent: Event | Touch): { [key: string]: any }; - makeEvent(inType: string, data: { [key: string]: any }, event: Event): PointerEvent; - move(data: { [key: string]: any }, event: Event): void; - out(data: { [key: string]: any }, event: Event): void; - over(data: { [key: string]: any }, event: Event): void; + leave(data: any, event: Event): void; + cloneEvent(event: Event, inEvent: Event | Touch): any; + makeEvent(inType: string, data: any, event: Event): PointerEvent; + move(data: any, event: Event): void; + out(data: any, event: Event): void; + over(data: any, event: Event): void; registerSource(name: string, source: EventSource): void; registerSources(): void; - up(data: { [key: string]: any }, event: Event): void; + up(data: any, event: Event): void; wrapMouseEvent(eventType: string, event: Event): PointerEvent; } diff --git a/@types/ol/pointer/TouchSource.d.ts b/@types/ol/pointer/TouchSource.d.ts index 19a16819..69439a10 100644 --- a/@types/ol/pointer/TouchSource.d.ts +++ b/@types/ol/pointer/TouchSource.d.ts @@ -1,6 +1,7 @@ -import EventSource from 'ol/pointer/EventSource'; -import MouseSource from 'ol/pointer/MouseSource'; -import PointerEventHandler from 'ol/pointer/PointerEventHandler'; +import EventSource from './EventSource'; +import MouseSource from './MouseSource'; +import PointerEventHandler from './PointerEventHandler'; + export default class TouchSource extends EventSource { constructor(dispatcher: PointerEventHandler, mouseSource: MouseSource); } diff --git a/@types/ol/proj/index.d.ts b/@types/ol/proj.d.ts similarity index 93% rename from @types/ol/proj/index.d.ts rename to @types/ol/proj.d.ts index c323fb8c..0f390a5d 100644 --- a/@types/ol/proj/index.d.ts +++ b/@types/ol/proj.d.ts @@ -1,7 +1,8 @@ -import { Coordinate } from 'ol/coordinate'; -import { Extent } from 'ol/extent'; -import Projection from 'ol/proj/Projection'; -import Units from 'ol/proj/Units'; +import { Coordinate } from './coordinate'; +import { Extent } from './extent'; +import Projection from './proj/Projection'; +import Units from './proj/Units'; + export function addCommon(): void; export function addCoordinateTransforms(source: ProjectionLike, destination: ProjectionLike, forward: ((param0: Coordinate) => Coordinate), inverse: ((param0: Coordinate) => Coordinate)): void; export function addEquivalentProjections(projections: Projection[]): void; diff --git a/@types/ol/proj/Projection.d.ts b/@types/ol/proj/Projection.d.ts index 248842f7..246d9250 100644 --- a/@types/ol/proj/Projection.d.ts +++ b/@types/ol/proj/Projection.d.ts @@ -1,7 +1,8 @@ -import { Coordinate } from 'ol/coordinate'; -import { Extent } from 'ol/extent'; -import Units from 'ol/proj/Units'; -import TileGrid from 'ol/tilegrid/TileGrid'; +import { Coordinate } from '../coordinate'; +import { Extent } from '../extent'; +import TileGrid from '../tilegrid/TileGrid'; +import Units from './Units'; + export interface Options { code: string; units?: Units | string; diff --git a/@types/ol/proj/epsg3857.d.ts b/@types/ol/proj/epsg3857.d.ts index fcc852d4..d21835bb 100644 --- a/@types/ol/proj/epsg3857.d.ts +++ b/@types/ol/proj/epsg3857.d.ts @@ -1,3 +1,4 @@ -import Projection from 'ol/proj/Projection'; +import Projection from './Projection'; + export function fromEPSG4326(input: number[], opt_output?: number[], opt_dimension?: number): number[]; export function toEPSG4326(input: number[], opt_output?: number[], opt_dimension?: number): number[]; diff --git a/@types/ol/proj/epsg4326.d.ts b/@types/ol/proj/epsg4326.d.ts index ca9a8381..0dbe7cc9 100644 --- a/@types/ol/proj/epsg4326.d.ts +++ b/@types/ol/proj/epsg4326.d.ts @@ -1 +1 @@ -import Projection from 'ol/proj/Projection'; +import Projection from './Projection'; diff --git a/@types/ol/proj/projections.d.ts b/@types/ol/proj/projections.d.ts index 5c518854..8feca519 100644 --- a/@types/ol/proj/projections.d.ts +++ b/@types/ol/proj/projections.d.ts @@ -1,4 +1,5 @@ -import Projection from 'ol/proj/Projection'; +import Projection from './Projection'; + export function add(code: string, projection: Projection): void; export function clear(): void; export function get(code: string): Projection; diff --git a/@types/ol/proj/transforms.d.ts b/@types/ol/proj/transforms.d.ts index bbc7aa52..722b10a6 100644 --- a/@types/ol/proj/transforms.d.ts +++ b/@types/ol/proj/transforms.d.ts @@ -1,5 +1,6 @@ -import { TransformFunction } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; +import { TransformFunction } from '../proj'; +import Projection from './Projection'; + export function add(source: Projection, destination: Projection, transformFn: TransformFunction): void; export function clear(): void; export function get(sourceCode: string, destinationCode: string): TransformFunction; diff --git a/@types/ol/render/index.d.ts b/@types/ol/render.d.ts similarity index 71% rename from @types/ol/render/index.d.ts rename to @types/ol/render.d.ts index ed7f2a31..2f162bf3 100644 --- a/@types/ol/render/index.d.ts +++ b/@types/ol/render.d.ts @@ -1,7 +1,8 @@ -import { FeatureLike } from 'ol/Feature'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import CanvasImmediateRenderer from 'ol/render/canvas/Immediate'; -import { Size } from 'ol/size'; +import { FeatureLike } from './Feature'; +import SimpleGeometry from './geom/SimpleGeometry'; +import CanvasImmediateRenderer from './render/canvas/Immediate'; +import { Size } from './size'; + export function toContext(context: CanvasRenderingContext2D, opt_options?: ToContextOptions): CanvasImmediateRenderer; export type OrderFunction = ((param0: FeatureLike, param1: FeatureLike) => number); export interface State { diff --git a/@types/ol/render/Box.d.ts b/@types/ol/render/Box.d.ts index f14e2d57..37a271d8 100644 --- a/@types/ol/render/Box.d.ts +++ b/@types/ol/render/Box.d.ts @@ -1,7 +1,8 @@ -import Disposable from 'ol/Disposable'; -import Polygon from 'ol/geom/Polygon'; -import { Pixel } from 'ol/pixel'; -import PluggableMap from 'ol/PluggableMap'; +import Disposable from '../Disposable'; +import Polygon from '../geom/Polygon'; +import { Pixel } from '../pixel'; +import PluggableMap from '../PluggableMap'; + export default class RenderBox extends Disposable { constructor(className: string); createOrUpdateGeometry(): void; diff --git a/@types/ol/render/Event.d.ts b/@types/ol/render/Event.d.ts index bc0e4788..24b75a2c 100644 --- a/@types/ol/render/Event.d.ts +++ b/@types/ol/render/Event.d.ts @@ -1,8 +1,9 @@ -import Event from 'ol/events/Event'; -import { FrameState } from 'ol/PluggableMap'; -import EventType from 'ol/render/EventType'; -import VectorContext from 'ol/render/VectorContext'; -import WebGLContext from 'ol/webgl/Context'; +import Event from '../events/Event'; +import { FrameState } from '../PluggableMap'; +import WebGLContext from '../webgl/Context'; +import EventType from './EventType'; +import VectorContext from './VectorContext'; + export default class RenderEvent extends Event { constructor(type: EventType, opt_vectorContext?: VectorContext, opt_frameState?: FrameState, opt_context?: CanvasRenderingContext2D, opt_glContext?: WebGLContext); context: CanvasRenderingContext2D; diff --git a/@types/ol/render/Feature.d.ts b/@types/ol/render/Feature.d.ts index db215a30..cc8009e9 100644 --- a/@types/ol/render/Feature.d.ts +++ b/@types/ol/render/Feature.d.ts @@ -1,6 +1,7 @@ -import { Extent } from 'ol/extent'; -import GeometryType from 'ol/geom/GeometryType'; -import { ProjectionLike } from 'ol/proj'; +import { Extent } from '../extent'; +import GeometryType from '../geom/GeometryType'; +import { ProjectionLike } from '../proj'; + export default class RenderFeature { constructor(type: GeometryType, flatCoordinates: number[], ends: number[] | number[][], properties: { [key: string]: any }, id: number | string); getId(): number | string; diff --git a/@types/ol/render/ReplayGroup.d.ts b/@types/ol/render/ReplayGroup.d.ts index bed550a7..5a384fd6 100644 --- a/@types/ol/render/ReplayGroup.d.ts +++ b/@types/ol/render/ReplayGroup.d.ts @@ -1,5 +1,6 @@ -import ReplayType from 'ol/render/ReplayType'; -import VectorContext from 'ol/render/VectorContext'; +import ReplayType from './ReplayType'; +import VectorContext from './VectorContext'; + export default class ReplayGroup { constructor(); addDeclutter(group: boolean): any[]; diff --git a/@types/ol/render/VectorContext.d.ts b/@types/ol/render/VectorContext.d.ts index 82205c42..c73d1a29 100644 --- a/@types/ol/render/VectorContext.d.ts +++ b/@types/ol/render/VectorContext.d.ts @@ -1,21 +1,22 @@ -import Feature from 'ol/Feature'; -import Circle from 'ol/geom/Circle'; -import Geometry from 'ol/geom/Geometry'; -import GeometryCollection from 'ol/geom/GeometryCollection'; -import LineString from 'ol/geom/LineString'; -import MultiLineString from 'ol/geom/MultiLineString'; -import MultiPoint from 'ol/geom/MultiPoint'; -import MultiPolygon from 'ol/geom/MultiPolygon'; -import Point from 'ol/geom/Point'; -import Polygon from 'ol/geom/Polygon'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import { DeclutterGroup } from 'ol/render/canvas'; -import RenderFeature from 'ol/render/Feature'; -import Fill from 'ol/style/Fill'; -import ImageStyle from 'ol/style/Image'; -import Stroke from 'ol/style/Stroke'; -import Style from 'ol/style/Style'; -import Text from 'ol/style/Text'; +import Feature from '../Feature'; +import Circle from '../geom/Circle'; +import Geometry from '../geom/Geometry'; +import GeometryCollection from '../geom/GeometryCollection'; +import LineString from '../geom/LineString'; +import MultiLineString from '../geom/MultiLineString'; +import MultiPoint from '../geom/MultiPoint'; +import MultiPolygon from '../geom/MultiPolygon'; +import Point from '../geom/Point'; +import Polygon from '../geom/Polygon'; +import SimpleGeometry from '../geom/SimpleGeometry'; +import Fill from '../style/Fill'; +import ImageStyle from '../style/Image'; +import Stroke from '../style/Stroke'; +import Style from '../style/Style'; +import Text from '../style/Text'; +import { DeclutterGroup } from './canvas'; +import RenderFeature from './Feature'; + export default class VectorContext { constructor(); drawMultiPolygon(multiPolygonGeometry: MultiPolygon, feature: Feature | RenderFeature): void; diff --git a/@types/ol/render/canvas/index.d.ts b/@types/ol/render/canvas.d.ts similarity index 88% rename from @types/ol/render/canvas/index.d.ts rename to @types/ol/render/canvas.d.ts index 09c7e232..9f7d4331 100644 --- a/@types/ol/render/canvas/index.d.ts +++ b/@types/ol/render/canvas.d.ts @@ -1,8 +1,9 @@ -import { ColorLike } from 'ol/colorlike'; -import LRUCache from 'ol/structs/LRUCache'; -import Fill from 'ol/style/Fill'; -import Stroke from 'ol/style/Stroke'; -import { Transform } from 'ol/transform'; +import { ColorLike } from '../colorlike'; +import LRUCache from '../structs/LRUCache'; +import Fill from '../style/Fill'; +import Stroke from '../style/Stroke'; +import { Transform } from '../transform'; + export function drawImage(context: CanvasRenderingContext2D, transform: Transform, opacity: number, image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, originX: number, originY: number, w: number, h: number, x: number, y: number, scale: number): void; export function measureTextWidth(font: string, text: string): number; export function rotateAtOffset(context: CanvasRenderingContext2D, rotation: number, offsetX: number, offsetY: number): void; diff --git a/@types/ol/render/canvas/ImageReplay.d.ts b/@types/ol/render/canvas/ImageReplay.d.ts index 45fbf8cc..a9226814 100644 --- a/@types/ol/render/canvas/ImageReplay.d.ts +++ b/@types/ol/render/canvas/ImageReplay.d.ts @@ -1,5 +1,6 @@ -import { Extent } from 'ol/extent'; -import CanvasReplay from 'ol/render/canvas/Replay'; +import { Extent } from '../../extent'; +import CanvasReplay from './Replay'; + export default class CanvasImageReplay extends CanvasReplay { constructor(tolerance: number, maxExtent: Extent, resolution: number, pixelRatio: number, overlaps: boolean, declutterTree: any); } diff --git a/@types/ol/render/canvas/Immediate.d.ts b/@types/ol/render/canvas/Immediate.d.ts index 0b19c9de..9be5f14b 100644 --- a/@types/ol/render/canvas/Immediate.d.ts +++ b/@types/ol/render/canvas/Immediate.d.ts @@ -1,6 +1,7 @@ -import { Extent } from 'ol/extent'; -import VectorContext from 'ol/render/VectorContext'; -import { Transform } from 'ol/transform'; +import { Extent } from '../../extent'; +import { Transform } from '../../transform'; +import VectorContext from '../VectorContext'; + export default class CanvasImmediateRenderer extends VectorContext { constructor(context: CanvasRenderingContext2D, pixelRatio: number, extent: Extent, transform: Transform, viewRotation: number); } diff --git a/@types/ol/render/canvas/LineStringReplay.d.ts b/@types/ol/render/canvas/LineStringReplay.d.ts index e400f579..adb3a731 100644 --- a/@types/ol/render/canvas/LineStringReplay.d.ts +++ b/@types/ol/render/canvas/LineStringReplay.d.ts @@ -1,6 +1,7 @@ -import { Extent } from 'ol/extent'; -import { FillStrokeState } from 'ol/render/canvas'; -import CanvasReplay from 'ol/render/canvas/Replay'; +import { Extent } from '../../extent'; +import { FillStrokeState } from '../canvas'; +import CanvasReplay from './Replay'; + export default class CanvasLineStringReplay extends CanvasReplay { constructor(tolerance: number, maxExtent: Extent, resolution: number, pixelRatio: number, overlaps: boolean, declutterTree: any); applyStroke(): void; diff --git a/@types/ol/render/canvas/PolygonReplay.d.ts b/@types/ol/render/canvas/PolygonReplay.d.ts index c0421269..858f31f0 100644 --- a/@types/ol/render/canvas/PolygonReplay.d.ts +++ b/@types/ol/render/canvas/PolygonReplay.d.ts @@ -1,5 +1,6 @@ -import { Extent } from 'ol/extent'; -import CanvasReplay from 'ol/render/canvas/Replay'; +import { Extent } from '../../extent'; +import CanvasReplay from './Replay'; + export default class CanvasPolygonReplay extends CanvasReplay { constructor(tolerance: number, maxExtent: Extent, resolution: number, pixelRatio: number, overlaps: boolean, declutterTree: any); } diff --git a/@types/ol/render/canvas/Replay.d.ts b/@types/ol/render/canvas/Replay.d.ts index e855b720..12b61242 100644 --- a/@types/ol/render/canvas/Replay.d.ts +++ b/@types/ol/render/canvas/Replay.d.ts @@ -1,12 +1,13 @@ -import { Coordinate } from 'ol/coordinate'; -import { Extent } from 'ol/extent'; -import Feature from 'ol/Feature'; -import Geometry from 'ol/geom/Geometry'; -import SimpleGeometry from 'ol/geom/SimpleGeometry'; -import { FillStrokeState, DeclutterGroup } from 'ol/render/canvas'; -import RenderFeature from 'ol/render/Feature'; -import VectorContext from 'ol/render/VectorContext'; -import { Transform } from 'ol/transform'; +import { Coordinate } from '../../coordinate'; +import { Extent } from '../../extent'; +import Feature from '../../Feature'; +import Geometry from '../../geom/Geometry'; +import SimpleGeometry from '../../geom/SimpleGeometry'; +import { Transform } from '../../transform'; +import { FillStrokeState, DeclutterGroup } from '../canvas'; +import RenderFeature from '../Feature'; +import VectorContext from '../VectorContext'; + export default class CanvasReplay extends VectorContext { constructor(tolerance: number, maxExtent: Extent, resolution: number, pixelRatio: number, overlaps: boolean, declutterTree: any); protected overlaps: boolean; diff --git a/@types/ol/render/canvas/ReplayGroup.d.ts b/@types/ol/render/canvas/ReplayGroup.d.ts index 0f71372e..b0aaff4b 100644 --- a/@types/ol/render/canvas/ReplayGroup.d.ts +++ b/@types/ol/render/canvas/ReplayGroup.d.ts @@ -1,12 +1,13 @@ -import { Coordinate } from 'ol/coordinate'; -import { Extent } from 'ol/extent'; -import Feature from 'ol/Feature'; -import { DeclutterGroup } from 'ol/render/canvas'; -import CanvasReplay from 'ol/render/canvas/Replay'; -import RenderFeature from 'ol/render/Feature'; -import ReplayGroup from 'ol/render/ReplayGroup'; -import ReplayType from 'ol/render/ReplayType'; -import { Transform } from 'ol/transform'; +import { Coordinate } from '../../coordinate'; +import { Extent } from '../../extent'; +import Feature from '../../Feature'; +import { Transform } from '../../transform'; +import { DeclutterGroup } from '../canvas'; +import RenderFeature from '../Feature'; +import ReplayGroup from '../ReplayGroup'; +import ReplayType from '../ReplayType'; +import CanvasReplay from './Replay'; + export function getCircleArray(radius: number): any[][]; export function replayDeclutter(declutterReplays: { [key: string]: any[] }, context: CanvasRenderingContext2D, rotation: number, snapToPixel: boolean): void; export default class CanvasReplayGroup extends ReplayGroup { diff --git a/@types/ol/render/canvas/TextReplay.d.ts b/@types/ol/render/canvas/TextReplay.d.ts index 92bdbd66..6922eece 100644 --- a/@types/ol/render/canvas/TextReplay.d.ts +++ b/@types/ol/render/canvas/TextReplay.d.ts @@ -1,5 +1,6 @@ -import { Extent } from 'ol/extent'; -import CanvasReplay from 'ol/render/canvas/Replay'; +import { Extent } from '../../extent'; +import CanvasReplay from './Replay'; + export function measureTextWidths(font: string, lines: string[], widths: number[]): number; export default class CanvasTextReplay extends CanvasReplay { constructor(tolerance: number, maxExtent: Extent, resolution: number, pixelRatio: number, overlaps: boolean, declutterTree: any); diff --git a/@types/ol/render/replay.d.ts b/@types/ol/render/replay.d.ts index 779e76d2..8ad91418 100644 --- a/@types/ol/render/replay.d.ts +++ b/@types/ol/render/replay.d.ts @@ -1,4 +1,5 @@ -import ReplayType from 'ol/render/ReplayType'; +import ReplayType from './ReplayType'; + export const ORDER: ReplayType[]; export enum TEXT_ALIGN { left = 0, diff --git a/@types/ol/render/webgl/index.d.ts b/@types/ol/render/webgl.d.ts similarity index 100% rename from @types/ol/render/webgl/index.d.ts rename to @types/ol/render/webgl.d.ts diff --git a/@types/ol/render/webgl/CircleReplay.d.ts b/@types/ol/render/webgl/CircleReplay.d.ts index 0b200a0e..59a51506 100644 --- a/@types/ol/render/webgl/CircleReplay.d.ts +++ b/@types/ol/render/webgl/CircleReplay.d.ts @@ -1,5 +1,6 @@ -import { Extent } from 'ol/extent'; -import WebGLReplay from 'ol/render/webgl/Replay'; +import { Extent } from '../../extent'; +import WebGLReplay from './Replay'; + export default class WebGLCircleReplay extends WebGLReplay { constructor(tolerance: number, maxExtent: Extent); } diff --git a/@types/ol/render/webgl/ImageReplay.d.ts b/@types/ol/render/webgl/ImageReplay.d.ts index 47c9510a..dbbeb31d 100644 --- a/@types/ol/render/webgl/ImageReplay.d.ts +++ b/@types/ol/render/webgl/ImageReplay.d.ts @@ -1,5 +1,6 @@ -import { Extent } from 'ol/extent'; -import WebGLTextureReplay from 'ol/render/webgl/TextureReplay'; +import { Extent } from '../../extent'; +import WebGLTextureReplay from './TextureReplay'; + export default class WebGLImageReplay extends WebGLTextureReplay { constructor(tolerance: number, maxExtent: Extent); protected hitDetectionImages_: any[]; diff --git a/@types/ol/render/webgl/Immediate.d.ts b/@types/ol/render/webgl/Immediate.d.ts index bac48c22..f1d096df 100644 --- a/@types/ol/render/webgl/Immediate.d.ts +++ b/@types/ol/render/webgl/Immediate.d.ts @@ -1,8 +1,9 @@ -import { Coordinate } from 'ol/coordinate'; -import { Extent } from 'ol/extent'; -import VectorContext from 'ol/render/VectorContext'; -import { Size } from 'ol/size'; -import WebGLContext from 'ol/webgl/Context'; +import { Coordinate } from '../../coordinate'; +import { Extent } from '../../extent'; +import { Size } from '../../size'; +import WebGLContext from '../../webgl/Context'; +import VectorContext from '../VectorContext'; + export default class WebGLImmediateRenderer extends VectorContext { constructor(context: WebGLContext, center: Coordinate, resolution: number, rotation: number, size: Size, extent: Extent, pixelRatio: number); } diff --git a/@types/ol/render/webgl/LineStringReplay.d.ts b/@types/ol/render/webgl/LineStringReplay.d.ts index 183f70ba..da622b11 100644 --- a/@types/ol/render/webgl/LineStringReplay.d.ts +++ b/@types/ol/render/webgl/LineStringReplay.d.ts @@ -1,7 +1,8 @@ -import { Extent } from 'ol/extent'; -import Feature from 'ol/Feature'; -import RenderFeature from 'ol/render/Feature'; -import WebGLReplay from 'ol/render/webgl/Replay'; +import { Extent } from '../../extent'; +import Feature from '../../Feature'; +import RenderFeature from '../Feature'; +import WebGLReplay from './Replay'; + export default class WebGLLineStringReplay extends WebGLReplay { constructor(tolerance: number, maxExtent: Extent); drawPolygonCoordinates(flatCoordinates: number[], holeFlatCoordinates: number[][], stride: number): void; diff --git a/@types/ol/render/webgl/PolygonReplay.d.ts b/@types/ol/render/webgl/PolygonReplay.d.ts index 88addfdb..1a2e0335 100644 --- a/@types/ol/render/webgl/PolygonReplay.d.ts +++ b/@types/ol/render/webgl/PolygonReplay.d.ts @@ -1,5 +1,6 @@ -import { Extent } from 'ol/extent'; -import WebGLReplay from 'ol/render/webgl/Replay'; +import { Extent } from '../../extent'; +import WebGLReplay from './Replay'; + export interface PolygonSegment { p0: PolygonVertex; p1: PolygonVertex; diff --git a/@types/ol/render/webgl/Replay.d.ts b/@types/ol/render/webgl/Replay.d.ts index 336b801a..627854d4 100644 --- a/@types/ol/render/webgl/Replay.d.ts +++ b/@types/ol/render/webgl/Replay.d.ts @@ -1,16 +1,17 @@ -import { Coordinate } from 'ol/coordinate'; -import { Extent } from 'ol/extent'; -import Feature from 'ol/Feature'; -import RenderFeature from 'ol/render/Feature'; -import VectorContext from 'ol/render/VectorContext'; -import Locations from 'ol/render/webgl/circlereplay/defaultshader/Locations'; -import WebGLLineStringReplay from 'ol/render/webgl/LineStringReplay'; -import Locations_1 from 'ol/render/webgl/linestringreplay/defaultshader/Locations'; -import Locations_2 from 'ol/render/webgl/polygonreplay/defaultshader/Locations'; -import Locations_3 from 'ol/render/webgl/texturereplay/defaultshader/Locations'; -import { Size } from 'ol/size'; -import WebGLBuffer from 'ol/webgl/Buffer'; -import WebGLContext from 'ol/webgl/Context'; +import { Coordinate } from '../../coordinate'; +import { Extent } from '../../extent'; +import Feature from '../../Feature'; +import { Size } from '../../size'; +import WebGLBuffer from '../../webgl/Buffer'; +import WebGLContext from '../../webgl/Context'; +import RenderFeature from '../Feature'; +import VectorContext from '../VectorContext'; +import Locations from './circlereplay/defaultshader/Locations'; +import WebGLLineStringReplay from './LineStringReplay'; +import Locations_1 from './linestringreplay/defaultshader/Locations'; +import Locations_2 from './polygonreplay/defaultshader/Locations'; +import Locations_3 from './texturereplay/defaultshader/Locations'; + export default class WebGLReplay extends VectorContext { constructor(tolerance: number, maxExtent: Extent); protected verticesBuffer: WebGLBuffer; diff --git a/@types/ol/render/webgl/ReplayGroup.d.ts b/@types/ol/render/webgl/ReplayGroup.d.ts index 41fac382..68d49443 100644 --- a/@types/ol/render/webgl/ReplayGroup.d.ts +++ b/@types/ol/render/webgl/ReplayGroup.d.ts @@ -1,10 +1,11 @@ -import { Coordinate } from 'ol/coordinate'; -import { Extent } from 'ol/extent'; -import Feature from 'ol/Feature'; -import RenderFeature from 'ol/render/Feature'; -import ReplayGroup from 'ol/render/ReplayGroup'; -import { Size } from 'ol/size'; -import WebGLContext from 'ol/webgl/Context'; +import { Coordinate } from '../../coordinate'; +import { Extent } from '../../extent'; +import Feature from '../../Feature'; +import { Size } from '../../size'; +import WebGLContext from '../../webgl/Context'; +import RenderFeature from '../Feature'; +import ReplayGroup from '../ReplayGroup'; + export default class WebGLReplayGroup extends ReplayGroup { constructor(tolerance: number, maxExtent: Extent, opt_renderBuffer?: number); finish(context: WebGLContext): void; diff --git a/@types/ol/render/webgl/TextReplay.d.ts b/@types/ol/render/webgl/TextReplay.d.ts index 1efc8223..6dc6a97b 100644 --- a/@types/ol/render/webgl/TextReplay.d.ts +++ b/@types/ol/render/webgl/TextReplay.d.ts @@ -1,6 +1,7 @@ -import { Extent } from 'ol/extent'; -import WebGLTextureReplay from 'ol/render/webgl/TextureReplay'; -import AtlasManager from 'ol/style/AtlasManager'; +import { Extent } from '../../extent'; +import AtlasManager from '../../style/AtlasManager'; +import WebGLTextureReplay from './TextureReplay'; + export interface GlyphAtlas { atlas: AtlasManager; width: { [key: string]: number }; diff --git a/@types/ol/render/webgl/TextureReplay.d.ts b/@types/ol/render/webgl/TextureReplay.d.ts index c892d1c1..1fe528e6 100644 --- a/@types/ol/render/webgl/TextureReplay.d.ts +++ b/@types/ol/render/webgl/TextureReplay.d.ts @@ -1,7 +1,8 @@ -import { Extent } from 'ol/extent'; -import WebGLReplay from 'ol/render/webgl/Replay'; -import Locations from 'ol/render/webgl/texturereplay/defaultshader/Locations'; -import WebGLContext from 'ol/webgl/Context'; +import { Extent } from '../../extent'; +import WebGLContext from '../../webgl/Context'; +import WebGLReplay from './Replay'; +import Locations from './texturereplay/defaultshader/Locations'; + export default class WebGLTextureReplay extends WebGLReplay { constructor(tolerance: number, maxExtent: Extent); protected hitDetectionGroupIndices: number[]; diff --git a/@types/ol/render/webgl/circlereplay/defaultshader.d.ts b/@types/ol/render/webgl/circlereplay/defaultshader.d.ts new file mode 100644 index 00000000..b325511d --- /dev/null +++ b/@types/ol/render/webgl/circlereplay/defaultshader.d.ts @@ -0,0 +1,5 @@ +import WebGLFragment from '../../../webgl/Fragment'; +import WebGLVertex from '../../../webgl/Vertex'; + +export const fragment: WebGLFragment; +export const vertex: WebGLVertex; diff --git a/@types/ol/render/webgl/circlereplay/defaultshader/index.d.ts b/@types/ol/render/webgl/circlereplay/defaultshader/index.d.ts deleted file mode 100644 index 98fac274..00000000 --- a/@types/ol/render/webgl/circlereplay/defaultshader/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import WebGLFragment from 'ol/webgl/Fragment'; -import WebGLVertex from 'ol/webgl/Vertex'; -export const fragment: WebGLFragment; -export const vertex: WebGLVertex; diff --git a/@types/ol/render/webgl/linestringreplay/defaultshader.d.ts b/@types/ol/render/webgl/linestringreplay/defaultshader.d.ts new file mode 100644 index 00000000..b325511d --- /dev/null +++ b/@types/ol/render/webgl/linestringreplay/defaultshader.d.ts @@ -0,0 +1,5 @@ +import WebGLFragment from '../../../webgl/Fragment'; +import WebGLVertex from '../../../webgl/Vertex'; + +export const fragment: WebGLFragment; +export const vertex: WebGLVertex; diff --git a/@types/ol/render/webgl/linestringreplay/defaultshader/index.d.ts b/@types/ol/render/webgl/linestringreplay/defaultshader/index.d.ts deleted file mode 100644 index 98fac274..00000000 --- a/@types/ol/render/webgl/linestringreplay/defaultshader/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import WebGLFragment from 'ol/webgl/Fragment'; -import WebGLVertex from 'ol/webgl/Vertex'; -export const fragment: WebGLFragment; -export const vertex: WebGLVertex; diff --git a/@types/ol/render/webgl/polygonreplay/defaultshader.d.ts b/@types/ol/render/webgl/polygonreplay/defaultshader.d.ts new file mode 100644 index 00000000..b325511d --- /dev/null +++ b/@types/ol/render/webgl/polygonreplay/defaultshader.d.ts @@ -0,0 +1,5 @@ +import WebGLFragment from '../../../webgl/Fragment'; +import WebGLVertex from '../../../webgl/Vertex'; + +export const fragment: WebGLFragment; +export const vertex: WebGLVertex; diff --git a/@types/ol/render/webgl/polygonreplay/defaultshader/index.d.ts b/@types/ol/render/webgl/polygonreplay/defaultshader/index.d.ts deleted file mode 100644 index 98fac274..00000000 --- a/@types/ol/render/webgl/polygonreplay/defaultshader/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import WebGLFragment from 'ol/webgl/Fragment'; -import WebGLVertex from 'ol/webgl/Vertex'; -export const fragment: WebGLFragment; -export const vertex: WebGLVertex; diff --git a/@types/ol/render/webgl/texturereplay/defaultshader.d.ts b/@types/ol/render/webgl/texturereplay/defaultshader.d.ts new file mode 100644 index 00000000..b325511d --- /dev/null +++ b/@types/ol/render/webgl/texturereplay/defaultshader.d.ts @@ -0,0 +1,5 @@ +import WebGLFragment from '../../../webgl/Fragment'; +import WebGLVertex from '../../../webgl/Vertex'; + +export const fragment: WebGLFragment; +export const vertex: WebGLVertex; diff --git a/@types/ol/render/webgl/texturereplay/defaultshader/index.d.ts b/@types/ol/render/webgl/texturereplay/defaultshader/index.d.ts deleted file mode 100644 index 98fac274..00000000 --- a/@types/ol/render/webgl/texturereplay/defaultshader/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import WebGLFragment from 'ol/webgl/Fragment'; -import WebGLVertex from 'ol/webgl/Vertex'; -export const fragment: WebGLFragment; -export const vertex: WebGLVertex; diff --git a/@types/ol/renderer/Layer.d.ts b/@types/ol/renderer/Layer.d.ts index 98386b26..262d4163 100644 --- a/@types/ol/renderer/Layer.d.ts +++ b/@types/ol/renderer/Layer.d.ts @@ -1,17 +1,18 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import { FeatureLike } from 'ol/Feature'; -import ImageBase from 'ol/ImageBase'; -import Layer from 'ol/layer/Layer'; -import Observable from 'ol/Observable'; -import { FrameState } from 'ol/PluggableMap'; -import Projection from 'ol/proj/Projection'; -import TileSource from 'ol/source/Tile'; -import Tile from 'ol/Tile'; -import TileGrid from 'ol/tilegrid/TileGrid'; -import TileRange from 'ol/TileRange'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import { FeatureLike } from '../Feature'; +import ImageBase from '../ImageBase'; +import Layer from '../layer/Layer'; +import Observable from '../Observable'; +import { FrameState } from '../PluggableMap'; +import Projection from '../proj/Projection'; +import TileSource from '../source/Tile'; +import Tile from '../Tile'; +import TileGrid from '../tilegrid/TileGrid'; +import TileRange from '../TileRange'; + export default class LayerRenderer extends Observable { constructor(layer: Layer); protected createLoadedTileFinder(source: TileSource, projection: Projection, tiles: { [key: number]: { [key: string]: Tile } }): ((param0: number, param1: TileRange) => boolean); diff --git a/@types/ol/renderer/Map.d.ts b/@types/ol/renderer/Map.d.ts index dd592f2d..22895579 100644 --- a/@types/ol/renderer/Map.d.ts +++ b/@types/ol/renderer/Map.d.ts @@ -1,12 +1,13 @@ -import { Coordinate } from 'ol/coordinate'; -import Disposable from 'ol/Disposable'; -import { FeatureLike } from 'ol/Feature'; -import BaseLayer from 'ol/layer/Base'; -import Layer, { State } from 'ol/layer/Layer'; -import { Pixel } from 'ol/pixel'; -import PluggableMap, { FrameState } from 'ol/PluggableMap'; -import EventType from 'ol/render/EventType'; -import LayerRenderer from 'ol/renderer/Layer'; +import { Coordinate } from '../coordinate'; +import Disposable from '../Disposable'; +import { FeatureLike } from '../Feature'; +import BaseLayer from '../layer/Base'; +import Layer, { State } from '../layer/Layer'; +import { Pixel } from '../pixel'; +import PluggableMap, { FrameState } from '../PluggableMap'; +import EventType from '../render/EventType'; +import LayerRenderer from './Layer'; + export function sortByZIndex(state1: State, state2: State): number; export default class MapRenderer extends Disposable { constructor(map: PluggableMap); diff --git a/@types/ol/renderer/canvas/ImageLayer.d.ts b/@types/ol/renderer/canvas/ImageLayer.d.ts index 448257d6..4c3139ec 100644 --- a/@types/ol/renderer/canvas/ImageLayer.d.ts +++ b/@types/ol/renderer/canvas/ImageLayer.d.ts @@ -1,10 +1,11 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import ImageLayer from 'ol/layer/Image'; -import Layer from 'ol/layer/Layer'; -import VectorLayer from 'ol/layer/Vector'; -import IntermediateCanvasRenderer from 'ol/renderer/canvas/IntermediateCanvas'; -import MapRenderer from 'ol/renderer/Map'; +import { EventsKey } from '../../events'; +import Event from '../../events/Event'; +import ImageLayer from '../../layer/Image'; +import Layer from '../../layer/Layer'; +import VectorLayer from '../../layer/Vector'; +import MapRenderer from '../Map'; +import IntermediateCanvasRenderer from './IntermediateCanvas'; + export default class CanvasImageLayerRenderer extends IntermediateCanvasRenderer { constructor(imageLayer: ImageLayer | VectorLayer); create(mapRenderer: MapRenderer, layer: Layer): CanvasImageLayerRenderer; diff --git a/@types/ol/renderer/canvas/IntermediateCanvas.d.ts b/@types/ol/renderer/canvas/IntermediateCanvas.d.ts index 0340e544..c6a9ca5e 100644 --- a/@types/ol/renderer/canvas/IntermediateCanvas.d.ts +++ b/@types/ol/renderer/canvas/IntermediateCanvas.d.ts @@ -1,8 +1,9 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Layer from 'ol/layer/Layer'; -import CanvasLayerRenderer from 'ol/renderer/canvas/Layer'; -import { Transform } from 'ol/transform'; +import { EventsKey } from '../../events'; +import Event from '../../events/Event'; +import Layer from '../../layer/Layer'; +import { Transform } from '../../transform'; +import CanvasLayerRenderer from './Layer'; + export default class IntermediateCanvasRenderer extends CanvasLayerRenderer { constructor(layer: Layer); protected coordinateToCanvasPixelTransform: Transform; diff --git a/@types/ol/renderer/canvas/Layer.d.ts b/@types/ol/renderer/canvas/Layer.d.ts index ba66e21c..fe4afa54 100644 --- a/@types/ol/renderer/canvas/Layer.d.ts +++ b/@types/ol/renderer/canvas/Layer.d.ts @@ -1,11 +1,12 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import Layer, { State } from 'ol/layer/Layer'; -import { FrameState } from 'ol/PluggableMap'; -import LayerRenderer from 'ol/renderer/Layer'; -import { Transform } from 'ol/transform'; +import { Coordinate } from '../../coordinate'; +import { EventsKey } from '../../events'; +import Event from '../../events/Event'; +import { Extent } from '../../extent'; +import Layer, { State } from '../../layer/Layer'; +import { FrameState } from '../../PluggableMap'; +import { Transform } from '../../transform'; +import LayerRenderer from '../Layer'; + export default class CanvasLayerRenderer extends LayerRenderer { constructor(layer: Layer); protected renderedResolution: number; diff --git a/@types/ol/renderer/canvas/Map.d.ts b/@types/ol/renderer/canvas/Map.d.ts index 0d9dc0cd..849ee435 100644 --- a/@types/ol/renderer/canvas/Map.d.ts +++ b/@types/ol/renderer/canvas/Map.d.ts @@ -1,7 +1,8 @@ -import PluggableMap, { FrameState } from 'ol/PluggableMap'; -import EventType from 'ol/render/EventType'; -import MapRenderer from 'ol/renderer/Map'; -import { Transform } from 'ol/transform'; +import PluggableMap, { FrameState } from '../../PluggableMap'; +import EventType from '../../render/EventType'; +import { Transform } from '../../transform'; +import MapRenderer from '../Map'; + export default class CanvasMapRenderer extends MapRenderer { constructor(map: PluggableMap); protected getTransform(frameState: FrameState): Transform; diff --git a/@types/ol/renderer/canvas/TileLayer.d.ts b/@types/ol/renderer/canvas/TileLayer.d.ts index 03970624..813b9173 100644 --- a/@types/ol/renderer/canvas/TileLayer.d.ts +++ b/@types/ol/renderer/canvas/TileLayer.d.ts @@ -1,14 +1,15 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import Layer, { State } from 'ol/layer/Layer'; -import TileLayer from 'ol/layer/Tile'; -import VectorTileLayer from 'ol/layer/VectorTile'; -import { FrameState } from 'ol/PluggableMap'; -import Projection from 'ol/proj/Projection'; -import IntermediateCanvasRenderer from 'ol/renderer/canvas/IntermediateCanvas'; -import MapRenderer from 'ol/renderer/Map'; -import Tile from 'ol/Tile'; +import { EventsKey } from '../../events'; +import Event from '../../events/Event'; +import { Extent } from '../../extent'; +import Layer, { State } from '../../layer/Layer'; +import TileLayer from '../../layer/Tile'; +import VectorTileLayer from '../../layer/VectorTile'; +import { FrameState } from '../../PluggableMap'; +import Projection from '../../proj/Projection'; +import Tile from '../../Tile'; +import MapRenderer from '../Map'; +import IntermediateCanvasRenderer from './IntermediateCanvas'; + export default class CanvasTileLayerRenderer extends IntermediateCanvasRenderer { constructor(tileLayer: TileLayer | VectorTileLayer, opt_noContext?: boolean); protected zDirection: number; diff --git a/@types/ol/renderer/canvas/VectorLayer.d.ts b/@types/ol/renderer/canvas/VectorLayer.d.ts index 47ecf5c2..81252f51 100644 --- a/@types/ol/renderer/canvas/VectorLayer.d.ts +++ b/@types/ol/renderer/canvas/VectorLayer.d.ts @@ -1,13 +1,14 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Feature from 'ol/Feature'; -import Layer, { State } from 'ol/layer/Layer'; -import VectorLayer from 'ol/layer/Vector'; -import { FrameState } from 'ol/PluggableMap'; -import CanvasReplayGroup from 'ol/render/canvas/ReplayGroup'; -import CanvasLayerRenderer from 'ol/renderer/canvas/Layer'; -import MapRenderer from 'ol/renderer/Map'; -import Style from 'ol/style/Style'; +import { EventsKey } from '../../events'; +import Event from '../../events/Event'; +import Feature from '../../Feature'; +import Layer, { State } from '../../layer/Layer'; +import VectorLayer from '../../layer/Vector'; +import { FrameState } from '../../PluggableMap'; +import CanvasReplayGroup from '../../render/canvas/ReplayGroup'; +import Style from '../../style/Style'; +import MapRenderer from '../Map'; +import CanvasLayerRenderer from './Layer'; + export default class CanvasVectorLayerRenderer extends CanvasLayerRenderer { constructor(vectorLayer: VectorLayer); create(mapRenderer: MapRenderer, layer: Layer): CanvasVectorLayerRenderer; diff --git a/@types/ol/renderer/canvas/VectorTileLayer.d.ts b/@types/ol/renderer/canvas/VectorTileLayer.d.ts index c06fbf5c..e32ec22a 100644 --- a/@types/ol/renderer/canvas/VectorTileLayer.d.ts +++ b/@types/ol/renderer/canvas/VectorTileLayer.d.ts @@ -1,12 +1,13 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { FeatureLike } from 'ol/Feature'; -import Layer from 'ol/layer/Layer'; -import VectorTileLayer from 'ol/layer/VectorTile'; -import CanvasReplayGroup from 'ol/render/canvas/ReplayGroup'; -import CanvasTileLayerRenderer from 'ol/renderer/canvas/TileLayer'; -import MapRenderer from 'ol/renderer/Map'; -import Style from 'ol/style/Style'; +import { EventsKey } from '../../events'; +import Event from '../../events/Event'; +import { FeatureLike } from '../../Feature'; +import Layer from '../../layer/Layer'; +import VectorTileLayer from '../../layer/VectorTile'; +import CanvasReplayGroup from '../../render/canvas/ReplayGroup'; +import Style from '../../style/Style'; +import MapRenderer from '../Map'; +import CanvasTileLayerRenderer from './TileLayer'; + export default class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer { constructor(layer: VectorTileLayer); create(mapRenderer: MapRenderer, layer: Layer): CanvasVectorTileLayerRenderer; diff --git a/@types/ol/renderer/vector.d.ts b/@types/ol/renderer/vector.d.ts index 80cf748d..63cb8a71 100644 --- a/@types/ol/renderer/vector.d.ts +++ b/@types/ol/renderer/vector.d.ts @@ -1,17 +1,18 @@ -import Event from 'ol/events/Event'; -import Feature, { FeatureLike } from 'ol/Feature'; -import Circle from 'ol/geom/Circle'; -import Geometry from 'ol/geom/Geometry'; -import GeometryCollection from 'ol/geom/GeometryCollection'; -import LineString from 'ol/geom/LineString'; -import MultiLineString from 'ol/geom/MultiLineString'; -import MultiPoint from 'ol/geom/MultiPoint'; -import MultiPolygon from 'ol/geom/MultiPolygon'; -import Point from 'ol/geom/Point'; -import Polygon from 'ol/geom/Polygon'; -import RenderFeature from 'ol/render/Feature'; -import ReplayGroup from 'ol/render/ReplayGroup'; -import Style from 'ol/style/Style'; +import Event from '../events/Event'; +import Feature, { FeatureLike } from '../Feature'; +import Circle from '../geom/Circle'; +import Geometry from '../geom/Geometry'; +import GeometryCollection from '../geom/GeometryCollection'; +import LineString from '../geom/LineString'; +import MultiLineString from '../geom/MultiLineString'; +import MultiPoint from '../geom/MultiPoint'; +import MultiPolygon from '../geom/MultiPolygon'; +import Point from '../geom/Point'; +import Polygon from '../geom/Polygon'; +import RenderFeature from '../render/Feature'; +import ReplayGroup from '../render/ReplayGroup'; +import Style from '../style/Style'; + export function defaultOrder(feature1: FeatureLike, feature2: FeatureLike): number; export function getSquaredTolerance(resolution: number, pixelRatio: number): number; export function getTolerance(resolution: number, pixelRatio: number): number; diff --git a/@types/ol/renderer/webgl/ImageLayer.d.ts b/@types/ol/renderer/webgl/ImageLayer.d.ts index 789674bd..4d52e347 100644 --- a/@types/ol/renderer/webgl/ImageLayer.d.ts +++ b/@types/ol/renderer/webgl/ImageLayer.d.ts @@ -1,10 +1,11 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import ImageLayer from 'ol/layer/Image'; -import Layer from 'ol/layer/Layer'; -import MapRenderer from 'ol/renderer/Map'; -import WebGLLayerRenderer from 'ol/renderer/webgl/Layer'; -import WebGLMapRenderer from 'ol/renderer/webgl/Map'; +import { EventsKey } from '../../events'; +import Event from '../../events/Event'; +import ImageLayer from '../../layer/Image'; +import Layer from '../../layer/Layer'; +import MapRenderer from '../Map'; +import WebGLLayerRenderer from './Layer'; +import WebGLMapRenderer from './Map'; + export default class WebGLImageLayerRenderer extends WebGLLayerRenderer { constructor(mapRenderer: WebGLMapRenderer, imageLayer: ImageLayer); create(mapRenderer: MapRenderer, layer: Layer): WebGLImageLayerRenderer; diff --git a/@types/ol/renderer/webgl/Layer.d.ts b/@types/ol/renderer/webgl/Layer.d.ts index ddcb6e67..cb4a12d0 100644 --- a/@types/ol/renderer/webgl/Layer.d.ts +++ b/@types/ol/renderer/webgl/Layer.d.ts @@ -1,12 +1,13 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Layer, { State } from 'ol/layer/Layer'; -import { Pixel } from 'ol/pixel'; -import { FrameState } from 'ol/PluggableMap'; -import LayerRenderer from 'ol/renderer/Layer'; -import WebGLMapRenderer from 'ol/renderer/webgl/Map'; -import { Transform } from 'ol/transform'; -import WebGLContext from 'ol/webgl/Context'; +import { EventsKey } from '../../events'; +import Event from '../../events/Event'; +import Layer, { State } from '../../layer/Layer'; +import { Pixel } from '../../pixel'; +import { FrameState } from '../../PluggableMap'; +import { Transform } from '../../transform'; +import WebGLContext from '../../webgl/Context'; +import LayerRenderer from '../Layer'; +import WebGLMapRenderer from './Map'; + export default class WebGLLayerRenderer extends LayerRenderer { constructor(mapRenderer: WebGLMapRenderer, layer: Layer); protected texture: WebGLTexture; diff --git a/@types/ol/renderer/webgl/Map.d.ts b/@types/ol/renderer/webgl/Map.d.ts index c0b6ddab..66411ae9 100644 --- a/@types/ol/renderer/webgl/Map.d.ts +++ b/@types/ol/renderer/webgl/Map.d.ts @@ -1,11 +1,12 @@ -import Event from 'ol/events/Event'; -import PluggableMap, { FrameState } from 'ol/PluggableMap'; -import EventType from 'ol/render/EventType'; -import MapRenderer from 'ol/renderer/Map'; -import { Size } from 'ol/size'; -import PriorityQueue from 'ol/structs/PriorityQueue'; -import Tile from 'ol/Tile'; -import WebGLContext from 'ol/webgl/Context'; +import Event from '../../events/Event'; +import PluggableMap, { FrameState } from '../../PluggableMap'; +import EventType from '../../render/EventType'; +import { Size } from '../../size'; +import PriorityQueue from '../../structs/PriorityQueue'; +import Tile from '../../Tile'; +import WebGLContext from '../../webgl/Context'; +import MapRenderer from '../Map'; + export interface TextureCacheEntry { magFilter: number; minFilter: number; diff --git a/@types/ol/renderer/webgl/TileLayer.d.ts b/@types/ol/renderer/webgl/TileLayer.d.ts index cc5991c8..01664bf3 100644 --- a/@types/ol/renderer/webgl/TileLayer.d.ts +++ b/@types/ol/renderer/webgl/TileLayer.d.ts @@ -1,10 +1,11 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Layer from 'ol/layer/Layer'; -import TileLayer from 'ol/layer/Tile'; -import MapRenderer from 'ol/renderer/Map'; -import WebGLLayerRenderer from 'ol/renderer/webgl/Layer'; -import WebGLMapRenderer from 'ol/renderer/webgl/Map'; +import { EventsKey } from '../../events'; +import Event from '../../events/Event'; +import Layer from '../../layer/Layer'; +import TileLayer from '../../layer/Tile'; +import MapRenderer from '../Map'; +import WebGLLayerRenderer from './Layer'; +import WebGLMapRenderer from './Map'; + export default class WebGLTileLayerRenderer extends WebGLLayerRenderer { constructor(mapRenderer: WebGLMapRenderer, tileLayer: TileLayer); create(mapRenderer: MapRenderer, layer: Layer): WebGLTileLayerRenderer; diff --git a/@types/ol/renderer/webgl/VectorLayer.d.ts b/@types/ol/renderer/webgl/VectorLayer.d.ts index 8225e9ea..cb18a13c 100644 --- a/@types/ol/renderer/webgl/VectorLayer.d.ts +++ b/@types/ol/renderer/webgl/VectorLayer.d.ts @@ -1,13 +1,14 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Feature from 'ol/Feature'; -import Layer from 'ol/layer/Layer'; -import VectorLayer from 'ol/layer/Vector'; -import WebGLReplayGroup from 'ol/render/webgl/ReplayGroup'; -import MapRenderer from 'ol/renderer/Map'; -import WebGLLayerRenderer from 'ol/renderer/webgl/Layer'; -import WebGLMapRenderer from 'ol/renderer/webgl/Map'; -import Style from 'ol/style/Style'; +import { EventsKey } from '../../events'; +import Event from '../../events/Event'; +import Feature from '../../Feature'; +import Layer from '../../layer/Layer'; +import VectorLayer from '../../layer/Vector'; +import WebGLReplayGroup from '../../render/webgl/ReplayGroup'; +import Style from '../../style/Style'; +import MapRenderer from '../Map'; +import WebGLLayerRenderer from './Layer'; +import WebGLMapRenderer from './Map'; + export default class WebGLVectorLayerRenderer extends WebGLLayerRenderer { constructor(mapRenderer: WebGLMapRenderer, vectorLayer: VectorLayer); create(mapRenderer: MapRenderer, layer: Layer): WebGLVectorLayerRenderer; diff --git a/@types/ol/renderer/webgl/defaultmapshader.d.ts b/@types/ol/renderer/webgl/defaultmapshader.d.ts new file mode 100644 index 00000000..5f6695f9 --- /dev/null +++ b/@types/ol/renderer/webgl/defaultmapshader.d.ts @@ -0,0 +1,5 @@ +import WebGLFragment from '../../webgl/Fragment'; +import WebGLVertex from '../../webgl/Vertex'; + +export const fragment: WebGLFragment; +export const vertex: WebGLVertex; diff --git a/@types/ol/renderer/webgl/defaultmapshader/index.d.ts b/@types/ol/renderer/webgl/defaultmapshader/index.d.ts deleted file mode 100644 index 98fac274..00000000 --- a/@types/ol/renderer/webgl/defaultmapshader/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import WebGLFragment from 'ol/webgl/Fragment'; -import WebGLVertex from 'ol/webgl/Vertex'; -export const fragment: WebGLFragment; -export const vertex: WebGLVertex; diff --git a/@types/ol/renderer/webgl/tilelayershader.d.ts b/@types/ol/renderer/webgl/tilelayershader.d.ts new file mode 100644 index 00000000..5f6695f9 --- /dev/null +++ b/@types/ol/renderer/webgl/tilelayershader.d.ts @@ -0,0 +1,5 @@ +import WebGLFragment from '../../webgl/Fragment'; +import WebGLVertex from '../../webgl/Vertex'; + +export const fragment: WebGLFragment; +export const vertex: WebGLVertex; diff --git a/@types/ol/renderer/webgl/tilelayershader/index.d.ts b/@types/ol/renderer/webgl/tilelayershader/index.d.ts deleted file mode 100644 index 98fac274..00000000 --- a/@types/ol/renderer/webgl/tilelayershader/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import WebGLFragment from 'ol/webgl/Fragment'; -import WebGLVertex from 'ol/webgl/Vertex'; -export const fragment: WebGLFragment; -export const vertex: WebGLVertex; diff --git a/@types/ol/reproj/index.d.ts b/@types/ol/reproj.d.ts similarity index 70% rename from @types/ol/reproj/index.d.ts rename to @types/ol/reproj.d.ts index e0f85df5..0ba36934 100644 --- a/@types/ol/reproj/index.d.ts +++ b/@types/ol/reproj.d.ts @@ -1,6 +1,7 @@ -import { Coordinate } from 'ol/coordinate'; -import { Extent } from 'ol/extent'; -import Projection from 'ol/proj/Projection'; -import Triangulation from 'ol/reproj/Triangulation'; +import { Coordinate } from './coordinate'; +import { Extent } from './extent'; +import Projection from './proj/Projection'; +import Triangulation from './reproj/Triangulation'; + export function calculateSourceResolution(sourceProj: Projection, targetProj: Projection, targetCenter: Coordinate, targetResolution: number): number; export function render(width: number, height: number, pixelRatio: number, sourceResolution: number, sourceExtent: Extent, targetResolution: number, targetExtent: Extent, triangulation: Triangulation, sources: any[], gutter: number, opt_renderEdges?: boolean): HTMLCanvasElement; diff --git a/@types/ol/reproj/Image.d.ts b/@types/ol/reproj/Image.d.ts index bddb7d2b..e482bf8c 100644 --- a/@types/ol/reproj/Image.d.ts +++ b/@types/ol/reproj/Image.d.ts @@ -1,6 +1,7 @@ -import { Extent } from 'ol/extent'; -import ImageBase from 'ol/ImageBase'; -import Projection from 'ol/proj/Projection'; +import { Extent } from '../extent'; +import ImageBase from '../ImageBase'; +import Projection from '../proj/Projection'; + export type FunctionType = (() => void); export default class ReprojImage extends ImageBase { constructor(sourceProj: Projection, targetProj: Projection, targetExtent: Extent, targetResolution: number, pixelRatio: number, getImageFunction: FunctionType); diff --git a/@types/ol/reproj/Tile.d.ts b/@types/ol/reproj/Tile.d.ts index 03e2c462..3aa4c508 100644 --- a/@types/ol/reproj/Tile.d.ts +++ b/@types/ol/reproj/Tile.d.ts @@ -1,7 +1,8 @@ -import Projection from 'ol/proj/Projection'; -import Tile from 'ol/Tile'; -import { TileCoord } from 'ol/tilecoord'; -import TileGrid from 'ol/tilegrid/TileGrid'; +import Projection from '../proj/Projection'; +import Tile from '../Tile'; +import { TileCoord } from '../tilecoord'; +import TileGrid from '../tilegrid/TileGrid'; + export type FunctionType = (() => void); export default class ReprojTile extends Tile { constructor(sourceProj: Projection, sourceTileGrid: TileGrid, targetProj: Projection, targetTileGrid: TileGrid, tileCoord: TileCoord, wrappedTileCoord: TileCoord, pixelRatio: number, gutter: number, getTileFunction: FunctionType, opt_errorThreshold?: number, opt_renderEdges?: boolean); diff --git a/@types/ol/reproj/Triangulation.d.ts b/@types/ol/reproj/Triangulation.d.ts index 027b2f24..55177964 100644 --- a/@types/ol/reproj/Triangulation.d.ts +++ b/@types/ol/reproj/Triangulation.d.ts @@ -1,6 +1,7 @@ -import { Coordinate } from 'ol/coordinate'; -import { Extent } from 'ol/extent'; -import Projection from 'ol/proj/Projection'; +import { Coordinate } from '../coordinate'; +import { Extent } from '../extent'; +import Projection from '../proj/Projection'; + export interface Triangle { source: Coordinate[]; target: Coordinate[]; diff --git a/@types/ol/source.d.ts b/@types/ol/source.d.ts new file mode 100644 index 00000000..04031636 --- /dev/null +++ b/@types/ol/source.d.ts @@ -0,0 +1,26 @@ +export { default as BingMaps } from './source/BingMaps'; +export { default as CartoDB } from './source/CartoDB'; +export { default as Cluster } from './source/Cluster'; +export { default as Image } from './source/Image'; +export { default as ImageArcGISRest } from './source/ImageArcGISRest'; +export { default as ImageCanvas } from './source/ImageCanvas'; +export { default as ImageMapGuide } from './source/ImageMapGuide'; +export { default as ImageStatic } from './source/ImageStatic'; +export { default as ImageWMS } from './source/ImageWMS'; +export { default as OSM } from './source/OSM'; +export { default as Raster } from './source/Raster'; +export { default as Source } from './source/Source'; +export { default as Stamen } from './source/Stamen'; +export { default as Tile } from './source/Tile'; +export { default as TileArcGISRest } from './source/TileArcGISRest'; +export { default as TileDebug } from './source/TileDebug'; +export { default as TileImage } from './source/TileImage'; +export { default as TileJSON } from './source/TileJSON'; +export { default as TileWMS } from './source/TileWMS'; +export { default as UrlTile } from './source/UrlTile'; +export { default as UTFGrid } from './source/UTFGrid'; +export { default as Vector } from './source/Vector'; +export { default as VectorTile } from './source/VectorTile'; +export { default as WMTS } from './source/WMTS'; +export { default as XYZ } from './source/XYZ'; +export { default as Zoomify } from './source/Zoomify'; diff --git a/@types/ol/source/BingMaps.d.ts b/@types/ol/source/BingMaps.d.ts index cd649849..1220c51e 100644 --- a/@types/ol/source/BingMaps.d.ts +++ b/@types/ol/source/BingMaps.d.ts @@ -1,9 +1,10 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { ObjectEvent } from 'ol/Object'; -import { TileSourceEvent } from 'ol/source/Tile'; -import TileImage from 'ol/source/TileImage'; -import { LoadFunction } from 'ol/Tile'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import { LoadFunction } from '../Tile'; +import { TileSourceEvent } from './Tile'; +import TileImage from './TileImage'; + export default class BingMaps extends TileImage { constructor(options: Options); getApiKey(): string; diff --git a/@types/ol/source/CartoDB.d.ts b/@types/ol/source/CartoDB.d.ts index 24561b7e..424cd0e9 100644 --- a/@types/ol/source/CartoDB.d.ts +++ b/@types/ol/source/CartoDB.d.ts @@ -1,15 +1,16 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import { AttributionLike } from 'ol/source/Source'; -import { TileSourceEvent } from 'ol/source/Tile'; -import XYZ from 'ol/source/XYZ'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import { AttributionLike } from './Source'; +import { TileSourceEvent } from './Tile'; +import XYZ from './XYZ'; + export default class CartoDB extends XYZ { constructor(options: Options); - getConfig(): { [key: string]: any }; - setConfig(config: { [key: string]: any }): void; - updateConfig(config: { [key: string]: any }): void; + getConfig(): any; + setConfig(config: any): void; + updateConfig(config: any): 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; @@ -31,7 +32,7 @@ export default class CartoDB extends XYZ { } export interface CartoDBLayerInfo { layergroupid: string; - cdn_url: { [key: string]: any }; + cdn_url: any; } export interface Options { attributions?: AttributionLike; @@ -41,7 +42,7 @@ export interface Options { maxZoom?: number; minZoom?: number; wrapX?: boolean; - config?: { [key: string]: any }; + config?: any; map?: string; account: string; } diff --git a/@types/ol/source/Cluster.d.ts b/@types/ol/source/Cluster.d.ts index 45e37ce9..afc483ca 100644 --- a/@types/ol/source/Cluster.d.ts +++ b/@types/ol/source/Cluster.d.ts @@ -1,10 +1,11 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Feature from 'ol/Feature'; -import Point from 'ol/geom/Point'; -import { ObjectEvent } from 'ol/Object'; -import { AttributionLike } from 'ol/source/Source'; -import VectorSource, { VectorSourceEvent } from 'ol/source/Vector'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import Feature from '../Feature'; +import Point from '../geom/Point'; +import { ObjectEvent } from '../Object'; +import { AttributionLike } from './Source'; +import VectorSource, { VectorSourceEvent } from './Vector'; + export default class Cluster extends VectorSource { constructor(options: Options); protected distance: number; diff --git a/@types/ol/source/Image.d.ts b/@types/ol/source/Image.d.ts index 21c047a3..1bc7b2d4 100644 --- a/@types/ol/source/Image.d.ts +++ b/@types/ol/source/Image.d.ts @@ -1,13 +1,14 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import ImageWrapper from 'ol/Image'; -import ImageBase from 'ol/ImageBase'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; -import Source, { AttributionLike } from 'ol/source/Source'; -import State from 'ol/source/State'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import ImageWrapper from '../Image'; +import ImageBase from '../ImageBase'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import Projection from '../proj/Projection'; +import Source, { AttributionLike } from './Source'; +import State from './State'; + export function defaultImageLoadFunction(image: ImageWrapper, src: string): void; export default class ImageSource extends Source { constructor(options: Options); diff --git a/@types/ol/source/ImageArcGISRest.d.ts b/@types/ol/source/ImageArcGISRest.d.ts index 3ae16e82..b0206fa7 100644 --- a/@types/ol/source/ImageArcGISRest.d.ts +++ b/@types/ol/source/ImageArcGISRest.d.ts @@ -1,18 +1,19 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { LoadFunction } from 'ol/Image'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import ImageSource, { ImageSourceEvent } from 'ol/source/Image'; -import { AttributionLike } from 'ol/source/Source'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { LoadFunction } from '../Image'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import ImageSource, { ImageSourceEvent } from './Image'; +import { AttributionLike } from './Source'; + export default class ImageArcGISRest extends ImageSource { constructor(opt_options?: Options); getImageLoadFunction(): LoadFunction; - getParams(): { [key: string]: any }; + getParams(): any; getUrl(): string; setImageLoadFunction(imageLoadFunction: LoadFunction): void; setUrl(url: string): void; - updateParams(params: { [key: string]: any }): void; + updateParams(params: any): 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; diff --git a/@types/ol/source/ImageCanvas.d.ts b/@types/ol/source/ImageCanvas.d.ts index 8b8c214d..715a240d 100644 --- a/@types/ol/source/ImageCanvas.d.ts +++ b/@types/ol/source/ImageCanvas.d.ts @@ -1,14 +1,15 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import ImageCanvas from 'ol/ImageCanvas'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; -import { Size } from 'ol/size'; -import ImageSource from 'ol/source/Image'; -import { AttributionLike } from 'ol/source/Source'; -import State from 'ol/source/State'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import ImageCanvas from '../ImageCanvas'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import Projection from '../proj/Projection'; +import { Size } from '../size'; +import ImageSource from './Image'; +import { AttributionLike } from './Source'; +import State from './State'; + export type FunctionType = ((this: ImageCanvas, param1: Extent, param2: number, param3: number, param4: Size, param5: Projection) => HTMLCanvasElement); export default class ImageCanvasSource extends ImageSource { constructor(opt_options?: Options); diff --git a/@types/ol/source/ImageMapGuide.d.ts b/@types/ol/source/ImageMapGuide.d.ts index 0341875c..9c93e9b0 100644 --- a/@types/ol/source/ImageMapGuide.d.ts +++ b/@types/ol/source/ImageMapGuide.d.ts @@ -1,19 +1,20 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import { LoadFunction } from 'ol/Image'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; -import { Size } from 'ol/size'; -import ImageSource, { ImageSourceEvent } from 'ol/source/Image'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import { LoadFunction } from '../Image'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import Projection from '../proj/Projection'; +import { Size } from '../size'; +import ImageSource, { ImageSourceEvent } from './Image'; + export default class ImageMapGuide extends ImageSource { constructor(options: Options); getImageLoadFunction(): LoadFunction; - getParams(): { [key: string]: any }; + getParams(): any; getUrl(baseUrl: string, params: { [key: string]: any }, extent: Extent, size: Size, projection: Projection): string; setImageLoadFunction(imageLoadFunction: LoadFunction): void; - updateParams(params: { [key: string]: any }): void; + updateParams(params: any): 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; @@ -44,5 +45,5 @@ export interface Options { ratio?: number; resolutions?: number[]; imageLoadFunction?: LoadFunction; - params?: { [key: string]: any }; + params?: any; } diff --git a/@types/ol/source/ImageStatic.d.ts b/@types/ol/source/ImageStatic.d.ts index 28e90147..c7dfcee4 100644 --- a/@types/ol/source/ImageStatic.d.ts +++ b/@types/ol/source/ImageStatic.d.ts @@ -1,12 +1,13 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import { LoadFunction } from 'ol/Image'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import { Size } from 'ol/size'; -import ImageSource from 'ol/source/Image'; -import { AttributionLike } from 'ol/source/Source'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import { LoadFunction } from '../Image'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import { Size } from '../size'; +import ImageSource from './Image'; +import { AttributionLike } from './Source'; + export interface Options { attributions?: AttributionLike; crossOrigin?: string; diff --git a/@types/ol/source/ImageWMS.d.ts b/@types/ol/source/ImageWMS.d.ts index 2d734455..9e394160 100644 --- a/@types/ol/source/ImageWMS.d.ts +++ b/@types/ol/source/ImageWMS.d.ts @@ -1,21 +1,22 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { LoadFunction } from 'ol/Image'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import ImageSource, { ImageSourceEvent } from 'ol/source/Image'; -import { AttributionLike } from 'ol/source/Source'; -import WMSServerType from 'ol/source/WMSServerType'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { LoadFunction } from '../Image'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import ImageSource, { ImageSourceEvent } from './Image'; +import { AttributionLike } from './Source'; +import WMSServerType from './WMSServerType'; + export default class ImageWMS extends ImageSource { constructor(opt_options?: Options); - getGetFeatureInfoUrl(coordinate: Coordinate, resolution: number, projection: ProjectionLike, params: { [key: string]: any }): string; + getGetFeatureInfoUrl(coordinate: Coordinate, resolution: number, projection: ProjectionLike, params: any): string; getImageLoadFunction(): LoadFunction; - getParams(): { [key: string]: any }; + getParams(): any; getUrl(): string; setImageLoadFunction(imageLoadFunction: LoadFunction): void; setUrl(url: string): void; - updateParams(params: { [key: string]: any }): void; + updateParams(params: any): 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; diff --git a/@types/ol/source/OSM.d.ts b/@types/ol/source/OSM.d.ts index 9ede80c3..3183c619 100644 --- a/@types/ol/source/OSM.d.ts +++ b/@types/ol/source/OSM.d.ts @@ -1,10 +1,11 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { ObjectEvent } from 'ol/Object'; -import { AttributionLike } from 'ol/source/Source'; -import { TileSourceEvent } from 'ol/source/Tile'; -import XYZ from 'ol/source/XYZ'; -import { LoadFunction } from 'ol/Tile'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import { LoadFunction } from '../Tile'; +import { AttributionLike } from './Source'; +import { TileSourceEvent } from './Tile'; +import XYZ from './XYZ'; + export const ATTRIBUTION: string; export interface Options { attributions?: AttributionLike; diff --git a/@types/ol/source/Raster.d.ts b/@types/ol/source/Raster.d.ts index 30c91837..c8361ac0 100644 --- a/@types/ol/source/Raster.d.ts +++ b/@types/ol/source/Raster.d.ts @@ -1,24 +1,25 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import Layer, { State } from 'ol/layer/Layer'; -import { ObjectEvent } from 'ol/Object'; -import { FrameState } from 'ol/PluggableMap'; -import CanvasLayerRenderer from 'ol/renderer/canvas/Layer'; -import ImageSource from 'ol/source/Image'; -import Source from 'ol/source/Source'; -import TileSource from 'ol/source/Tile'; -export type Operation = ((param0: number[][] | ImageData[], param1: { [key: string]: any }) => number[] | ImageData); +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import Layer, { State } from '../layer/Layer'; +import { ObjectEvent } from '../Object'; +import { FrameState } from '../PluggableMap'; +import CanvasLayerRenderer from '../renderer/canvas/Layer'; +import ImageSource from './Image'; +import Source from './Source'; +import TileSource from './Tile'; + +export type Operation = ((param0: number[][] | ImageData[], param1: object) => number[] | ImageData); export interface Options { sources: any[]; operation?: Operation; - lib?: { [key: string]: any }; + lib?: any; threads?: number; operationType?: 'pixel' | 'image'; } export default class RasterSource extends ImageSource { constructor(options: Options); - setOperation(operation: Operation, opt_lib?: { [key: string]: any }): void; + setOperation(operation: Operation, opt_lib?: any): 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; @@ -36,8 +37,8 @@ export default class RasterSource extends ImageSource { un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void; } export class RasterSourceEvent extends Event { - constructor(type: string, frameState: FrameState, data: { [key: string]: any }); - data: { [key: string]: any }; + constructor(type: string, frameState: FrameState, data: any); + data: any; extent: Extent; resolution: number; } diff --git a/@types/ol/source/Source.d.ts b/@types/ol/source/Source.d.ts index fef30d9f..757a811b 100644 --- a/@types/ol/source/Source.d.ts +++ b/@types/ol/source/Source.d.ts @@ -1,10 +1,11 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import BaseObject, { ObjectEvent } from 'ol/Object'; -import { FrameState } from 'ol/PluggableMap'; -import { ProjectionLike } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; -import State from 'ol/source/State'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import BaseObject, { ObjectEvent } from '../Object'; +import { FrameState } from '../PluggableMap'; +import { ProjectionLike } from '../proj'; +import Projection from '../proj/Projection'; +import State from './State'; + export type Attribution = ((param0: FrameState) => string | string[]); export type AttributionLike = string | string[] | Attribution; export interface Options { diff --git a/@types/ol/source/Stamen.d.ts b/@types/ol/source/Stamen.d.ts index 8f475070..62d99445 100644 --- a/@types/ol/source/Stamen.d.ts +++ b/@types/ol/source/Stamen.d.ts @@ -1,9 +1,10 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { ObjectEvent } from 'ol/Object'; -import { TileSourceEvent } from 'ol/source/Tile'; -import XYZ from 'ol/source/XYZ'; -import { LoadFunction } from 'ol/Tile'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import { LoadFunction } from '../Tile'; +import { TileSourceEvent } from './Tile'; +import XYZ from './XYZ'; + export interface Options { cacheSize?: number; layer: string; diff --git a/@types/ol/source/Tile.d.ts b/@types/ol/source/Tile.d.ts index 158e13eb..78d8fd4b 100644 --- a/@types/ol/source/Tile.d.ts +++ b/@types/ol/source/Tile.d.ts @@ -1,16 +1,17 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; -import { Size } from 'ol/size'; -import Source, { AttributionLike } from 'ol/source/Source'; -import State from 'ol/source/State'; -import Tile, { Options as Options_1 } from 'ol/Tile'; -import TileCache from 'ol/TileCache'; -import { TileCoord } from 'ol/tilecoord'; -import TileGrid from 'ol/tilegrid/TileGrid'; -import TileRange from 'ol/TileRange'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import Projection from '../proj/Projection'; +import { Size } from '../size'; +import Tile, { Options as Options_1 } from '../Tile'; +import TileCache from '../TileCache'; +import { TileCoord } from '../tilecoord'; +import TileGrid from '../tilegrid/TileGrid'; +import TileRange from '../TileRange'; +import Source, { AttributionLike } from './Source'; +import State from './State'; + export class TileSourceEvent extends Event { constructor(); tile: Tile; diff --git a/@types/ol/source/TileArcGISRest.d.ts b/@types/ol/source/TileArcGISRest.d.ts index 7d81d6fa..2cc6c106 100644 --- a/@types/ol/source/TileArcGISRest.d.ts +++ b/@types/ol/source/TileArcGISRest.d.ts @@ -1,14 +1,15 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; -import { AttributionLike } from 'ol/source/Source'; -import { TileSourceEvent } from 'ol/source/Tile'; -import TileImage from 'ol/source/TileImage'; -import { LoadFunction } from 'ol/Tile'; -import { TileCoord } from 'ol/tilecoord'; -import TileGrid from 'ol/tilegrid/TileGrid'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import Projection from '../proj/Projection'; +import { LoadFunction } from '../Tile'; +import { TileCoord } from '../tilecoord'; +import TileGrid from '../tilegrid/TileGrid'; +import { AttributionLike } from './Source'; +import { TileSourceEvent } from './Tile'; +import TileImage from './TileImage'; + export interface Options { attributions?: AttributionLike; cacheSize?: number; @@ -25,8 +26,8 @@ export interface Options { } export default class TileArcGISRest extends TileImage { constructor(opt_options?: Options); - getParams(): { [key: string]: any }; - updateParams(params: { [key: string]: any }): void; + getParams(): any; + updateParams(params: any): 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; diff --git a/@types/ol/source/TileDebug.d.ts b/@types/ol/source/TileDebug.d.ts index 613742f6..8e12057d 100644 --- a/@types/ol/source/TileDebug.d.ts +++ b/@types/ol/source/TileDebug.d.ts @@ -1,12 +1,13 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import { Size } from 'ol/size'; -import TileSource from 'ol/source/Tile'; -import Tile from 'ol/Tile'; -import { TileCoord } from 'ol/tilecoord'; -import TileGrid from 'ol/tilegrid/TileGrid'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import { Size } from '../size'; +import Tile from '../Tile'; +import { TileCoord } from '../tilecoord'; +import TileGrid from '../tilegrid/TileGrid'; +import TileSource from './Tile'; + export interface Options { projection?: ProjectionLike; tileGrid?: TileGrid; diff --git a/@types/ol/source/TileImage.d.ts b/@types/ol/source/TileImage.d.ts index fb3d9dac..326fbeb3 100644 --- a/@types/ol/source/TileImage.d.ts +++ b/@types/ol/source/TileImage.d.ts @@ -1,16 +1,17 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import ImageTile from 'ol/ImageTile'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; -import { AttributionLike } from 'ol/source/Source'; -import State from 'ol/source/State'; -import { TileSourceEvent } from 'ol/source/Tile'; -import UrlTile from 'ol/source/UrlTile'; -import Tile, { LoadFunction, UrlFunction } from 'ol/Tile'; -import TileCache from 'ol/TileCache'; -import TileGrid from 'ol/tilegrid/TileGrid'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import ImageTile from '../ImageTile'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import Projection from '../proj/Projection'; +import Tile, { LoadFunction, UrlFunction } from '../Tile'; +import TileCache from '../TileCache'; +import TileGrid from '../tilegrid/TileGrid'; +import { AttributionLike } from './Source'; +import State from './State'; +import { TileSourceEvent } from './Tile'; +import UrlTile from './UrlTile'; + export interface Options { attributions?: AttributionLike; attributionsCollapsible?: boolean; diff --git a/@types/ol/source/TileJSON.d.ts b/@types/ol/source/TileJSON.d.ts index 726dd13c..12c12df4 100644 --- a/@types/ol/source/TileJSON.d.ts +++ b/@types/ol/source/TileJSON.d.ts @@ -1,10 +1,11 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { ObjectEvent } from 'ol/Object'; -import { AttributionLike } from 'ol/source/Source'; -import { TileSourceEvent } from 'ol/source/Tile'; -import TileImage from 'ol/source/TileImage'; -import { LoadFunction } from 'ol/Tile'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import { LoadFunction } from '../Tile'; +import { AttributionLike } from './Source'; +import { TileSourceEvent } from './Tile'; +import TileImage from './TileImage'; + export interface Config { name?: string; description?: string; diff --git a/@types/ol/source/TileWMS.d.ts b/@types/ol/source/TileWMS.d.ts index ea30f49a..6ead462c 100644 --- a/@types/ol/source/TileWMS.d.ts +++ b/@types/ol/source/TileWMS.d.ts @@ -1,17 +1,18 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import ImageTile from 'ol/ImageTile'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; -import { AttributionLike } from 'ol/source/Source'; -import { TileSourceEvent } from 'ol/source/Tile'; -import TileImage from 'ol/source/TileImage'; -import WMSServerType from 'ol/source/WMSServerType'; -import { LoadFunction } from 'ol/Tile'; -import { TileCoord } from 'ol/tilecoord'; -import TileGrid from 'ol/tilegrid/TileGrid'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import ImageTile from '../ImageTile'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import Projection from '../proj/Projection'; +import { LoadFunction } from '../Tile'; +import { TileCoord } from '../tilecoord'; +import TileGrid from '../tilegrid/TileGrid'; +import { AttributionLike } from './Source'; +import { TileSourceEvent } from './Tile'; +import TileImage from './TileImage'; +import WMSServerType from './WMSServerType'; + export interface Options { attributions?: AttributionLike; cacheSize?: number; @@ -32,9 +33,9 @@ export interface Options { } export default class TileWMS extends TileImage { constructor(opt_options?: Options); - getGetFeatureInfoUrl(coordinate: Coordinate, resolution: number, projection: ProjectionLike, params: { [key: string]: any }): string; - getParams(): { [key: string]: any }; - updateParams(params: { [key: string]: any }): void; + getGetFeatureInfoUrl(coordinate: Coordinate, resolution: number, projection: ProjectionLike, params: any): string; + getParams(): any; + updateParams(params: any): 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; diff --git a/@types/ol/source/UTFGrid.d.ts b/@types/ol/source/UTFGrid.d.ts index 79591318..a8a22de0 100644 --- a/@types/ol/source/UTFGrid.d.ts +++ b/@types/ol/source/UTFGrid.d.ts @@ -1,13 +1,14 @@ -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import { ObjectEvent } from 'ol/Object'; -import TileSource from 'ol/source/Tile'; -import { Config } from 'ol/source/TileJSON'; -import Tile from 'ol/Tile'; -import { TileCoord } from 'ol/tilecoord'; -import TileState from 'ol/TileState'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import { ObjectEvent } from '../Object'; +import Tile from '../Tile'; +import { TileCoord } from '../tilecoord'; +import TileState from '../TileState'; +import TileSource from './Tile'; +import { Config } from './TileJSON'; + export class CustomTile extends Tile { constructor(tileCoord: TileCoord, state: TileState, src: string, extent: Extent, preemptive: boolean, jsonp: boolean); forDataAtCoordinate(coordinate: Coordinate, callback: ((this: T, param1: any) => void), opt_this?: T, opt_request?: boolean): void; @@ -39,5 +40,5 @@ export default class UTFGrid extends TileSource { export interface UTFGridJSON { grid: string[]; keys: string[]; - data?: { [key: string]: { [key: string]: any } }; + data?: { [key: string]: object }; } diff --git a/@types/ol/source/UrlTile.d.ts b/@types/ol/source/UrlTile.d.ts index 2a31e456..b61b9bf4 100644 --- a/@types/ol/source/UrlTile.d.ts +++ b/@types/ol/source/UrlTile.d.ts @@ -1,12 +1,13 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import { AttributionLike } from 'ol/source/Source'; -import State from 'ol/source/State'; -import TileSource, { TileSourceEvent } from 'ol/source/Tile'; -import { LoadFunction, UrlFunction } from 'ol/Tile'; -import TileGrid from 'ol/tilegrid/TileGrid'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import { LoadFunction, UrlFunction } from '../Tile'; +import TileGrid from '../tilegrid/TileGrid'; +import { AttributionLike } from './Source'; +import State from './State'; +import TileSource, { TileSourceEvent } from './Tile'; + export interface Options { attributions?: AttributionLike; attributionsCollapsible?: boolean; diff --git a/@types/ol/source/Vector.d.ts b/@types/ol/source/Vector.d.ts index d694dc3a..6a4d86cc 100644 --- a/@types/ol/source/Vector.d.ts +++ b/@types/ol/source/Vector.d.ts @@ -1,14 +1,15 @@ -import Collection from 'ol/Collection'; -import { Coordinate } from 'ol/coordinate'; -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import Feature from 'ol/Feature'; -import { FeatureLoader, FeatureUrlFunction } from 'ol/featureloader'; -import FeatureFormat from 'ol/format/Feature'; -import { ObjectEvent } from 'ol/Object'; -import Projection from 'ol/proj/Projection'; -import Source, { AttributionLike } from 'ol/source/Source'; +import Collection from '../Collection'; +import { Coordinate } from '../coordinate'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import Feature from '../Feature'; +import { FeatureLoader, FeatureUrlFunction } from '../featureloader'; +import FeatureFormat from '../format/Feature'; +import { ObjectEvent } from '../Object'; +import Projection from '../proj/Projection'; +import Source, { AttributionLike } from './Source'; + export class VectorSourceEvent extends Event { constructor(); feature: Feature; diff --git a/@types/ol/source/VectorTile.d.ts b/@types/ol/source/VectorTile.d.ts index 2114b415..332650e6 100644 --- a/@types/ol/source/VectorTile.d.ts +++ b/@types/ol/source/VectorTile.d.ts @@ -1,17 +1,18 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import FeatureFormat from 'ol/format/Feature'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import { Size } from 'ol/size'; -import { AttributionLike } from 'ol/source/Source'; -import State from 'ol/source/State'; -import { TileSourceEvent } from 'ol/source/Tile'; -import UrlTile from 'ol/source/UrlTile'; -import { LoadFunction, UrlFunction } from 'ol/Tile'; -import TileGrid from 'ol/tilegrid/TileGrid'; -import VectorTile_1 from 'ol/VectorTile'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import FeatureFormat from '../format/Feature'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import { Size } from '../size'; +import { LoadFunction, UrlFunction } from '../Tile'; +import TileGrid from '../tilegrid/TileGrid'; +import VectorTile_1 from '../VectorTile'; +import { AttributionLike } from './Source'; +import State from './State'; +import { TileSourceEvent } from './Tile'; +import UrlTile from './UrlTile'; + export interface Options { attributions?: AttributionLike; cacheSize?: number; diff --git a/@types/ol/source/WMTS.d.ts b/@types/ol/source/WMTS.d.ts index cd83f39b..0a53bfd7 100644 --- a/@types/ol/source/WMTS.d.ts +++ b/@types/ol/source/WMTS.d.ts @@ -1,15 +1,16 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import ImageTile from 'ol/ImageTile'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import { AttributionLike } from 'ol/source/Source'; -import { TileSourceEvent } from 'ol/source/Tile'; -import TileImage from 'ol/source/TileImage'; -import WMTSRequestEncoding from 'ol/source/WMTSRequestEncoding'; -import { UrlFunction, LoadFunction } from 'ol/Tile'; -import WMTSTileGrid from 'ol/tilegrid/WMTS'; -export function optionsFromCapabilities(wmtsCap: { [key: string]: any }, config: { [key: string]: any }): Options; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import ImageTile from '../ImageTile'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import { UrlFunction, LoadFunction } from '../Tile'; +import WMTSTileGrid from '../tilegrid/WMTS'; +import { AttributionLike } from './Source'; +import { TileSourceEvent } from './Tile'; +import TileImage from './TileImage'; +import WMTSRequestEncoding from './WMTSRequestEncoding'; + +export function optionsFromCapabilities(wmtsCap: any, config: any): Options; export interface Options { attributions?: AttributionLike; cacheSize?: number; @@ -25,7 +26,7 @@ export interface Options { format?: string; version?: string; matrixSet: string; - dimensions?: { [key: string]: any }; + dimensions?: any; url?: string; tileLoadFunction?: LoadFunction; urls?: string[]; @@ -34,14 +35,14 @@ export interface Options { } export default class WMTS extends TileImage { constructor(options: Options); - getDimensions(): { [key: string]: any }; + getDimensions(): any; getFormat(): string; getLayer(): string; getMatrixSet(): string; getRequestEncoding(): WMTSRequestEncoding; getStyle(): string; getVersion(): string; - updateDimensions(dimensions: { [key: string]: any }): void; + updateDimensions(dimensions: any): 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; diff --git a/@types/ol/source/XYZ.d.ts b/@types/ol/source/XYZ.d.ts index 30367417..27b25597 100644 --- a/@types/ol/source/XYZ.d.ts +++ b/@types/ol/source/XYZ.d.ts @@ -1,13 +1,14 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import { Size } from 'ol/size'; -import { AttributionLike } from 'ol/source/Source'; -import { TileSourceEvent } from 'ol/source/Tile'; -import TileImage from 'ol/source/TileImage'; -import { LoadFunction, UrlFunction } from 'ol/Tile'; -import TileGrid from 'ol/tilegrid/TileGrid'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import { Size } from '../size'; +import { LoadFunction, UrlFunction } from '../Tile'; +import TileGrid from '../tilegrid/TileGrid'; +import { AttributionLike } from './Source'; +import { TileSourceEvent } from './Tile'; +import TileImage from './TileImage'; + export interface Options { attributions?: AttributionLike; attributionsCollapsible?: boolean; diff --git a/@types/ol/source/Zoomify.d.ts b/@types/ol/source/Zoomify.d.ts index 63b2042e..13ce0612 100644 --- a/@types/ol/source/Zoomify.d.ts +++ b/@types/ol/source/Zoomify.d.ts @@ -1,17 +1,18 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import { Extent } from 'ol/extent'; -import ImageTile from 'ol/ImageTile'; -import { ObjectEvent } from 'ol/Object'; -import { ProjectionLike } from 'ol/proj'; -import { Size } from 'ol/size'; -import { AttributionLike } from 'ol/source/Source'; -import { TileSourceEvent } from 'ol/source/Tile'; -import TileImage from 'ol/source/TileImage'; -import { LoadFunction, Options as Options_1 } from 'ol/Tile'; -import { TileCoord } from 'ol/tilecoord'; -import TileGrid from 'ol/tilegrid/TileGrid'; -import TileState from 'ol/TileState'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import { Extent } from '../extent'; +import ImageTile from '../ImageTile'; +import { ObjectEvent } from '../Object'; +import { ProjectionLike } from '../proj'; +import { Size } from '../size'; +import { LoadFunction, Options as Options_1 } from '../Tile'; +import { TileCoord } from '../tilecoord'; +import TileGrid from '../tilegrid/TileGrid'; +import TileState from '../TileState'; +import { AttributionLike } from './Source'; +import { TileSourceEvent } from './Tile'; +import TileImage from './TileImage'; + export class CustomTile extends ImageTile { constructor(tileGrid: TileGrid, tileCoord: TileCoord, state: TileState, src: string, crossOrigin: string, tileLoadFunction: LoadFunction, opt_options?: Options_1); } diff --git a/@types/ol/source/index.d.ts b/@types/ol/source/index.d.ts deleted file mode 100644 index 67bb322c..00000000 --- a/@types/ol/source/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -export { default as BingMaps } from 'ol/source/BingMaps'; -export { default as CartoDB } from 'ol/source/CartoDB'; -export { default as Cluster } from 'ol/source/Cluster'; -export { default as Image } from 'ol/source/Image'; -export { default as ImageArcGISRest } from 'ol/source/ImageArcGISRest'; -export { default as ImageCanvas } from 'ol/source/ImageCanvas'; -export { default as ImageMapGuide } from 'ol/source/ImageMapGuide'; -export { default as ImageStatic } from 'ol/source/ImageStatic'; -export { default as ImageWMS } from 'ol/source/ImageWMS'; -export { default as OSM } from 'ol/source/OSM'; -export { default as Raster } from 'ol/source/Raster'; -export { default as Source } from 'ol/source/Source'; -export { default as Stamen } from 'ol/source/Stamen'; -export { default as Tile } from 'ol/source/Tile'; -export { default as TileArcGISRest } from 'ol/source/TileArcGISRest'; -export { default as TileDebug } from 'ol/source/TileDebug'; -export { default as TileImage } from 'ol/source/TileImage'; -export { default as TileJSON } from 'ol/source/TileJSON'; -export { default as TileWMS } from 'ol/source/TileWMS'; -export { default as UrlTile } from 'ol/source/UrlTile'; -export { default as UTFGrid } from 'ol/source/UTFGrid'; -export { default as Vector } from 'ol/source/Vector'; -export { default as VectorTile } from 'ol/source/VectorTile'; -export { default as WMTS } from 'ol/source/WMTS'; -export { default as XYZ } from 'ol/source/XYZ'; -export { default as Zoomify } from 'ol/source/Zoomify'; diff --git a/@types/ol/sphere.d.ts b/@types/ol/sphere.d.ts index 583ff560..57f5c578 100644 --- a/@types/ol/sphere.d.ts +++ b/@types/ol/sphere.d.ts @@ -1,6 +1,7 @@ -import { Coordinate } from 'ol/coordinate'; -import Geometry from 'ol/geom/Geometry'; -import { ProjectionLike } from 'ol/proj'; +import { Coordinate } from './coordinate'; +import Geometry from './geom/Geometry'; +import { ProjectionLike } from './proj'; + export function getArea(geometry: Geometry, opt_options?: SphereMetricOptions): number; export function getDistance(c1: any[], c2: any[], opt_radius?: number): number; export function getLength(geometry: Geometry, opt_options?: SphereMetricOptions): number; diff --git a/@types/ol/structs/LRUCache.d.ts b/@types/ol/structs/LRUCache.d.ts index 71d91c53..1b3ef50f 100644 --- a/@types/ol/structs/LRUCache.d.ts +++ b/@types/ol/structs/LRUCache.d.ts @@ -1,10 +1,11 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import Target from 'ol/events/Target'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import Target from '../events/Target'; + export interface Entry { key_: string; - newer: { [key: string]: any }; - older: { [key: string]: any }; + newer: any; + older: any; value_: any; } export default class LRUCache extends Target { diff --git a/@types/ol/structs/RBush.d.ts b/@types/ol/structs/RBush.d.ts index 2ddbb5ff..59f1fb8c 100644 --- a/@types/ol/structs/RBush.d.ts +++ b/@types/ol/structs/RBush.d.ts @@ -1,10 +1,11 @@ -import { Extent } from 'ol/extent'; +import { Extent } from '../extent'; + export interface Entry { minX: number; minY: number; maxX: number; maxY: number; - value?: { [key: string]: any }; + value?: any; } export default class RBush { constructor(opt_maxEntries?: number); diff --git a/@types/ol/style.d.ts b/@types/ol/style.d.ts new file mode 100644 index 00000000..2e63d9bd --- /dev/null +++ b/@types/ol/style.d.ts @@ -0,0 +1,11 @@ +export { default as Atlas } from './style/Atlas'; +export { default as AtlasManager } from './style/AtlasManager'; +export { default as Circle } from './style/Circle'; +export { default as Fill } from './style/Fill'; +export { default as Icon } from './style/Icon'; +export { default as IconImage } from './style/IconImage'; +export { default as Image } from './style/Image'; +export { default as RegularShape } from './style/RegularShape'; +export { default as Stroke } from './style/Stroke'; +export { default as Style } from './style/Style'; +export { default as Text } from './style/Text'; diff --git a/@types/ol/style/Atlas.d.ts b/@types/ol/style/Atlas.d.ts index 6e34165d..c76ef2e5 100644 --- a/@types/ol/style/Atlas.d.ts +++ b/@types/ol/style/Atlas.d.ts @@ -1,6 +1,6 @@ export default class Atlas { constructor(size: number, space: number); - add(id: string, width: number, height: number, renderCallback: ((param0: CanvasRenderingContext2D, param1: number, param2: number) => void), opt_this?: { [key: string]: any }): AtlasInfo; + add(id: string, width: number, height: number, renderCallback: ((param0: CanvasRenderingContext2D, param1: number, param2: number) => void), opt_this?: any): AtlasInfo; get(id: string): AtlasInfo; } export interface AtlasBlock { diff --git a/@types/ol/style/AtlasManager.d.ts b/@types/ol/style/AtlasManager.d.ts index b40d98b3..0ad20ac6 100644 --- a/@types/ol/style/AtlasManager.d.ts +++ b/@types/ol/style/AtlasManager.d.ts @@ -1,6 +1,6 @@ export default class AtlasManager { constructor(opt_options?: Options); - add(id: string, width: number, height: number, renderCallback: ((param0: CanvasRenderingContext2D, param1: number, param2: number) => void), opt_renderHitCallback?: (() => void), opt_this?: { [key: string]: any }): AtlasManagerInfo; + add(id: string, width: number, height: number, renderCallback: ((param0: CanvasRenderingContext2D, param1: number, param2: number) => void), opt_renderHitCallback?: (() => void), opt_this?: any): AtlasManagerInfo; getInfo(id: string): AtlasManagerInfo; } export interface AtlasManagerInfo { diff --git a/@types/ol/style/Circle.d.ts b/@types/ol/style/Circle.d.ts index e7219b28..30c2f88a 100644 --- a/@types/ol/style/Circle.d.ts +++ b/@types/ol/style/Circle.d.ts @@ -1,7 +1,8 @@ -import AtlasManager from 'ol/style/AtlasManager'; -import Fill from 'ol/style/Fill'; -import RegularShape from 'ol/style/RegularShape'; -import Stroke from 'ol/style/Stroke'; +import AtlasManager from './AtlasManager'; +import Fill from './Fill'; +import RegularShape from './RegularShape'; +import Stroke from './Stroke'; + export default class CircleStyle extends RegularShape { constructor(opt_options?: Options); setRadius(radius: number): void; diff --git a/@types/ol/style/Fill.d.ts b/@types/ol/style/Fill.d.ts index 86a7dcfd..43f34cf4 100644 --- a/@types/ol/style/Fill.d.ts +++ b/@types/ol/style/Fill.d.ts @@ -1,5 +1,6 @@ -import { Color } from 'ol/color'; -import { ColorLike } from 'ol/colorlike'; +import { Color } from '../color'; +import { ColorLike } from '../colorlike'; + export default class Fill { constructor(opt_options?: Options); clone(): Fill; diff --git a/@types/ol/style/Icon.d.ts b/@types/ol/style/Icon.d.ts index b703a0bf..90d14135 100644 --- a/@types/ol/style/Icon.d.ts +++ b/@types/ol/style/Icon.d.ts @@ -1,8 +1,9 @@ -import { Color } from 'ol/color'; -import { Size } from 'ol/size'; -import IconAnchorUnits from 'ol/style/IconAnchorUnits'; -import IconOrigin from 'ol/style/IconOrigin'; -import ImageStyle from 'ol/style/Image'; +import { Color } from '../color'; +import { Size } from '../size'; +import IconAnchorUnits from './IconAnchorUnits'; +import IconOrigin from './IconOrigin'; +import ImageStyle from './Image'; + export default class Icon extends ImageStyle { constructor(opt_options?: Options); clone(): Icon; diff --git a/@types/ol/style/IconImage.d.ts b/@types/ol/style/IconImage.d.ts index dd338437..09c536f6 100644 --- a/@types/ol/style/IconImage.d.ts +++ b/@types/ol/style/IconImage.d.ts @@ -1,7 +1,8 @@ -import { Color } from 'ol/color'; -import Target from 'ol/events/Target'; -import ImageState from 'ol/ImageState'; -import { Size } from 'ol/size'; +import { Color } from '../color'; +import Target from '../events/Target'; +import ImageState from '../ImageState'; +import { Size } from '../size'; + export function get(image: HTMLImageElement | HTMLCanvasElement, src: string, size: Size, crossOrigin: string, imageState: ImageState, color: Color): IconImage; export default class IconImage extends Target { constructor(image: HTMLImageElement | HTMLCanvasElement, src: string, size: Size, crossOrigin: string, imageState: ImageState, color: Color); diff --git a/@types/ol/style/IconImageCache.d.ts b/@types/ol/style/IconImageCache.d.ts index 578f896e..84a61b74 100644 --- a/@types/ol/style/IconImageCache.d.ts +++ b/@types/ol/style/IconImageCache.d.ts @@ -1,5 +1,6 @@ -import { Color } from 'ol/color'; -import IconImage from 'ol/style/IconImage'; +import { Color } from '../color'; +import IconImage from './IconImage'; + export default class IconImageCache { constructor(); clear(): void; diff --git a/@types/ol/style/Image.d.ts b/@types/ol/style/Image.d.ts index 30485024..9fa84977 100644 --- a/@types/ol/style/Image.d.ts +++ b/@types/ol/style/Image.d.ts @@ -1,7 +1,8 @@ -import { EventsKey } from 'ol/events'; -import Event from 'ol/events/Event'; -import ImageState from 'ol/ImageState'; -import { Size } from 'ol/size'; +import { EventsKey } from '../events'; +import Event from '../events/Event'; +import ImageState from '../ImageState'; +import { Size } from '../size'; + export default class ImageStyle { constructor(options: Options); getScale(): number; diff --git a/@types/ol/style/RegularShape.d.ts b/@types/ol/style/RegularShape.d.ts index 80031f89..8d3671c8 100644 --- a/@types/ol/style/RegularShape.d.ts +++ b/@types/ol/style/RegularShape.d.ts @@ -1,8 +1,9 @@ -import { ColorLike } from 'ol/colorlike'; -import AtlasManager from 'ol/style/AtlasManager'; -import Fill from 'ol/style/Fill'; -import ImageStyle from 'ol/style/Image'; -import Stroke from 'ol/style/Stroke'; +import { ColorLike } from '../colorlike'; +import AtlasManager from './AtlasManager'; +import Fill from './Fill'; +import ImageStyle from './Image'; +import Stroke from './Stroke'; + export interface Options { fill?: Fill; points: number; diff --git a/@types/ol/style/Stroke.d.ts b/@types/ol/style/Stroke.d.ts index ae056e85..f3376f09 100644 --- a/@types/ol/style/Stroke.d.ts +++ b/@types/ol/style/Stroke.d.ts @@ -1,5 +1,6 @@ -import { Color } from 'ol/color'; -import { ColorLike } from 'ol/colorlike'; +import { Color } from '../color'; +import { ColorLike } from '../colorlike'; + export interface Options { color?: Color | ColorLike; lineCap?: string; diff --git a/@types/ol/style/Style.d.ts b/@types/ol/style/Style.d.ts index 2961ae34..9406525f 100644 --- a/@types/ol/style/Style.d.ts +++ b/@types/ol/style/Style.d.ts @@ -1,13 +1,14 @@ -import { Coordinate } from 'ol/coordinate'; -import { FeatureLike } from 'ol/Feature'; -import Geometry from 'ol/geom/Geometry'; -import GeometryType from 'ol/geom/GeometryType'; -import { State } from 'ol/render'; -import RenderFeature from 'ol/render/Feature'; -import Fill from 'ol/style/Fill'; -import ImageStyle from 'ol/style/Image'; -import Stroke from 'ol/style/Stroke'; -import Text from 'ol/style/Text'; +import { Coordinate } from '../coordinate'; +import { FeatureLike } from '../Feature'; +import Geometry from '../geom/Geometry'; +import GeometryType from '../geom/GeometryType'; +import { State } from '../render'; +import RenderFeature from '../render/Feature'; +import Fill from './Fill'; +import ImageStyle from './Image'; +import Stroke from './Stroke'; +import Text from './Text'; + export function createDefaultStyle(feature: FeatureLike, resolution: number): Style[]; export function createEditingStyle(): { [key in GeometryType]: Style[] }; export function toFunction(obj: StyleFunction | Style[] | Style): StyleFunction; diff --git a/@types/ol/style/Text.d.ts b/@types/ol/style/Text.d.ts index a1e7bae0..c76c4311 100644 --- a/@types/ol/style/Text.d.ts +++ b/@types/ol/style/Text.d.ts @@ -1,6 +1,7 @@ -import Fill from 'ol/style/Fill'; -import Stroke from 'ol/style/Stroke'; -import TextPlacement from 'ol/style/TextPlacement'; +import Fill from './Fill'; +import Stroke from './Stroke'; +import TextPlacement from './TextPlacement'; + export interface Options { font?: string; maxAngle?: number; diff --git a/@types/ol/style/index.d.ts b/@types/ol/style/index.d.ts deleted file mode 100644 index fef9ce07..00000000 --- a/@types/ol/style/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export { default as Atlas } from 'ol/style/Atlas'; -export { default as AtlasManager } from 'ol/style/AtlasManager'; -export { default as Circle } from 'ol/style/Circle'; -export { default as Fill } from 'ol/style/Fill'; -export { default as Icon } from 'ol/style/Icon'; -export { default as IconImage } from 'ol/style/IconImage'; -export { default as Image } from 'ol/style/Image'; -export { default as RegularShape } from 'ol/style/RegularShape'; -export { default as Stroke } from 'ol/style/Stroke'; -export { default as Style } from 'ol/style/Style'; -export { default as Text } from 'ol/style/Text'; diff --git a/@types/ol/tilecoord.d.ts b/@types/ol/tilecoord.d.ts index 8f109e93..c0b3045f 100644 --- a/@types/ol/tilecoord.d.ts +++ b/@types/ol/tilecoord.d.ts @@ -1,4 +1,5 @@ -import TileGrid from 'ol/tilegrid/TileGrid'; +import TileGrid from './tilegrid/TileGrid'; + export function createOrUpdate(z: number, x: number, y: number, opt_tileCoord?: TileCoord): TileCoord; export function fromKey(key: string): TileCoord; export function getKey(tileCoord: TileCoord): string; diff --git a/@types/ol/tilegrid/index.d.ts b/@types/ol/tilegrid.d.ts similarity index 71% rename from @types/ol/tilegrid/index.d.ts rename to @types/ol/tilegrid.d.ts index 4cb9493e..ad09d62f 100644 --- a/@types/ol/tilegrid/index.d.ts +++ b/@types/ol/tilegrid.d.ts @@ -1,10 +1,11 @@ -import { Extent } from 'ol/extent'; -import Corner from 'ol/extent/Corner'; -import { ProjectionLike } from 'ol/proj'; -import Projection from 'ol/proj/Projection'; -import { Size } from 'ol/size'; -import { TileCoord } from 'ol/tilecoord'; -import TileGrid from 'ol/tilegrid/TileGrid'; +import { Extent } from './extent'; +import Corner from './extent/Corner'; +import { ProjectionLike } from './proj'; +import Projection from './proj/Projection'; +import { Size } from './size'; +import { TileCoord } from './tilecoord'; +import TileGrid from './tilegrid/TileGrid'; + export function createForExtent(extent: Extent, opt_maxZoom?: number, opt_tileSize?: number | Size, opt_corner?: Corner): TileGrid; export function createForProjection(projection: ProjectionLike, opt_maxZoom?: number, opt_tileSize?: number | Size, opt_corner?: Corner): TileGrid; export function createXYZ(opt_options?: XYZOptions): TileGrid; diff --git a/@types/ol/tilegrid/TileGrid.d.ts b/@types/ol/tilegrid/TileGrid.d.ts index d3ac5f76..2a5127f7 100644 --- a/@types/ol/tilegrid/TileGrid.d.ts +++ b/@types/ol/tilegrid/TileGrid.d.ts @@ -1,8 +1,9 @@ -import { Coordinate } from 'ol/coordinate'; -import { Extent } from 'ol/extent'; -import { Size } from 'ol/size'; -import { TileCoord } from 'ol/tilecoord'; -import TileRange from 'ol/TileRange'; +import { Coordinate } from '../coordinate'; +import { Extent } from '../extent'; +import { Size } from '../size'; +import { TileCoord } from '../tilecoord'; +import TileRange from '../TileRange'; + export interface Options { extent?: Extent; minZoom?: number; diff --git a/@types/ol/tilegrid/WMTS.d.ts b/@types/ol/tilegrid/WMTS.d.ts index 583c6356..a32a9057 100644 --- a/@types/ol/tilegrid/WMTS.d.ts +++ b/@types/ol/tilegrid/WMTS.d.ts @@ -1,8 +1,9 @@ -import { Coordinate } from 'ol/coordinate'; -import { Extent } from 'ol/extent'; -import { Size } from 'ol/size'; -import TileGrid from 'ol/tilegrid/TileGrid'; -export function createFromCapabilitiesMatrixSet(matrixSet: { [key: string]: any }, opt_extent?: Extent, opt_matrixLimits?: { [key: string]: any }[]): WMTSTileGrid; +import { Coordinate } from '../coordinate'; +import { Extent } from '../extent'; +import { Size } from '../size'; +import TileGrid from './TileGrid'; + +export function createFromCapabilitiesMatrixSet(matrixSet: any, opt_extent?: Extent, opt_matrixLimits?: object[]): WMTSTileGrid; export interface Options { extent?: Extent; origin?: Coordinate; diff --git a/@types/ol/tileurlfunction.d.ts b/@types/ol/tileurlfunction.d.ts index e54d43eb..dcad2b8a 100644 --- a/@types/ol/tileurlfunction.d.ts +++ b/@types/ol/tileurlfunction.d.ts @@ -1,7 +1,8 @@ -import Projection from 'ol/proj/Projection'; -import { UrlFunction } from 'ol/Tile'; -import { TileCoord } from 'ol/tilecoord'; -import TileGrid from 'ol/tilegrid/TileGrid'; +import Projection from './proj/Projection'; +import { UrlFunction } from './Tile'; +import { TileCoord } from './tilecoord'; +import TileGrid from './tilegrid/TileGrid'; + export function createFromTemplate(template: string, tileGrid: TileGrid): UrlFunction; export function createFromTemplates(templates: string[], tileGrid: TileGrid): UrlFunction; export function createFromTileUrlFunctions(tileUrlFunctions: UrlFunction[]): UrlFunction; diff --git a/@types/ol/transform.d.ts b/@types/ol/transform.d.ts index e6a1a630..2326b34a 100644 --- a/@types/ol/transform.d.ts +++ b/@types/ol/transform.d.ts @@ -1,5 +1,6 @@ -import { Coordinate } from 'ol/coordinate'; -import { Pixel } from 'ol/pixel'; +import { Coordinate } from './coordinate'; +import { Pixel } from './pixel'; + export function apply(transform: Transform, coordinate: Coordinate | Pixel): Coordinate | Pixel; export function compose(transform: Transform, dx1: number, dy1: number, sx: number, sy: number, angle: number, dx2: number, dy2: number): Transform; export function create(): Transform; diff --git a/@types/ol/uri.d.ts b/@types/ol/uri.d.ts index 2d85ace8..3238785d 100644 --- a/@types/ol/uri.d.ts +++ b/@types/ol/uri.d.ts @@ -1 +1 @@ -export function appendParams(uri: string, params: { [key: string]: any }): string; +export function appendParams(uri: string, params: any): string; diff --git a/@types/ol/vec/mat4.d.ts b/@types/ol/vec/mat4.d.ts index c81a7434..42b76fc0 100644 --- a/@types/ol/vec/mat4.d.ts +++ b/@types/ol/vec/mat4.d.ts @@ -1,3 +1,4 @@ -import { Transform } from 'ol/transform'; +import { Transform } from '../transform'; + export function create(): number[]; export function fromTransform(mat4: number[], transform: Transform): number[]; diff --git a/@types/ol/webgl/index.d.ts b/@types/ol/webgl.d.ts similarity index 62% rename from @types/ol/webgl/index.d.ts rename to @types/ol/webgl.d.ts index 33edd366..45cfa40e 100644 --- a/@types/ol/webgl/index.d.ts +++ b/@types/ol/webgl.d.ts @@ -1,2 +1,2 @@ -export function getContext(canvas: HTMLCanvasElement, opt_attributes?: { [key: string]: any }): WebGLRenderingContext; +export function getContext(canvas: HTMLCanvasElement, opt_attributes?: any): WebGLRenderingContext; export const HAS: boolean; diff --git a/@types/ol/webgl/Context.d.ts b/@types/ol/webgl/Context.d.ts index 815deae9..26493121 100644 --- a/@types/ol/webgl/Context.d.ts +++ b/@types/ol/webgl/Context.d.ts @@ -1,8 +1,9 @@ -import Disposable from 'ol/Disposable'; -import WebGLBuffer from 'ol/webgl/Buffer'; -import WebGLFragment from 'ol/webgl/Fragment'; -import WebGLShader from 'ol/webgl/Shader'; -import WebGLVertex from 'ol/webgl/Vertex'; +import Disposable from '../Disposable'; +import WebGLBuffer from './Buffer'; +import WebGLFragment from './Fragment'; +import WebGLShader from './Shader'; +import WebGLVertex from './Vertex'; + export function createEmptyTexture(gl: WebGLRenderingContext, width: number, height: number, opt_wrapS?: number, opt_wrapT?: number): WebGLTexture; export function createTexture(gl: WebGLRenderingContext, image: HTMLCanvasElement | HTMLImageElement | HTMLVideoElement, opt_wrapS?: number, opt_wrapT?: number): WebGLTexture; export interface BufferCacheEntry { diff --git a/@types/ol/webgl/Fragment.d.ts b/@types/ol/webgl/Fragment.d.ts index e14fdca6..f757d484 100644 --- a/@types/ol/webgl/Fragment.d.ts +++ b/@types/ol/webgl/Fragment.d.ts @@ -1,4 +1,5 @@ -import WebGLShader from 'ol/webgl/Shader'; +import WebGLShader from './Shader'; + export default class WebGLFragment extends WebGLShader { constructor(source: string); } diff --git a/@types/ol/webgl/Vertex.d.ts b/@types/ol/webgl/Vertex.d.ts index aff11235..3b72e631 100644 --- a/@types/ol/webgl/Vertex.d.ts +++ b/@types/ol/webgl/Vertex.d.ts @@ -1,4 +1,5 @@ -import WebGLShader from 'ol/webgl/Shader'; +import WebGLShader from './Shader'; + export default class WebGLVertex extends WebGLShader { constructor(source: string); } diff --git a/@types/ol/xml.d.ts b/@types/ol/xml.d.ts index eaa74cea..7b78dd32 100644 --- a/@types/ol/xml.d.ts +++ b/@types/ol/xml.d.ts @@ -1,7 +1,7 @@ export function createElementNS(namespaceURI: string, qualifiedName: string): Element; export function getAllTextContent(node: Node, normalizeWhitespace: boolean): string; export function getAttributeNS(node: Element, namespaceURI: string, name: string): string; -export function isDocument(object: { [key: string]: any }): boolean; +export function isDocument(object: any): boolean; export function makeArrayExtender(valueReader: ((this: T, param1: Node, param2: any[]) => any[]), opt_this?: T): Parser; export function makeArrayPusher(valueReader: ((this: T, param1: Element, param2: any[]) => void), opt_this?: T): Parser; export function makeArraySerializer(nodeWriter: ((this: T, param1: Element, param2: V, param3: any[]) => void), opt_this?: T): Serializer; diff --git a/README.md b/README.md index 21b186cd..bc3381ec 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ There are several ways to use this package. Please choose one: ... "devDependencies": { ... - "@hanreev/types-ol": "^2.0.1", + "@hanreev/types-ol": "^2.0.2", "@types/ol": "file:node_modules/@hanreev/types-ol/ol", ... } @@ -147,6 +147,20 @@ Configuration is located at `jsdoc/conf.json` ## Changelog +- **v2.0.2** + - Fix `object` type + - Use relative import path for `ol` modules (`no-self-import`). +- **v2.0.1** + - Refactor definition filenames + - Remove module declaration + - [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) standard with these ignored rules: + - `adjacent-overload-signatures` + - `array-type` + - `max-line-length` + - `no-self-import` + - `no-unnecessary-class` + - `no-unnecessary-generics` + - `unified-signatures` - **v1.0.2** - Sort imports - NPM compatibility as `@types/ol` @@ -160,4 +174,4 @@ Configuration is located at `jsdoc/conf.json` ## License Copyright © 2019 [Rifa'i M. Hanif](https://github.com/hanreev) -Licensed under MIT License +Licensed under MIT License \ No newline at end of file diff --git a/jsdoc/template/publish.js b/jsdoc/template/publish.js index b4f9cd49..83a3c0df 100644 --- a/jsdoc/template/publish.js +++ b/jsdoc/template/publish.js @@ -308,10 +308,44 @@ function registerImport(_module, val) { /** * @param {string[]} expressions + * @param {Doclet} _module + * @returns {string[]} + */ +function relativeImport(expressions, _module) { + if (!Array.isArray(expressions)) + return logger.error('relativeImport -- Invalid argument:', expressions); + + const moduleDirname = _module.name == 'ol' ? 'ol' : path.dirname(_module.name); + + return expressions.map(expression => { + const match = expression.match(/^((import|export)\s.+?\sfrom\s['"])(.+?)(['"];)$/); + + if (!match) + return expression; + + let fromPath = match[3]; + + if (!fromPath.startsWith('ol')) + return expression; + + fromPath = path.relative(moduleDirname, fromPath); + + if (!fromPath) + fromPath = '../' + path.basename(moduleDirname); + else if (!fromPath.startsWith('.')) + fromPath = './' + fromPath; + + return match[1] + fromPath + match[4]; + }); +} + +/** + * @param {string[]} expressions + * @param {Doclet} _module * @param {number} [maxLineLength=120] * @returns {string[]} */ -function sortImports(expressions, maxLineLength = 120) { +function sortImports(expressions, _module, maxLineLength = 120) { if (!Array.isArray(expressions)) return logger.error('sortImports -- Invalid argument:', expressions); @@ -354,6 +388,9 @@ function sortImports(expressions, maxLineLength = 120) { return expression; }; + // Relative import ol modules + expressions = relativeImport(expressions, _module); + expressions.forEach(expression => { /** @type {RegExpMatchArray} */ const match = expression.match(/^import (?:([^{]+?),\s?)?(.+?) from ['"](.+?)['"];?$/); @@ -455,7 +492,7 @@ function stringifyType(parsedType, _module) { if (typeStr == 'Array') typeStr = 'any[]'; else if (typeStr == 'Object') - typeStr = '{ [key: string]: any }'; + typeStr = 'object'; return typeStr; } @@ -573,6 +610,9 @@ function getType(doclet, _module) { if (types.length > 1 && types.indexOf('any') != -1) types = types.filter(t => t != 'any'); + if (types.length == 1 && types[0] == 'object') + types[0] = 'any'; + return types.join(' | ') || 'any'; } @@ -899,7 +939,7 @@ function processModule(doclet) { MODULE_CHILDREN[doclet.name] = children; if (doclet.name in MODULE_IMPORTS) - MODULE_IMPORTS[doclet.name].expressions = sortImports(MODULE_IMPORTS[doclet.name].expressions); + MODULE_IMPORTS[doclet.name].expressions = sortImports(MODULE_IMPORTS[doclet.name].expressions, doclet); } /** @@ -942,6 +982,7 @@ function generateDeclaration(doclet, emitOutput = true) { reExports.push(x); } }); + reExports = relativeImport(reExports, doclet); MODULE_EXPORTS[doclet.name].reExports = reExports; content += reExports.join('\n') + '\n'; } @@ -951,8 +992,11 @@ function generateDeclaration(doclet, emitOutput = true) { return; } - if (children.length) + if (children.length) { + if ((_imports && _imports.expressions.length) || reExports.length) + content += '\n'; content += children.join('\n') + '\n'; + } if (emitOutput) { let outoutPath = path.resolve(outDir, doclet.name); @@ -1042,48 +1086,6 @@ function extractGenericTypes(initial = true, strict = false) { }); } -/** - * @param {string} filepath - */ -function fileExistsWithCaseSync(filepath) { - var dir = path.dirname(filepath) - if (dir === path.dirname(dir)) { - return true - } - var filenames = fs.readdirSync(dir) - if (filenames.indexOf(path.basename(filepath)) === -1) { - return false - } - return fileExistsWithCaseSync(dir) -} - -/** - * @param {string} dirpath - */ -function preventSelfImport(dirpath) { - if (!(fileExistsWithCaseSync(dirpath) && fs.statSync(dirpath).isDirectory())) - return; - - fs.readdirSync(dirpath) - .forEach(name => { - const fullPath = path.join(dirpath, name); - if (!(fileExistsWithCaseSync(fullPath) && fs.statSync(fullPath).isDirectory())) return; - - const dtsPath = fullPath + '.d.ts'; - if (fileExistsWithCaseSync(dtsPath)) { - const indexDtsPath = path.join(fullPath, 'index.d.ts'); - let indexDtsContent = ''; - if (fileExistsWithCaseSync(indexDtsPath)) - indexDtsContent = fs.readFileSync(indexDtsPath).toString(); - indexDtsContent += fs.readFileSync(dtsPath).toString(); - fs.writeFileSync(indexDtsPath, indexDtsContent); - fs.unlinkSync(dtsPath); - } - - preventSelfImport(fullPath); - }); -} - exports.publish = (taffyData) => { data = taffyData; data = helper.prune(data); @@ -1176,6 +1178,5 @@ exports.publish = (taffyData) => { * Generate multiple declaration files */ members.modules.forEach(doclet => generateDeclaration(doclet)); - preventSelfImport(outDir); } }; diff --git a/package.json b/package.json index ba483fce..40ab9aa1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hanreev/types-ol", - "version": "2.0.1", + "version": "2.0.2", "description": "OpenLayers 5+ TypeScript declaration", "author": "Rifa'i M. Hanif ", "repository": { diff --git a/prepareDefinitelyTyped.js b/prepareDefinitelyTyped.js index ff6410d9..f1f635f3 100644 --- a/prepareDefinitelyTyped.js +++ b/prepareDefinitelyTyped.js @@ -30,7 +30,6 @@ const configs = { 'adjacent-overload-signatures': false, 'array-type': false, 'max-line-length': false, - 'no-self-import': false, 'no-unnecessary-class': false, 'no-unnecessary-generics': false, 'unified-signatures': false diff --git a/test/color-manipulation.ts b/test/color-manipulation.ts index a57f1635..6f457866 100644 --- a/test/color-manipulation.ts +++ b/test/color-manipulation.ts @@ -99,7 +99,7 @@ const raster = new RasterSource({ sources: [new Stamen({ layer: 'watercolor', })], - operation: function(pixels, data) { + operation: function(pixels, data: any) { const hcl = rgb2hcl(pixels[0] as number[]); let h = hcl[0] + Math.PI * data.hue / 180; diff --git a/test/sea-level.ts b/test/sea-level.ts index c2ffe2ee..92ef1466 100644 --- a/test/sea-level.ts +++ b/test/sea-level.ts @@ -5,7 +5,7 @@ import RasterSource, { Operation } from 'ol/source/Raster'; import XYZ from 'ol/source/XYZ'; import View from 'ol/View'; -const flood: Operation = (pixels: number[][], data) => { +const flood: Operation = (pixels: number[][], data: any) => { const pixel = pixels[0]; if (pixel[3]) { const height = -10000 + ((pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1); diff --git a/test/shaded-relief.ts b/test/shaded-relief.ts index ab553a47..5c9d946b 100644 --- a/test/shaded-relief.ts +++ b/test/shaded-relief.ts @@ -9,7 +9,7 @@ import View from 'ol/View'; * Generates a shaded relief image given elevation data. Uses a 3x3 * neighborhood for determining slope and aspect. */ -const shade: Operation = (inputs: ImageData[], data) => { +const shade: Operation = (inputs: ImageData[], data: any) => { const elevationImage = inputs[0]; const width = elevationImage.width; const height = elevationImage.height; diff --git a/webpack.config.js b/webpack.config.js index 3844e8c9..bc1abb91 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,7 +13,7 @@ module.exports = { output: { path: path.resolve(__dirname, 'test-out'), filename: '[name].js', - libraryTarget: 'umd' + libraryTarget: 'commonjs2' }, target: 'web', mode: 'none',