62,23 → 62,15 |
// Initialisation des variables |
$this->ressources = $ressources; |
$this->param = $param; |
if ($this->analyserRessources() == true) { |
$resultat = $this->formerLegende(); |
} else { |
$this->traiterParametres(); |
$resultat = $this->formerCarte(); |
} |
return $resultat; |
} |
|
public function formerCarte() { |
$this->traiterParametres(); |
$this->creerFormateur(); |
$this->cartesFormateur->initialiserImage(); |
|
|
$inventories = $this->cartesFormateur->chargerDonnees(); |
$retour = ''; |
if (is_array($inventories) && $inventories !== array()){ |
$this->chargerVille();// Connection referentiel communes |
// Connection referentiel communes |
$this->chargerVille(); |
list($text, $merge) = $this->calculerRepartition($inventories); |
// Définition des couleurs des points |
$couleurs = $this->cartesFormateur->definirCouleurs(); |
116,22 → 108,7 |
} |
} |
} |
private function analyserRessources() { |
$ok = false; |
if (isset($this->ressources[0]) && $this->ressources[0] == 'legende') { |
$ok = true; |
} |
return $ok; |
} |
|
private function formerLegende() { |
$classe = 'LegendeCartes'; |
require_once dirname(__FILE__).DS.'cartes'.DS.$classe.'.php'; |
$sousService = new $classe(new Conteneur()); |
$resultat = $sousService->consulter($this->ressources, $this->param); |
return $resultat; |
} |
|
private function traiterParametres() { |
$this->info['miniature'] = (isset($this->param['retour.format'])) ? $this->param['retour.format'] : false; |
$this->info['src_map'] = ($this->info['miniature'] == 'min') ? 'france_utm_miniature.png' : 'france_utm_600x564.png'; |