declare const L; // leaflet
export function getLayers(name?) {
let layers = {
osm: {
title: 'osm',
icon: 'assets/img/icons/openstreetmap_mapnik.png',
layer: L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 19 })
},
osm_bw: {
title: 'osm_bw',
icon: 'assets/img/icons/openstreetmap_blackandwhite.png',
layer: L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', { maxZoom: 18 })
},
osm_hot: {
title: 'osm_hot',
icon: "assets/img/icons/openstreetmap_hot.png",
layer: L.tileLayer("https://tile-{s}.openstreetmap.fr/hot/{z}/{x}/{y}.png")
},
osm_fr: {
title: "osm_fr",
icon: "assets/img/icons/osm_fr.png",
layer: L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', { maxZoom: 20 })
},
wiki: {
title: "wiki",
icon: "assets/img/icons/wikimap.png",
layer: L.tileLayer('https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png', { minZoom: 1, maxZoom: 19 })
},
toner: {
title: 'toner',
icon: 'assets/img/icons/stamen_toner.png',
layer: L.tileLayer('http://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png', {
subdomains: 'abcd',
minZoom: 0,
maxZoom: 20,
ext: 'png'
})
},
ocean: {
title: 'ocean',
icon: 'assets/img/icons/esri_oceanbasemap.png',
layer:
L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/tile/{z}/{y}/{x}', { maxZoom: 13 })
},
voyager: {
title: "voyager",
icon: "assets/img/icons/voyager.png",
layer: L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png', { subdomains: 'abcd', maxZoom: 19 })
}
// osm_de: {
// title: 'osm_de',
// icon: 'assets/img/icons/openstreetmap_de.png',
// layer: L.tileLayer('http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', { maxZoom: 18 })
// },
}
if (name) return layers[name].layer;
else return Object.values(layers);
}
// /** Free */
// var OpenStreetMap_France = L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {
// maxZoom: 20,
// attribution: '© Openstreetmap France | © OpenStreetMap contributors'
// });
// var OpenStreetMap_BZH = L.tileLayer('https://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png', {
// maxZoom: 19,
// attribution: '© OpenStreetMap contributors, Tiles courtesy of Breton OpenStreetMap Team',
// bounds: [[46.2, -5.5], [50, 0.7]]
// });
// var OpenTopoMap = L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', {
// maxZoom: 17,
// attribution: 'Map data: © OpenStreetMap contributors, SRTM | Map style: © OpenTopoMap (CC-BY-SA)'
// });
// var Stadia_AlidadeSmooth = L.tileLayer('https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png', {
// maxZoom: 20,
// attribution: '© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors'
// });
// var Stadia_AlidadeSmoothDark = L.tileLayer('https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png', {
// maxZoom: 20,
// attribution: '© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors'
// });
// var Stadia_Outdoors = L.tileLayer('https://tiles.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}{r}.png', {
// maxZoom: 20,
// attribution: '© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors'
// });
// var CyclOSM = L.tileLayer('https://dev.{s}.tile.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png', {
// maxZoom: 20,
// attribution: 'CyclOSM | Map data: © OpenStreetMap contributors'
// });
// var Stadia_OSMBright = L.tileLayer('https://tiles.stadiamaps.com/tiles/osm_bright/{z}/{x}/{y}{r}.png', {
// maxZoom: 20,
// attribution: '© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors'
// });
// var Esri_WorldStreetMap = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', {
// attribution: 'Tiles © Esri — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012'
// });
// // fix bound options
// var BasemapAT_basemap = L.tileLayer('https://maps{s}.wien.gv.at/basemap/geolandbasemap/{type}/google3857/{z}/{y}/{x}.{format}', {
// maxZoom: 20,
// attribution: 'Datenquelle: basemap.at',
// subdomains: ["", "1", "2", "3", "4"],
// type: 'normal',
// format: 'png',
// bounds: [[46.35877, 8.782379], [49.037872, 17.189532]]
// });
// var Wikimedia = L.tileLayer('https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png', {
// attribution: 'Wikimedia',
// minZoom: 1,
// maxZoom: 19
// });
// /** Key Required */
// var Thunderforest_OpenCycleMap = L.tileLayer('https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey={apikey}', {
// attribution: '© Thunderforest, © OpenStreetMap contributors',
// apikey: '',
// maxZoom: 22
// });
// var Thunderforest_Transport = L.tileLayer('https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey={apikey}', {
// attribution: '© Thunderforest, © OpenStreetMap contributors',
// apikey: '',
// maxZoom: 22
// });
// var Thunderforest_MobileAtlas = L.tileLayer('https://{s}.tile.thunderforest.com/mobile-atlas/{z}/{x}/{y}.png?apikey={apikey}', {
// attribution: '© Thunderforest, © OpenStreetMap contributors',
// apikey: '',
// maxZoom: 22
// });
// var Thunderforest_Pioneer = L.tileLayer('https://{s}.tile.thunderforest.com/pioneer/{z}/{x}/{y}.png?apikey={apikey}', {
// attribution: '© Thunderforest, © OpenStreetMap contributors',
// apikey: '',
// maxZoom: 22
// });
// var Thunderforest_Outdoors = L.tileLayer('https://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey={apikey}', {
// attribution: '© Thunderforest, © OpenStreetMap contributors',
// apikey: '',
// maxZoom: 22
// });
// var Thunderforest_Neighbourhood = L.tileLayer('https://{s}.tile.thunderforest.com/neighbourhood/{z}/{x}/{y}.png?apikey={apikey}', {
// attribution: '© Thunderforest, © OpenStreetMap contributors',
// apikey: '',
// maxZoom: 22
// });