💄 Switch to CARTO tiles

This commit is contained in:
itskovacs 2025-07-19 12:03:15 +02:00
parent 20517dfe56
commit 606a78a95f

View File

@ -33,12 +33,15 @@ export function createMap(contextMenuItems?: ContextMenuItem[]): L.Map {
.setZoom(10) .setZoom(10)
.setMaxBounds(bounds); .setMaxBounds(bounds);
L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", { L.tileLayer(
maxZoom: 17, "https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",
minZoom: 5, {
attribution: maxZoom: 17,
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>', minZoom: 5,
}).addTo(map); attribution:
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, &copy; <a href="https://carto.com/attributions">CARTO</a>',
},
).addTo(map);
return map; return map;
} }