Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 321 → Rev 322

/trunk/services/modules/0.1/eflore/Cartes.php
62,15 → 62,23
// Initialisation des variables
$this->ressources = $ressources;
$this->param = $param;
$this->traiterParametres();
if ($this->analyserRessources() == true) {
$resultat = $this->formerLegende();
} else {
$this->traiterParametres();
$resultat = $this->formerCarte();
}
return $resultat;
}
public function formerCarte() {
$this->creerFormateur();
$this->cartesFormateur->initialiserImage();
$inventories = $this->cartesFormateur->chargerDonnees();
$retour = '';
if (is_array($inventories) && $inventories !== array()){
// Connection referentiel communes
$this->chargerVille();
$this->chargerVille();// Connection referentiel communes
list($text, $merge) = $this->calculerRepartition($inventories);
// Définition des couleurs des points
$couleurs = $this->cartesFormateur->definirCouleurs();
108,7 → 116,22
}
}
}
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';