Skip to content

Commit

Permalink
Map viewer / fix TMS layer persistence in map context (geonetwork#8173)
Browse files Browse the repository at this point in the history
  • Loading branch information
josegar74 authored Jun 13, 2024
1 parent 3a69a56 commit c8ce59f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2323,7 +2323,8 @@
source: new ol.source.XYZ({
url: opt.url
}),
title: title || "TMS Layer"
title: title || "TMS Layer",
name: opt.name
});
case "bing_aerial":
return new ol.layer.Tile({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,19 @@
service: "urn:ogc:serviceType:WMS"
}
];
} else if (source instanceof ol.source.TileImage) {
name = "{type=tms,name=" + layer.get("name") + "}";

params.server = [
{
onlineResource: [
{
href: layer.getSource().getUrls()[0]
}
],
service: "urn:ogc:serviceType:WMTS"
}
];
} else {
return;
}
Expand Down

0 comments on commit c8ce59f

Please sign in to comment.