diff --git a/lib/layer/format/tiles.mjs b/lib/layer/format/tiles.mjs index d76d1cba5..62af5a7bc 100644 --- a/lib/layer/format/tiles.mjs +++ b/lib/layer/format/tiles.mjs @@ -1,10 +1,14 @@ export default layer => { + layer.source ??= 'OSM' + + layer.projection ??= 'EPSG:3857' + layer.L = new ol.layer.Tile({ - source: new ol.source.OSM({ + source: new ol.source[layer.source]({ + projection: layer.projection, url: decodeURIComponent(layer.URI), - opaque: false, - transition: 0, + transition: 0 }), layer: layer, zIndex: layer.style?.zIndex || 0