Browse Source

Corrige un bug

master
vincent 5 days ago
parent
commit
fdda1ea690
2 changed files with 6 additions and 2 deletions
  1. +1
    -1
      src/Controller/MapController.php
  2. +5
    -1
      src/Entity/Task.php

+ 1
- 1
src/Controller/MapController.php View File

@ -26,7 +26,7 @@ class MapController extends AbstractController
// TODO dans le cas d’un nœud il n’y a pas de bounds mais on doit
// pouvoir trouver les coins d’une bbox autour sans trop de difficultés
if (isset($element['bounds'])) {
if (isset($element['bounds']) and isset($element['type'])) {
$josmCommands['load_and_zoom'] = [
'bottom' => $element['bounds']['minlat'],
'top' => $element['bounds']['maxlat'],


+ 5
- 1
src/Entity/Task.php View File

@ -166,7 +166,11 @@ class Task
public function hasGeojson(): bool
{
return isset($this->geojson);
return (
isset($this->geojson)
and !empty($this->geojson)
and ($this->geojson !== '{}')
);
}
public function getGeojson(): ?string


Loading…
Cancel
Save