From 1a7f236e9bcad5d6d3ee8df4397b5af8b73ecc98 Mon Sep 17 00:00:00 2001 From: Kowalski Date: Mon, 10 Mar 2025 16:04:45 +0100 Subject: [PATCH] =?UTF-8?q?Leteck=C3=A9=20mapy.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/js/mapa.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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: