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>
|
</TileMatrixSet>
|
||||||
</Contents>
|
</Contents>
|
||||||
<ServiceMetadataURL xlink:href="{{baseUrl}}styles/{{id}}/wmts.xml"/>
|
<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>
|
</Capabilities>
|
||||||
|
|
|
||||||
|
|
@ -558,6 +558,7 @@ function start(opts) {
|
||||||
*/
|
*/
|
||||||
serveTemplate('/styles/:id/wmts.xml', 'wmts', (req) => {
|
serveTemplate('/styles/:id/wmts.xml', 'wmts', (req) => {
|
||||||
const { id } = req.params;
|
const { id } = req.params;
|
||||||
|
const { tileJSON } = serving.rendered[id];
|
||||||
const wmts = clone((serving.styles || {})[id]);
|
const wmts = clone((serving.styles || {})[id]);
|
||||||
|
|
||||||
if (!wmts) {
|
if (!wmts) {
|
||||||
|
|
@ -582,6 +583,7 @@ function start(opts) {
|
||||||
return {
|
return {
|
||||||
...wmts,
|
...wmts,
|
||||||
id,
|
id,
|
||||||
|
tileJSON,
|
||||||
name: (serving.styles[id] || serving.rendered[id]).name,
|
name: (serving.styles[id] || serving.rendered[id]).name,
|
||||||
baseUrl,
|
baseUrl,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue