9
9
10
10
This document explains the Web Map Links Extension to the
11
11
[ SpatioTemporal Asset Catalog] ( https://github.com/radiantearth/stac-spec ) (STAC) specification.
12
- It allows to provide links to web maps for visualization purposes. Currently, OGC WMTS and XYZ are supported .
12
+ It allows to provide links to web map services for visualization purposes.
13
13
14
+ The following services are supported:
15
+ - [ OGC WMTS] ( #ogc-wmts )
16
+ - [ TileJSON] ( #tilejson )
17
+ - [ XYZ] ( #xyz )
18
+
19
+ Important resources in this extension:
14
20
- Examples:
15
21
- [ Item example] ( examples/item.json ) : Shows the basic usage of the extension in a STAC Item
16
22
- [ Collection example] ( examples/collection.json ) : Shows the basic usage of the extension in a STAC Collection
@@ -20,7 +26,7 @@ It allows to provide links to web maps for visualization purposes. Currently, OG
20
26
## Link Object Fields
21
27
22
28
This extension only extends the [ Link Object] ( https://github.com/radiantearth/stac-spec/tree/master/item-spec/item-spec.md#link-object )
23
- used in all STAC entities (Catalogs, Collections, Items). It requires specific relation types to be set for the ` rel ` field in the
29
+ used in all STAC entities (Catalogs, Collections, Items). It requires specific relation types to be set for the ` rel ` field in the
24
30
Link Object.
25
31
26
32
An attribution field is not defined as part of this extension, but it is RECOMMENDED to provide an attribution
@@ -35,6 +41,7 @@ Links to a [OGC Web Map Tile Service](https://www.ogc.org/standards/wmts) (WMTS)
35
41
| --------------- | -------------------- | ----------- |
36
42
| rel | string | ** REQUIRED** . Must be set to ` wmts ` . |
37
43
| href | string | ** REQUIRED** . Link to the WMTS, without any WMTS specific query parameters. |
44
+ | type | string | Recommended to be set to the media type the Capabilities document, usually ` application/xml ` . |
38
45
| href: servers | \[ string] | See [ href: servers ] ( #hrefservers ) below for details. |
39
46
| wmts: layer | string\|\[ string] | ** REQUIRED** . The layers to show on the map by default, either a list of layer names or a single layer name. |
40
47
| wmts: dimensions | Map\< string, string> | Any additional dimension parameters to add to the request as key-value-pairs, usually added as query parameters. |
@@ -51,11 +58,12 @@ The `href` can contain an optional server placeholder `{s}`. If `{s}` is used, t
51
58
52
59
Links to a XYZ, also known as slippy map.
53
60
54
- | Field Name | Type | Description |
55
- | --------------- | -------------------- | ----------- |
56
- | rel | string | ** REQUIRED** . Must be set to ` xyz ` . |
57
- | href | string | ** REQUIRED** . Link to the XYZ as a templated URI. |
58
- | href: servers | \[ string] | See [ href: servers ] ( #hrefservers ) below for details. |
61
+ | Field Name | Type | Description |
62
+ | ------------ | --------- | ----------- |
63
+ | rel | string | ** REQUIRED** . Must be set to ` xyz ` . |
64
+ | href | string | ** REQUIRED** . Link to the XYZ as a templated URI. |
65
+ | type | string | Recommended to be set to the image file type the XYZ returns by default, usually ` image/png ` or ` image/jpeg ` . |
66
+ | href: servers | \[ string] | See [ href: servers ] ( #hrefservers ) below for details. |
59
67
60
68
#### href
61
69
@@ -65,6 +73,16 @@ If `{s}` is used, the field [`href:servers`](#hrefservers) MUST be provided.
65
73
All other parameters should be [ hard-coded] ( https://github.com/stac-extensions/web-map-links/issues/2 ) with specific values,
66
74
e.g. the ` {r} ` parameter in Leaflet could be replaced by ` 2x ` .
67
75
76
+ ### TileJSON
77
+
78
+ Links to a [ TileJSON] ( https://github.com/mapbox/tilejson-spec ) document.
79
+
80
+ | Field Name | Type | Description |
81
+ | ---------- | ------ | ----------- |
82
+ | rel | string | ** REQUIRED** . Must be set to ` tilejson ` . |
83
+ | href | string | ** REQUIRED** . Link to the valid TileJSON document. |
84
+ | type | string | Recommended to be set to ` application/json ` |
85
+
68
86
### General
69
87
70
88
The following field applies to multiple types of web mapping services:
@@ -97,10 +115,10 @@ for running tests are copied here for convenience.
97
115
98
116
### Running tests
99
117
100
- The same checks that run as checks on PR's are part of the repository and can be run locally to verify that changes are valid.
118
+ The same checks that run as checks on PR's are part of the repository and can be run locally to verify that changes are valid.
101
119
To run tests locally, you'll need ` npm ` , which is a standard part of any [ node.js installation] ( https://nodejs.org/en/download/ ) .
102
120
103
- First you'll need to install everything with npm once. Just navigate to the root of this repository and on
121
+ First you'll need to install everything with npm once. Just navigate to the root of this repository and on
104
122
your command line run:
105
123
``` bash
106
124
npm install
0 commit comments