Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 1160 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
990 isa 1
<?php
2
// declare(encoding='UTF-8');
3
/**
4
 * Classe mère du module Liste.
5
 *
6
 * @category	PHP 5.2
7
 * @package		eflore-consultation
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
10
 * @copyright	2011 Tela-Botanica
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
13
 * @version		$Id$
14
 */
15
class Repartition extends aControleur {
16
 
17
	private $conteneur = null;
18
	private $nomCourant = null;
19
	private $donnees = array();
20
	private $cartes;
21
 
22
	public function __construct(Conteneur $conteneur) {
23
		$this->conteneur = $conteneur;
24
		$this->nomCourant = $this->conteneur->getNomCourant();
25
		$this->cartes = $this->conteneur->getApiCartes();
26
	}
27
 
28
	public function getDonnees() {
29
		$donnees['chorodep'] = $this->getChorodepMiniature();
30
		return $donnees;
31
	}
32
 
33
	private function getChorodepMiniature() {
34
		$this->cartes->setProjet('chorodep');
1160 raphael 35
		$this->cartes->setLargeur('570x534');
990 isa 36
		//TODO: démochir ce code
37
		// Chargement des nn des synonymes pour obtenir une carte plus complète
38
		$noms = $this->conteneur->getApiNoms();
39
		$syns = $noms->getSynonymes($this->nomCourant->getNnr());
40
		$nns_syns = array_keys($syns['resultat']);
41
		$nns_syns[] = $this->nomCourant->getNnr();
42
		$id = 'nn:'.implode(',', $nns_syns);
43
		$this->cartes->setId($id);
1160 raphael 44
		return $this->cartes->getUrlDataSvg();
990 isa 45
	}
46
}
47
?>