Im looking for a way to integrate the tileLayer in the map but with internal path, not with an external path like this :
https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png
This is my JS :
import "leaflet";
const $map = document.querySelector(".searchResult__map"),
manifest = JSON.parse($map.dataset.manifest),
map = L.map($map, { scrollWheelZoom: false }).setView(
[45.7693171, 2.5910832], 6
),
layerTile = "https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",
//This is Not working :
//layerTile = "../../../../img/tile/{z}/{x}/{y}{r}.png",
layerAttribution = window.location.pathname.includes("/en/")
? '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'
: '© <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>';
L.tileLayer(layerTile, {
attribution: layerAttribution,
}).addTo(map);
for (const [id, data] of Object.entries(manifest)) {
const $popin = document.querySelector(
`.searchResult__mapPopins .villageCard--popin[data-id="${id}"]`
);
L.marker([data.lat, data.lng])
.addTo(map)
.bindPopup($popin.innerHTML);
}