99
1010This document explains the Web Map Links Extension to the
1111[ 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.
1313
14+ The following services are supported:
15+ - [ OGC WMTS] ( #ogc-wmts )
16+ - [ TileJSON] ( #tilejson )
17+ - [ XYZ] ( #xyz )
18+
19+ Important resources in this extension:
1420- Examples:
1521 - [ Item example] ( examples/item.json ) : Shows the basic usage of the extension in a STAC Item
1622 - [ 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
2026## Link Object Fields
2127
2228This 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
2430Link Object.
2531
2632An 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)
3541| --------------- | -------------------- | ----------- |
3642| rel | string | ** REQUIRED** . Must be set to ` wmts ` . |
3743| 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 ` . |
3845| href: servers | \[ string] | See [ href: servers ] ( #hrefservers ) below for details. |
3946| 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. |
4047| 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
5158
5259Links to a XYZ, also known as slippy map.
5360
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. |
5967
6068#### href
6169
@@ -65,6 +73,16 @@ If `{s}` is used, the field [`href:servers`](#hrefservers) MUST be provided.
6573All other parameters should be [ hard-coded] ( https://github.com/stac-extensions/web-map-links/issues/2 ) with specific values,
6674e.g. the ` {r} ` parameter in Leaflet could be replaced by ` 2x ` .
6775
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+
6886### General
6987
7088The following field applies to multiple types of web mapping services:
@@ -97,10 +115,10 @@ for running tests are copied here for convenience.
97115
98116### Running tests
99117
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.
101119To run tests locally, you'll need ` npm ` , which is a standard part of any [ node.js installation] ( https://nodejs.org/en/download/ ) .
102120
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
104122your command line run:
105123``` bash
106124npm install
0 commit comments