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`. |
37
37
| href | string |**REQUIRED**. Link to the WMTS, without any WMTS specific query parameters. |
38
-
| wmts:layer| string\|\[string]|**REQUIRED**. The layers to show on the map, either a list of layer names or a single layer name. |
38
+
| href:servers|\[string]| See [href:servers](#hrefservers) below for details. |
39
+
| 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. |
39
40
| wmts:dimensions| Map\<string, string> | Any additional dimension parameters to add to the request as key-value-pairs, usually added as query parameters. |
40
41
42
+
#### href
43
+
44
+
For WMTS, the `href` is pointing to the URL of the Capabilities document, but without the query parameters for the Capabilities request.
45
+
So if your Capabilities can be requested from `https://example.com/geoserver/service/wmts?service=wmts&request=GetCapabilities`
46
+
you'd provide `https://example.com/geoserver/service/wmts` as `href`.
47
+
48
+
The `href` can contain an optional server placeholder `{s}`. If `{s}` is used, the field [`href:servers`](#hrefservers) MUST be provided.
| rel | string |**REQUIRED**. Must be set to `xyz`. |
48
-
| href | string |**REQUIRED**. Link to the XYZ as a templates URI. MUST include the following placeholders: `{x}`, `{y}` and `{z}`. MAY include a placeholder for the server: `{s}`|
49
-
| xyz:servers| array | REQUIRED if `{s}` is used in the `href`. A list of allowed values for the placeholder `{s}`. |
57
+
| href | string |**REQUIRED**. Link to the XYZ as a templated URI. |
58
+
| href:servers|\[string]| See [href:servers](#hrefservers) below for details. |
59
+
60
+
#### href
61
+
62
+
For XYZ, the `href` is a templated URI.
63
+
It MUST include the following placeholders: `{x}`, `{y}` and `{z}` and MAY include a placeholder for the server: `{s}`.
64
+
If `{s}` is used, the field [`href:servers`](#hrefservers) MUST be provided.
65
+
All other parameters should be [hard-coded](https://github.com/stac-extensions/web-map-links/issues/2) with specific values,
66
+
e.g. the `{r}` parameter in Leaflet could be replaced by `2x`.
67
+
68
+
### General
69
+
70
+
The following field applies to multiple types of web mapping services:
71
+
72
+
| Field Name | Type | Description |
73
+
| ------------ | --------- | ----------- |
74
+
| href:servers|\[string]| A list of replacement values for `{s}` in `href`s. |
75
+
76
+
#### href:servers
77
+
78
+
This field is used to specify a set of URLs for a web mapping library so that requests can be sent to multiple servers,
79
+
which can avoid request limits in web browsers.
80
+
81
+
The field is used across multiple types of web mapping services and applies currently to XYZ and WMTS.
82
+
83
+
It is **REQUIRED** if `{s}` is used in the `href` and then a list of at least 2 allowed values for the placeholder `{s}` must be provided.
84
+
If you only have a single value don't provide `href:servers` and instead hard-code the value into the href.
85
+
86
+
The implementations can expand the given values into multiple URLs.
87
+
For example, if you provide `https://{s}/example` as `href` and `href:servers` is `["a.com", "b.eu"]`
88
+
you can expand that to `["https://a.com/example", "https://b.eu/example"]`.
0 commit comments