diff --git a/app/Presentation/@layout.latte b/app/Presentation/@layout.latte index 33d962a..59642c0 100644 --- a/app/Presentation/@layout.latte +++ b/app/Presentation/@layout.latte @@ -2,7 +2,7 @@ - + {* bootstrap: *} diff --git a/app/Presentation/Home/default.latte b/app/Presentation/Home/default.latte index 296f6a8..493322f 100644 --- a/app/Presentation/Home/default.latte +++ b/app/Presentation/Home/default.latte @@ -1,14 +1,8 @@ {* This is the welcome page, you can delete it *} {block content} - - -
-
-
+ diff --git a/www/css/base.css b/www/css/base.css index d1baa11..58397d6 100644 --- a/www/css/base.css +++ b/www/css/base.css @@ -1 +1,8 @@ -#map { height: 720px; } \ No newline at end of file +body { + padding: 0; + margin: 0; +} +html, body, #map { + height: 100%; + width: 100vw; +} \ No newline at end of file diff --git a/www/js/obvody.js b/www/js/obvody.js index fee1df0..6da7788 100644 --- a/www/js/obvody.js +++ b/www/js/obvody.js @@ -2965,4 +2965,24 @@ var geojson; geojson = L.geoJSON(geojsonFeature, { style: style, onEachFeature: onEachFeature -}).addTo(map); \ No newline at end of file +}).addTo(map); + +// geolokace: +map.locate({setView: true, maxZoom: 16}); + +function onLocationFound(e) { + var radius = e.accuracy; + + L.marker(e.latlng).addTo(map) + .bindPopup("Nacházíte se v okolí " + radius + " metrů od tohoto bodu.").openPopup(); + + L.circle(e.latlng, radius).addTo(map); +} + +map.on('locationfound', onLocationFound); + +function onLocationError(e) { + alert(e.message); +} + +map.on('locationerror', onLocationError); \ No newline at end of file