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 - Hot)
 
(No se muestran 2 ediciones intermedias del mismo usuario)
Línea 10: Línea 10:


= OSM =
= OSM =
== OSM Standard ==
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);


== OSM HOT ==
== OSM HOT ==
Línea 24: Línea 18:
         attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap<\/a> contributors',
         attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap<\/a> contributors',
     }
     }
).addTo(map);
== OSM Standard ==
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);
  ).addTo(map);


Línea 35: Línea 38:
     minZoom: 1,
     minZoom: 1,
     maxZoom: 16
     maxZoom: 16
  }).addTo(map)
  }).addTo(map);

Revisión actual - 12:50 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

OSM HOT

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

OSM Standard

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

Stamen

const stamenLayer = L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png', {
    attribution:
      'Map tiles by <a href="http://stamen.com">Stamen Design<\/a>, ' +
      '<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0<\/a> — ' +
      'Map data {attribution.OpenStreetMap}',
    minZoom: 1,
    maxZoom: 16
}).addTo(map);