-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.ts
236 lines (214 loc) · 5.79 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
export type DrawOptions = Omit<
import("ol/interaction/Draw").Options,
"type"
> & {
id: string | number;
type: "Point" | "LineString" | "Polygon" | "Circle" | "Box";
modify?: boolean;
active?: boolean;
geometryFunction?: import("ol/interaction/Draw").GeometryFunction;
};
export type layerType =
| "Group"
| "Heatmap"
| "Image"
| "Layer"
| "Tile"
| "Vector"
| "VectorImage"
| "VectorTile";
export type sourceType =
| "BingMaps"
| "Cluster"
| "GeoTIFF"
| "IIIF"
| "Image"
| "ImageCanvas"
| "ImageStatic"
| "ImageWMS"
| "OSM"
| "Raster"
| "StadiaMaps"
| "Tile"
| "TileArcGISRest"
| "TileDebug"
| "TileImage"
| "TileJSON"
| "TileWMS"
| "UrlTile"
| "Vector"
| "VectorTile"
| "WMTS"
| "XYZ"
| "WMTSCapabilities";
export type VectorOrVectorTileLayer =
| import("ol/layer").Vector
| import("ol/layer").VectorTile;
export type AnyLayerWithSource =
| import("ol/layer/Base").default
| import("ol/layer/BaseImage").default<
import("ol/source/Image").default,
import("ol/renderer/canvas/ImageLayer").default
>
| import("ol/layer/Tile").default<import("ol/source/Tile").default>
| VectorOrVectorTileLayer;
export type AnyLayer = AnyLayerWithSource | import("ol/layer/Group").default;
export type formatWithOptions = {
type: string;
dataProjection?: string;
featureProjection?: string;
};
export type EOxInteraction = {
type: "draw" | "select";
options: DrawOptions | SelectOptions;
};
export type EoxLayer = {
type: layerType;
properties?: object & {
id: string;
};
minZoom?: number;
maxZoom?: number;
minResolution?: number;
maxResolution?: number;
opacity?: number;
visible?: boolean;
source?: {
type: sourceType;
format?: string | formatWithOptions;
tileGrid?: object;
projection?: import("ol/proj").ProjectionLike;
};
layers?: Array<EoxLayer>;
style?: import("ol/style/flat").FlatStyleLike;
interactions?: Array<EOxInteraction>;
zIndex?: number;
renderMode?: "vector" | "vectorImage";
};
export type SelectLayer =
| import("ol/layer/VectorTile").default
| import("ol/layer/Vector").default;
export type SelectOptions = Omit<
import("ol/interaction/Select").Options,
"condition"
> & {
id: string | number;
idProperty?: string;
condition: "click" | "pointermove";
layer?: EoxLayer;
style?: import("ol/style/flat.js").FlatStyleLike;
overlay?: import("ol/Overlay").Options;
/**
* @property {boolean} [tooltip = true] if true, will display a tooltip when hovering over a feature.
*/
tooltip?: boolean;
active?: boolean;
panIn?: boolean;
modify?: boolean;
type?: string;
geometryFunction?: import("ol/interaction/Draw").GeometryFunction;
cursor?: "string";
atPixelOptions?: import("ol/Map").AtPixelOptions;
};
export type ControlOptions = import("ol/control/Control").Options;
export type GeolocationOptions = import("ol/control/Control").Options & {
/**
* @property {import("ol/style/flat.js").FlatStyleLike} style style definition of the position feature.
*/
style?: import("ol/style/flat.js").FlatStyleLike;
/**
* @property {boolean} centerWhenReady will pan the view to the user-location on the first position update.
*/
centerWhenReady?: boolean;
/**
* @property {boolean} highAccuracy enables high accuracy of geolocator. Required for tracking the heading.
*/
highAccuracy?: boolean;
/**
* @property {boolean} trackAccuracy tracks accuracy and displays it as a circle underneath the position feature.
*/
trackAccuracy?: boolean;
/**
* @property {boolean} trackHeading tracks heading and sets it as 'heading'-property on the position feature.
* "highAccuracy" must be set in order to track heading.
*/
trackHeading?: boolean;
/**
* @property {string} buttonIcon image src of control element icon
*/
buttonIcon?: string;
};
export type LoadingIndicatorType = "small" | "fullscreen";
export type LoadingIndicatorOptions = import("ol/control/Control").Options & {
/**
* @property {string} spinnerSvg svg to be used as spinner icon
*/
spinnerSvg?: string;
/**
* @property {Number} opacity opacity, defaults to 1
*/
opacity?: number;
/**
* @property {LoadingIndicatorType} type type of appearance. Small button style of fullscreen style. Defaults to button style.
*/
type?: LoadingIndicatorType;
};
export type ControlType =
| "Attribution"
| "FullScreen"
| "MousePosition"
| "OverviewMap"
| "Rotate"
| "ScaleLine"
| "ZoomSlider"
| "ZoomToExtent"
| "Zoom"
| "Geolocation"
| "LoadingIndicator";
export type ControlDictionary = {
[key in ControlType]?: object;
};
export type AttributionLike =
| import("ol/source/Source").AttributionLike
| string
| Array<string>;
export type ProjectionLike = import("ol/proj").ProjectionLike;
export type FlatGeoBufOptions = {
url: string;
attributions?: import("ol/source/Source").AttributionLike;
wrapX?: boolean;
};
export type WMTSCapabilitiesOptions = {
url: string;
layer: string;
attributions?: import("ol/source/Source").AttributionLike;
attributionsCollapsible?: boolean;
cacheSize?: number;
crossOrigin?: null | string;
interpolate?: boolean;
projection?: import("ol/proj").ProjectionLike;
transition?: number;
key?: string;
tilePixelRatio?: number;
zDirection?: number;
wrapX?: boolean;
dimensions: object;
version: string;
};
export type HTMLElementEvent<T extends HTMLElement> = Event & {
target: T;
};
export type EOxAnimationOptions = import("ol/View").AnimationOptions &
import("ol/View").FitOptions;
export type ConfigObject = {
controls: ControlDictionary;
layers: Array<EoxLayer>;
view: {
center: Array<number>;
zoom: number;
zoomExtent?: import("ol/extent").Extent;
projection?: ProjectionLike;
};
preventScroll: boolean;
animationOptions?: EOxAnimationOptions;
};