Skip to content

Commit

Permalink
Merge pull request #84 from smellman/dev-ol-6.14.1-ol-ext-3.2.22
Browse files Browse the repository at this point in the history
OpenLayers 6.14.1 and ol-ext 3.2.22
  • Loading branch information
Siedlerchr authored Apr 17, 2022
2 parents 1f0e24a + e18f56c commit 7c4942b
Show file tree
Hide file tree
Showing 85 changed files with 6,056 additions and 1,050 deletions.
40 changes: 10 additions & 30 deletions @types/ol-ext/control/EditBar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ import { EventsKey } from 'ol/events';
import BaseEvent from 'ol/events/Event';
import { ObjectEvent } from 'ol/Object';
import { Geometry } from 'ol/geom';
import { CombinedOnSignature, EventTypes, OnSignature } from 'ol/Observable';
import { Types } from 'ol/ObjectEventType';

type EditBarOnSignature<Return> = OnSignature<EventTypes, Event, Return> &
OnSignature<Types | 'change' | 'error' | 'propertychange', ObjectEvent, Return> &
OnSignature<Types | 'info', InfoEvent, Return> &
CombinedOnSignature<EventTypes | Types | 'change' | 'error' | 'propertychange' | 'info', Return>;

export enum EditBarEventType {
INFO = 'info',
Expand Down Expand Up @@ -111,38 +118,11 @@ export default class EditBar extends Bar {
*/
getControlsByName(name: string): ol_control_Control;

on(
type: string | string[],
listener: (p0: any) => any
): EventsKey | EventsKey[];
once(
type: string | string[],
listener: (p0: any) => any
): EventsKey | EventsKey[];
un(type: string | string[], listener: (p0: any) => any): void;
on(type: 'change', listener: (evt: BaseEvent) => void): EventsKey;
once(type: 'change', listener: (evt: BaseEvent) => void): EventsKey;
un(type: 'change', listener: (evt: BaseEvent) => void): void;
on(type: 'error', listener: (evt: BaseEvent) => void): EventsKey;
once(type: 'error', listener: (evt: BaseEvent) => void): EventsKey;
un(type: 'error', listener: (evt: BaseEvent) => void): void;
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
on: EditBarOnSignature<EventsKey>;
once: EditBarOnSignature<EventsKey>;
un: EditBarOnSignature<void>;
}
export class InfoEvent extends BaseEvent {
constructor(type: EditBarEventType, features: Collection<Feature<Geometry>>);
features: Collection<Feature<Geometry>>;
}

declare module 'ol/interaction/Select' {
interface Options {
title?: string;
}
}

declare module 'ol/interaction/Draw' {
interface Options {
title?: string;
}
}
31 changes: 9 additions & 22 deletions @types/ol-ext/control/GeoBookmark.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import { Coordinate } from 'ol/coordinate';
import { EventsKey } from 'ol/events';
import BaseEvent from 'ol/events/Event';
import { ObjectEvent } from 'ol/Object';
import { Types } from 'ol/ObjectEventType';
import { CombinedOnSignature, EventTypes, OnSignature } from 'ol/Observable';

type GeoBookmarkOnSignature<Return> = OnSignature<EventTypes, Event, Return> &
OnSignature<Types | 'change' | 'error' | 'propertychange', ObjectEvent, Return> &
OnSignature<Types | 'add' | 'remove' | 'select', BookmarkEvent, Return> &
CombinedOnSignature<EventTypes | Types | 'change' | 'error' | 'propertychange' | 'add' | 'remove' | 'select', Return>;

export enum BookMarkEventType {
ADD = "add",
Expand Down Expand Up @@ -77,28 +83,9 @@ export default class GeoBookmark extends ol_control_Control {
*/
addBookmark(name: string, position?: Coordinate, zoom?: number, permanent?: boolean): void;

on(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[];
once(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[];
un(type: string | string[], listener: (p0: any) => any): void;
on(type: 'change', listener: (evt: BaseEvent) => void): EventsKey;
once(type: 'change', listener: (evt: BaseEvent) => void): EventsKey;
un(type: 'change', listener: (evt: BaseEvent) => void): void;
on(type: 'error', listener: (evt: BaseEvent) => void): EventsKey;
once(type: 'error', listener: (evt: BaseEvent) => void): EventsKey;
un(type: 'error', listener: (evt: BaseEvent) => void): void;
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;

on(type: 'add', listener: (evt: BookmarkEvent) => void): EventsKey;
once(type: 'add', listener: (evt: BookmarkEvent) => void): EventsKey;
un(type: 'add', listener: (evt: BookmarkEvent) => void): void;
on(type: 'remove', listener: (evt: BookmarkEvent) => void): EventsKey;
once(type: 'remove', listener: (evt: BookmarkEvent) => void): EventsKey;
un(type: 'remove', listener: (evt: BookmarkEvent) => void): void;
on(type: 'select', listener: (evt: BookmarkEvent) => void): EventsKey;
once(type: 'select', listener: (evt: BookmarkEvent) => void): EventsKey;
un(type: 'select', listener: (evt: BookmarkEvent) => void): void;
on: GeoBookmarkOnSignature<EventsKey>;
once: GeoBookmarkOnSignature<EventsKey>;
un: GeoBookmarkOnSignature<void>;
}

export class BookmarkEvent extends BaseEvent {
Expand Down
39 changes: 10 additions & 29 deletions @types/ol-ext/control/GridReference.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ import { Extent } from 'ol/extent';
import { Size } from 'ol/size';
import { Vector as VectorSource } from 'ol/source';
import { EventsKey } from 'ol/events';
import { SelectEvent } from 'ol/interaction/Select';
import BaseEvent from 'ol/events/Event';
import { ObjectEvent } from 'ol/Object';
import { CombinedOnSignature, EventTypes, OnSignature } from 'ol/Observable';
import { Types } from 'ol/ObjectEventType';

type GridReferenceOnSignature<Return> = OnSignature<EventTypes, Event, Return> &
OnSignature<Types | 'change' | 'error' | 'propertychange', ObjectEvent, Return> &
OnSignature<Types | 'select', GridReferenceSelectEvent, Return> &
CombinedOnSignature<Types | EventTypes | 'change' | 'error' | 'propertychange' | 'select', Return>;

export enum GridReferenceEventType {
SELECT = 'select',
Expand Down Expand Up @@ -132,34 +138,9 @@ export default class GridReference extends CanvasBase {
*/
getTextFont(): string;

on(
type: string | string[],
listener: (p0: any) => any
): EventsKey | EventsKey[];
once(
type: string | string[],
listener: (p0: any) => any
): EventsKey | EventsKey[];
un(type: string | string[], listener: (p0: any) => any): void;
on(type: 'change', listener: (evt: BaseEvent) => void): EventsKey;
once(type: 'change', listener: (evt: BaseEvent) => void): EventsKey;
un(type: 'change', listener: (evt: BaseEvent) => void): void;
on(type: 'error', listener: (evt: BaseEvent) => void): EventsKey;
once(type: 'error', listener: (evt: BaseEvent) => void): EventsKey;
un(type: 'error', listener: (evt: BaseEvent) => void): void;
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;

on(
type: 'select',
listener: (evt: GridReferenceSelectEvent) => void
): EventsKey;
once(
type: 'select',
listener: (evt: GridReferenceSelectEvent) => void
): EventsKey;
un(type: 'select', listener: (evt: GridReferenceSelectEvent) => void): void;
on: GridReferenceOnSignature<EventsKey>;
once: GridReferenceOnSignature<EventsKey>;
un: GridReferenceOnSignature<void>;
}

export class GridReferenceSelectEvent extends BaseEvent {
Expand Down
34 changes: 12 additions & 22 deletions @types/ol-ext/control/Imageline.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ import Feature from 'ol/Feature';
import { ObjectEvent } from 'ol/Object';
import { Vector as VectorSource } from 'ol/source';
import VectorLayer from 'ol/layer/Vector';
import { CombinedOnSignature, EventTypes, OnSignature } from 'ol/Observable';
import { Types } from 'ol/ObjectEventType';
import { Geometry } from 'ol/geom';


type ImageLineOnSignature<Return> = OnSignature<EventTypes, Event, Return> &
OnSignature<Types | 'change' | 'error' | 'propertychange', ObjectEvent, Return> &
OnSignature<Types | 'select', ImageLineSelectEvent, Return> &
OnSignature<Types | 'collapse', ImageLineCollapseEvent, Return> &
CombinedOnSignature<Types | EventTypes | 'change' | 'error' | 'propertychange' | 'select' | 'collapse', Return>;
export interface Options extends ControlOptions {
className?: string;
source?: VectorSource;
layers?: VectorLayer[];
layers?: VectorLayer<VectorSource<Geometry>>[];
getImage?: (f: Feature) => string;
getTitle?: (f: Feature) => string;
collapsed?: boolean;
Expand Down Expand Up @@ -78,26 +85,9 @@ export default class Imageline extends ol_control_Control {
*/
select(feature: Feature, scroll?: boolean): void;

on(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[];
once(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[];
un(type: string | string[], listener: (p0: any) => any): void;
on(type: 'change', listener: (evt: BaseEvent) => void): EventsKey;
once(type: 'change', listener: (evt: BaseEvent) => void): EventsKey;
un(type: 'change', listener: (evt: BaseEvent) => void): void;
on(type: 'error', listener: (evt: BaseEvent) => void): EventsKey;
once(type: 'error', listener: (evt: BaseEvent) => void): EventsKey;
un(type: 'error', listener: (evt: BaseEvent) => void): void;
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;

on(type: 'select', listener: (evt: ImageLineSelectEvent) => void): EventsKey;
once(type: 'select', listener: (evt: ImageLineSelectEvent) => void): EventsKey;
un(type: 'select', listener: (evt: ImageLineSelectEvent) => void): void;

on(type: 'collapse', listener: (evt: ImageLineCollapseEvent) => void): EventsKey;
once(type: 'select', listener: (evt: ImageLineCollapseEvent) => void): EventsKey;
un(type: 'select', listener: (evt: ImageLineCollapseEvent) => void): void;
on: ImageLineOnSignature<EventsKey>;
once: ImageLineOnSignature<EventsKey>;
un: ImageLineOnSignature<void>;
}
export class ImageLineSelectEvent extends BaseEvent {
constructor(
Expand Down
28 changes: 8 additions & 20 deletions @types/ol-ext/control/IsochroneGeoportail.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ import Feature from "ol/Feature";
import BaseEvent from "ol/events/Event";
import { EventsKey } from "ol/events";
import { ObjectEvent } from "ol/Object";
import { CombinedOnSignature, EventTypes, OnSignature } from "ol/Observable";
import { Types } from "ol/ObjectEventType";

type IsochroneGeoportailOnSignature<Return> = OnSignature<EventTypes, Event, Return> &
OnSignature<Types | 'change' | 'error' | 'propertychange' | 'isochrone', ObjectEvent, Return> &
CombinedOnSignature<Types | EventTypes | 'change' | 'error' | 'propertychange' | 'isochrone', Return>;
export interface Options extends ControlOptions {
className?: string;
apiKey?: string;
Expand Down Expand Up @@ -74,26 +79,9 @@ export default class IsochroneGeoportail extends ol_control_Control {
*/
search(coord: Coordinate, option: number | string, iter: number): void;

on(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[];
once(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[];
un(type: string | string[], listener: (p0: any) => any): void;
on(type: "change", listener: (evt: BaseEvent) => void): EventsKey;
once(type: "change", listener: (evt: BaseEvent) => void): EventsKey;
un(type: "change", listener: (evt: BaseEvent) => void): void;
on(type: "error", listener: (evt: BaseEvent) => void): EventsKey;
once(type: "error", listener: (evt: BaseEvent) => void): EventsKey;
un(type: "error", listener: (evt: BaseEvent) => void): void;
on(type: "propertychange", listener: (evt: ObjectEvent) => void): EventsKey;
once(type: "propertychange", listener: (evt: ObjectEvent) => void): EventsKey;
un(type: "propertychange", listener: (evt: ObjectEvent) => void): void;

on(type: "error", listener: (evt: BaseEvent) => void): EventsKey;
once(type: "error", listener: (evt: BaseEvent) => void): EventsKey;
un(type: "error", listener: (evt: BaseEvent) => void): void;

on(type: "isochrone", listener: (evt: BaseEvent) => void): EventsKey;
once(type: "isochrone", listener: (evt: BaseEvent) => void): EventsKey;
un(type: "isochrone", listener: (evt: BaseEvent) => void): void;
on: IsochroneGeoportailOnSignature<EventsKey>;
once: IsochroneGeoportailOnSignature<EventsKey>;
un: IsochroneGeoportailOnSignature<void>;
}

export class IsoChroneEvent extends BaseEvent {
Expand Down
43 changes: 12 additions & 31 deletions @types/ol-ext/control/LayerSwitcher.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ import { Extent } from "ol/extent";
import BaseEvent from "ol/events/Event";
import { EventsKey } from "ol/events";
import { ObjectEvent } from "ol/Object";
import { CombinedOnSignature, EventTypes, OnSignature } from "ol/Observable";
import { Types } from "ol/ObjectEventType";

type LayerSwitcherOnSignature<Return> = OnSignature<EventTypes, Event, Return> &
OnSignature<Types | 'change' | 'error' | 'propertychange', ObjectEvent, Return> &
OnSignature<Types | 'drawlist' | 'layer:visible' | 'layer:opacity', LayerSwitcherEvent, Return> &
OnSignature<Types | 'toggle', ToggleEvent, Return> &
OnSignature<Types | 'reroder-start' | 'reroder-end', LayerSwitcherReorderEvent, Return> &
CombinedOnSignature<Types | EventTypes | 'change' | 'error' | 'propertychange' | 'drawlist' | 'layer:visible' | 'layer:opacity' | 'toggle' | 'reroder-start' | 'reroder-end', Return>;

export enum LayerSwitcherEventType {
DRAWLIST = "drawlist",
Expand Down Expand Up @@ -142,37 +151,9 @@ export default class LayerSwitcher extends ol_control_Control {
*/
drawList(element: Element, collection: Layer[]): void;

on(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[];
once(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[];
un(type: string | string[], listener: (p0: any) => any): void;
on(type: "change", listener: (evt: BaseEvent) => void): EventsKey;
once(type: "change", listener: (evt: BaseEvent) => void): EventsKey;
un(type: "change", listener: (evt: BaseEvent) => void): void;
on(type: "error", listener: (evt: BaseEvent) => void): EventsKey;
once(type: "error", listener: (evt: BaseEvent) => void): EventsKey;
un(type: "error", listener: (evt: BaseEvent) => void): void;
on(type: "propertychange", listener: (evt: ObjectEvent) => void): EventsKey;
once(type: "propertychange", listener: (evt: ObjectEvent) => void): EventsKey;
un(type: "propertychange", listener: (evt: ObjectEvent) => void): void;

on(type: "drawlist", listener: (evt: LayerSwitcherEvent) => void): EventsKey;
once(type: "drawlist", listener: (evt: LayerSwitcherEvent) => void): EventsKey;
un(type: "drawlist", listener: (evt: LayerSwitcherEvent) => void): void;
on(type: "layer:visible", listener: (evt: LayerSwitcherEvent) => void): EventsKey;
once(type: "layer:visible", listener: (evt: LayerSwitcherEvent) => void): EventsKey;
un(type: "layer:visible", listener: (evt: LayerSwitcherEvent) => void): void;
on(type: "layer:opacity", listener: (evt: LayerSwitcherEvent) => void): EventsKey;
once(type: "layer:opacity", listener: (evt: LayerSwitcherEvent) => void): EventsKey;
un(type: "layer:opacity", listener: (evt: LayerSwitcherEvent) => void): void;
on(type: "toggle", listener: (evt: ToggleEvent) => void): EventsKey;
once(type: "toggle", listener: (evt: ToggleEvent) => void): EventsKey;
un(type: "toggle", listener: (evt: ToggleEvent) => void): void;
on(type: "reroder-start", listener: (evt: LayerSwitcherReorderEvent) => void): EventsKey;
once(type: "reorder-start", listener: (evt: LayerSwitcherReorderEvent) => void): EventsKey;
un(type: "reorder-start", listener: (evt: LayerSwitcherReorderEvent) => void): void;
on(type: "reroder-end", listener: (evt: LayerSwitcherReorderEvent) => void): EventsKey;
once(type: "reorder-end", listener: (evt: LayerSwitcherReorderEvent) => void): EventsKey;
un(type: "reorder-end", listener: (evt: LayerSwitcherReorderEvent) => void): void;
on: LayerSwitcherOnSignature<EventsKey>;
once: LayerSwitcherOnSignature<EventsKey>;
un: LayerSwitcherOnSignature<void>;
}
export class ToggleEvent extends BaseEvent {
constructor(type: ToggleEventType, collapsed: boolean);
Expand Down
27 changes: 27 additions & 0 deletions @types/ol-ext/control/Search.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
import ol_control_Control, {Options as ControlOptions} from 'ol/control/Control';
import { Feature, Map as _ol_Map_ } from 'ol';
import { Coordinate } from 'ol/coordinate';
import BaseEvent from 'ol/events/Event';
import { CombinedOnSignature, EventTypes, OnSignature } from 'ol/Observable';
import { ObjectEvent } from 'ol/Object';
import { Types } from 'ol/ObjectEventType';
import { EventsKey } from 'ol/events';

export type SearchOnSignature<Return> = OnSignature<EventTypes, Event, Return> &
OnSignature<Types | 'change' | 'error' | 'propertychange', ObjectEvent, Return> &
OnSignature<Types | 'select', SearchEvent, Return> &
CombinedOnSignature<Types | EventTypes | 'change' | 'error' | 'propertychange'| 'select', Return>;

export enum SearchEventType {
SELECT = 'select',
}

export interface Options extends ControlOptions{
className?: string;
Expand Down Expand Up @@ -136,4 +150,17 @@ export default class Search extends ol_control_Control {
* @return {boolean}
*/
equalFeatures(f1: Feature, f2: Feature): boolean;

on: SearchOnSignature<EventsKey>;
once: SearchOnSignature<EventsKey>;
un: SearchOnSignature<void>;
}

export class SearchEvent extends BaseEvent {
constructor(type: SearchEventType, search: any, reverse: boolean, coordinate: Coordinate, option?: Options);

search: any;
reverse: boolean;
coordinate: Coordinate;
options?: Options;
}
9 changes: 8 additions & 1 deletion @types/ol-ext/control/SearchJSON.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Feature } from 'ol';
import { Coordinate } from 'ol/coordinate';
import Search, { Options as SearchOptions } from './Search';
import { EventsKey } from 'ol/events';
import BaseEvent from 'ol/events/Event';
import Search, { Options as SearchOptions, SearchEvent, SearchOnSignature } from './Search';

export interface Options extends SearchOptions {
handleResponse?: ((response: any) => any[]);
Expand Down Expand Up @@ -104,4 +106,9 @@ export default class SearchJSON extends Search {
* @return {boolean}
*/
equalFeatures(f1: any, f2: any): boolean;

on: SearchOnSignature<EventsKey>;
once: SearchOnSignature<EventsKey>;
un: SearchOnSignature<void>;
}

Loading

0 comments on commit 7c4942b

Please sign in to comment.