template->appVersion = Konstanty::verze; if (!$this->getUser()->isLoggedIn()) { $this->template->navrat = $this->storeRequest(); } } public function renderDefault(int $obvod = null): void { try { // načti seznam obvodů: $content = FileSystem::read('../www/data/geo-obvody.geojson'); // dekóduj geo-json: $geoObvody = Json::decode($content, true); } catch (Nette\Utils\JsonException $e) { // Ošetření výjimky } if (empty($geoObvody)) return; $obvody = array(); foreach ($geoObvody["features"] as $o) { $obvody[] = $o["properties"]["number"]; } asort($obvody); $this->template->obvody = $obvody; bdump($geoObvody["features"]); bdump($obvody); } }