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`. |
79
-
| href | string |**REQUIRED**. Link to the WMTS, without any WMTS specific query parameters. |
80
-
| 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. |
81
80
| href:servers|\[string]| See [href:servers](#hrefservers) below for details. |
82
-
| wmts:dimensions| Map\<string, string> | Any additional parameters for the request (see below). |
83
-
| wmts:encoding| string | Either `kvp` (see [KVP](#kvp)) or `rest` (see [REST](#rest)). Defaults to `KVP`. |
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**:
84
85
85
-
The `href` can contain an optional server placeholder `{s}`. If `{s}` is used, the field [`href:servers`](#hrefservers) MUST be provided.
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"]`),
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.
86
95
87
96
#### KVP
88
97
@@ -91,36 +100,28 @@ which uses query parameters to transmit additional parameters.
| type | string | The media type to be used for the tile requests, e.g. `image/png` or `image/jpeg`. |
94
104
| wmts:encoding| string | If provided, must be set to `kvp`. |
95
-
| 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. Will be added to the request as a query parameter. |
96
105
| wmts:dimensions| Map\<string, string> | Any additional dimension parameters to add to the request as key-value-pairs (i.e. query parameters). |
97
106
98
-
**href**: For the KVP request encoding, the `href` is pointing to the URL of the Capabilities document,
99
-
but without the query parameters for the Capabilities request.
100
-
So if your Capabilities can be requested from `https://example.com/geoserver/service/wmts?service=wmts&request=GetCapabilities`
101
-
you'd provide `https://example.com/geoserver/service/wmts` as `href`.
102
-
103
-
**wmts:layer**: If you provide multiple array elements in `wmts:layer` (e.g. `["layerA", "layerB"]`),
104
-
each should occur in a separate layer in the mapping library so that individual requests for the layers are sent.
105
-
106
107
#### REST
107
108
108
109
This describes the REST request encoding, which provides a URL template with variables.
| 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`. |
114
117
115
-
**href**: For the REST request encoding, the `href` is a URL template.
116
-
Variables with a constant value should be encoded directly in the URL without using a variable.
117
-
118
-
**variables**: Each key defines the schema of one substitution variable using a JSON Schema fragmen
118
+
**variables**: Each key defines the schema of one substitution variable using a JSON Schema fragmen
119
119
and can thus include things like the data type of the variable, enumerations, minimum values, maximum values, etc.
120
120
Note that clients may have varying capabilities to parse and hanle the schemas provided for the variables.
121
121
If you want to ensure that the WMTS can be easily read, stick to very simply schemas
122
122
(e.g., enums for strings, minimum/maximum values for numbers).
123
123
Providing a reasonable default value for all variables is recommended.
124
+
Variables with a constant value should be encoded directly in the URL without using a variable.
Copy file name to clipboardExpand all lines: json-schema/schema.json
+11-16Lines changed: 11 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -84,10 +84,21 @@
84
84
},
85
85
"then": {
86
86
"$comment": "REST request encoding",
87
+
"required": [
88
+
"wmts:layer"
89
+
],
87
90
"properties": {
91
+
"wmts:layer": {
92
+
"type": "string",
93
+
"minLength": 1
94
+
},
88
95
"wmts:encoding": {
89
96
"const": "rest"
90
97
},
98
+
"uriTemplate": {
99
+
"type": "string",
100
+
"minLength": 1
101
+
},
91
102
"variables": {
92
103
"type": "object",
93
104
"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