Diferencia entre revisiones de «Leaflet Layers»

De Wiki Proyectos Beta
Ir a la navegación Ir a la búsqueda
([feat] Add information Leaflet Layers)
 
([feat] Add information Leaflet Layers)
Línea 8: Línea 8:
     }
     }
  ).addTo(map);
  ).addTo(map);
= OSM =
const osmLayer = L.tileLayer("https://{s}.tile.osm.org/{z}/{x}/{y}.png", {
    attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap<\/a> contributors',
}).addTo(map);

Revisión del 12:18 12 may 2023

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);