diff --git a/www/js/mapa.js b/www/js/mapa.js index 5a2dbeb..87a69d6 100644 --- a/www/js/mapa.js +++ b/www/js/mapa.js @@ -5,6 +5,11 @@ var mapyCZ = L.tileLayer(`https://api.mapy.cz/v1/maptiles/basic/256/{z}/{x}/{y}? maxZoom: 19, attribution: '© Seznam.cz a.s. a další', }) +var mapyCZletecka = L.tileLayer(`https://api.mapy.cz/v1/maptiles/aerial/256/{z}/{x}/{y}?apikey=${API_KEY}`, { + minZoom: 0, + maxZoom: 19, + attribution: '© Seznam.cz a.s. a další', +}) /* We also require you to include our logo somewhere over the map. We create our own map control implementing a documented interface, @@ -28,29 +33,31 @@ const LogoControl = L.Control.extend({ return container; }, }); -// OpenStreetMap: + +// OpenStreetMap - base: var osm = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 19, attribution: '© OpenStreetMap' }) -// Výchozí bod: +// Výchozí bod + podkladové mapy: var map = L.map('map', { center: [50.853501146, 14.8425], // Hrádek zoom: 16, - layers: [mapyCZ, osm] + layers: [mapyCZ, mapyCZletecka, osm] }); // Rámeček s výběrem podkladů: var baseMaps = { "Mapy.cz": mapyCZ, + "Mapy.cz (letecká)": mapyCZletecka, "OpenStreetMap": osm }; var layerControl = L.control.layers(baseMaps).addTo(map); // finally we add our LogoControl to the map new LogoControl().addTo(map, { - layers: [osm, mapyCZ] + layers: [mapyCZ, mapyCZletecka] }); // futury: