-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.d.ts
73 lines (62 loc) · 1.13 KB
/
index.d.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
type BBox = [number, number, number, number]
type Format = 'jpg' | 'png'
interface Layer {
title: string
identifier: string
format: Format
formats: string[]
abstract: string
minzoom: number
maxzoom: number
bbox: BBox
}
interface Service {
type: string
version: string
title: string
}
interface Url {
getCapabilities: string
slippy: string
host: string
}
interface WMS {
service: {
type: 'OGC WMS'
version: '1.0.0' | '1.1.0' | '1.1.1' | '1.3.0'
title: string
}
layer: Layer,
url: WMSUrl
}
interface WMSUrl extends Url {
onlineResource: string
}
interface WMTS {
service: {
type: 'OGC WMTS'
version: '1.0.0'
title: string
}
layer: WMTSLayer,
url: WMTSUrl
}
interface WMTSUrl extends Url {
getTile: string
resourceURL: string
}
interface WMTSLayer extends Layer {
tileMatrixSets: string[]
}
/**
* Parse OGC WMTS Service Metadata
*/
export function wmts(xml: string | Document): WMTS
/**
* Parse OGC WMS Service Metadata
*/
export function wms(xml: string | Document): WMS
/**
* Parse OGC Service Information
*/
export function service(xml: string | Document): Service