Leaflet Layers

De Wiki Proyectos Beta
Revisión del 12:18 12 may 2023 de Josego (discusión | contribs.) ([feat] Add information Leaflet Layers)
Ir a la navegación Ir a la búsqueda

Google Streets

const googleStreetsLayer = L.tileLayer(
    "http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}",
    {
        maxZoom: 20,
        subdomains: ["mt0", "mt1", "mt2", "mt3"],
    }
).addTo(map);

OSM

const osmLayer = L.tileLayer("https://{s}.tile.osm.org/{z}/{x}/{y}.png", {
    attribution: '© <a href="https://osm.org/copyright">OpenStreetMap<\/a> contributors',
}).addTo(map);