fix: try to add attribution to wmts
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
This commit is contained in:
parent
41974cf613
commit
90100e79d9
2 changed files with 6 additions and 0 deletions
|
|
@ -778,4 +778,8 @@
|
|||
</TileMatrixSet>
|
||||
</Contents>
|
||||
<ServiceMetadataURL xlink:href="{{baseUrl}}styles/{{id}}/wmts.xml"/>
|
||||
<Attribution>
|
||||
<Title>{{tileJSON.attribution}}</Title>
|
||||
<OnlineResource xlink:type="simple" xlink:href="{{baseUrl}}styles/{{id}}/wmts.xml"/>
|
||||
</Attribution>
|
||||
</Capabilities>
|
||||
|
|
|
|||
|
|
@ -558,6 +558,7 @@ function start(opts) {
|
|||
*/
|
||||
serveTemplate('/styles/:id/wmts.xml', 'wmts', (req) => {
|
||||
const { id } = req.params;
|
||||
const { tileJSON } = serving.rendered[id];
|
||||
const wmts = clone((serving.styles || {})[id]);
|
||||
|
||||
if (!wmts) {
|
||||
|
|
@ -582,6 +583,7 @@ function start(opts) {
|
|||
return {
|
||||
...wmts,
|
||||
id,
|
||||
tileJSON,
|
||||
name: (serving.styles[id] || serving.rendered[id]).name,
|
||||
baseUrl,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue