decode custom layer urls

This commit is contained in:
vcoppe
2024-09-04 12:45:40 +02:00
parent e733c96c5a
commit a3dc17d780

View File

@@ -113,7 +113,7 @@
let layer: CustomLayer = {
id: layerId,
name: name,
tileUrls: tileUrls,
tileUrls: tileUrls.map((url) => decodeURI(url.trim())),
maxZoom: maxZoom,
layerType: layerType,
resourceType: resourceType,
@@ -121,14 +121,14 @@
};
if (resourceType === 'vector') {
layer.value = tileUrls[0];
layer.value = layer.tileUrls[0];
} else {
layer.value = {
version: 8,
sources: {
[layerId]: {
type: 'raster',
tiles: tileUrls,
tiles: layer.tileUrls,
tileSize: 256,
maxzoom: maxZoom
}