var osm = L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png', {
attribution: '© OpenStreetMap contributors © CARTO',
subdomains: 'abcd',
maxZoom: 28
});
mapLink = 'Esri';
wholink = 'i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and\ the GIS User Community';
var sat = L.tileLayer(
'http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/ti\le/{z}/{y}/{x}', {
attribution: '© '+mapLink+', '+wholink,
maxZoom: 28,
});
var mapa = L.tileLayer('https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {
maxZoom: 28,
attribution: '© OpenStreetMap contributors, Tiles style by Humanitarian OpenStreetMap Team hosted by OpenStreetMap France'
});
var google = L.tileLayer('https://mt1.google.com/vt/lyrs=r&x={x}&y={y}&z={z}', {attribution: 'Google Maps'});
var pnoa = L.tileLayer.wms("http://www.ign.es/wms-inspire/pnoa-ma?SERVICE=WMS&", {
layers: "OI.OrthoimageCoverage",//nombre de la capa (ver get capabilities)
format: 'image/jpeg',
transparent: true,
version: '1.3.0',//wms version (ver get capabilities)
maxZoom: 28,
attribution: "PNOA WMS. Cedido por © Instituto Geográfico Nacional de España"
});
var googleSat = L.tileLayer('http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}',{
maxZoom: 25,
subdomains:['mt0','mt1','mt2','mt3']
});
var pnoa2 = L.tileLayer.wms("https://www.ign.es/wmts/pnoa-ma?layer=OI.OrthoimageCoverage&style=default&tilematrixset=GoogleMapsCompatible&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/jpeg&TileMatrix={z}&TileCol={y}&TileRow={x}", {
service:'',
request:'',
srs:'',
transparent: true,
maxZoom: 28,
attribution: "PNOA WMTS. Cedido por © Instituto Geográfico Nacional de España"
});
var alto_contraste = L.tileLayer('https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png', {
maxZoom: 20,
attribution: '© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors'
});
var baseMaps = {
"OSM" : osm,
"ESRI sat" : sat,
"PNOA" : pnoa,
"Google Street" : google,
"Google Satellite" : googleSat,
};