You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| rel | string |**REQUIRED**. Must be set to `wmts`. |
77
-
| href | string |**REQUIRED**. Link to the WMTS, without any WMTS specific query parameters. |
78
-
| type | string | The media type to be used for the tile requests, e.g. `image/png` or `image/jpeg`. |
79
+
| href | string |**REQUIRED**. Link to the WMTS, without any WMTS specific parameters. |
79
80
| href:servers|\[string]| See [href:servers](#hrefservers) below for details. |
80
-
| 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. |
81
-
| wmts:dimensions| Map\<string, string> | Any additional dimension parameters to add to the request as key-value-pairs, usually added as query parameters. |
81
+
| wmts:layer| string\|\[string]|**REQUIRED**. The layers to show on the map, either a list of layer names (KVP only) or a single layer name (REST and KVP). |
82
+
| wmts:encoding| string | The WMTS request encoding, either `kvp` for [KVP](#kvp) or `rest`for [REST](#rest). Defaults to `kvp`. |
83
+
84
+
**href**:
82
85
83
-
If you provide multiple array elements in `wmts:layer` (e.g. `["layerA", "layerB"]`),
86
+
- For REST encoding, the `href` must point to the capabilities document.
87
+
- For KVP encoding, the `href` points to the URL of the capabilities document without any query parameters.
88
+
So if your Capabilities can be requested from `https://example.com/geoserver/service/wmts?service=wmts&request=GetCapabilities`
89
+
you'd provide `https://example.com/geoserver/service/wmts` as `href`.
90
+
- The `href` can contain an optional server placeholder `{s}`. If `{s}` is used, the field [`href:servers`](#hrefservers) MUST be provided.
91
+
92
+
**wmts:layer**: If you provide multiple array elements in `wmts:layer` (e.g. `["layerA", "layerB"]`),
84
93
each should occur in a separate layer in the mapping library so that individual requests for the layers are sent.
94
+
For REST-encoding only a single string can be provided.
95
+
96
+
#### KVP
97
+
98
+
This describes the key-value-pair (KVP) request encoding,
99
+
which uses query parameters to transmit additional parameters.
| type | string | If provided, must be set to `application/xml`. |
114
+
| wmts:encoding| string |**REQUIRED**. Must be set to `rest`. |
115
+
| uriTemplate | string | Can override the URL template from the capabilities document with a custom version that can be customized with the `variables` provided. |
116
+
| variables | Map\<string, \*> | This object contains one key per substitution variable in the `urlTemplate`. |
91
117
92
-
The `href` can contain an optional server placeholder `{s}`. If `{s}` is used, the field [`href:servers`](#hrefservers) MUST be provided.
118
+
**variables**: This object may provide a JSON Schema definition for any variable defined in the `uriTemplate`,
119
+
allowing to provide the default value for the specific STAC resource or the specification of ranges or other constraints.
120
+
121
+
The variables `{TileMatrixSet}`, `{TileMatrix}`, `{TileRow}`, `{TileCol}` do not need to be provided
122
+
explicitly in the `variables` as they can be determined from the capabilities.
123
+
Nevertheless, the corresponding variables can be provided if they should be further restricted to certain values or other contraints.
124
+
125
+
Providing a reasonable default value for all variables is strongly recommended as they
126
+
are likely to be used for a default visualization.
127
+
Additional information such as the data type of the variable, enumerations, minimum values, maximum values, etc.
128
+
can be provided for creating interactive UIs where the user can select values depending on the schema.
129
+
Note that clients may have varying capabilities to parse and handle the schemas provided for the variables.
130
+
If you want to ensure that the WMTS can be easily read, stick to very simple schemas
131
+
(e.g., enums for strings, minimum/maximum values for numbers).
132
+
133
+
Variables with a constant value should be encoded directly in the URL without using a variable.
93
134
94
135
### PMTiles
95
136
@@ -119,9 +160,7 @@ Links to a XYZ, also known as slippy map.
119
160
| type | string | Recommended to be set to the image file type the XYZ returns by default, usually `image/png` or `image/jpeg`. |
120
161
| href:servers|\[string]| See [href:servers](#hrefservers) below for details. |
121
162
122
-
#### href
123
-
124
-
For XYZ, the `href` is a templated URI.
163
+
**href**: For XYZ, the `href` is a templated URI.
125
164
It MUST include the following placeholders: `{x}`, `{y}` and `{z}` and MAY include a placeholder for the server: `{s}`.
126
165
If `{s}` is used, the field [`href:servers`](#hrefservers) MUST be provided.
127
166
All other parameters should be [hard-coded](https://github.com/stac-extensions/web-map-links/issues/2) with specific values,
Copy file name to clipboardExpand all lines: json-schema/schema.json
+64-25Lines changed: 64 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -70,38 +70,77 @@
70
70
}
71
71
},
72
72
"then": {
73
-
"required": [
74
-
"wmts:layer"
73
+
"allOf": [
74
+
{
75
+
"$ref": "#/definitions/servers"
76
+
}
75
77
],
76
-
"properties": {
77
-
"wmts:layer": {
78
-
"oneOf": [
79
-
{
80
-
"type": "string",
81
-
"minLength": 1
82
-
},
83
-
{
84
-
"type": "array",
85
-
"minItems": 1,
86
-
"items": {
78
+
"if": {
79
+
"required": [
80
+
"wmts:encoding"
81
+
],
82
+
"properties": {
83
+
"wmts:encoding": {
84
+
"const": "rest"
85
+
}
86
+
}
87
+
},
88
+
"then": {
89
+
"$comment": "REST request encoding",
90
+
"required": [
91
+
"wmts:layer"
92
+
],
93
+
"properties": {
94
+
"wmts:layer": {
95
+
"type": "string",
96
+
"minLength": 1
97
+
},
98
+
"wmts:encoding": {
99
+
"const": "rest"
100
+
},
101
+
"uriTemplate": {
102
+
"type": "string",
103
+
"minLength": 1
104
+
},
105
+
"variables": {
106
+
"type": "object",
107
+
"description": "This object contains one key per substitution variable in the templated URL. Each key defines the schema of one substitution variable using a JSON Schema fragment and can thus include things like the data type of the variable, enumerations, minimum values, maximum values, etc."
0 commit comments