Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 366 | Rev 441 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 366 Rev 367
1
<?php
1
<?php
2
// declare(encoding='UTF-8');
2
// declare(encoding='UTF-8');
3
/**
3
/**
4
 * Classe gérant les images.
4
 * Classe gérant les images.
5
 *
5
 *
6
 * @category	PHP 5.2
6
 * @category	PHP 5.2
7
 * @package		eflore-consultation
7
 * @package		eflore-consultation
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
10
 * @copyright	2011 Tela-Botanica
10
 * @copyright	2011 Tela-Botanica
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
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
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
13
 * @version		$Id$
13
 * @version		$Id$
14
 */
14
 */
15
class Cartes extends Eflore {
15
class Cartes extends Eflore {
16
 
16
 
17
	private $id;
17
	private $id;
18
	private $largeur;
18
	private $largeur;
19
 
19
 
20
	public function setId($id) {
20
	public function setId($id) {
21
		$this->id = $id;
21
		$this->id = $id;
22
	}
22
	}
23
 
23
 
24
	public function setLargeur($largeur) {
24
	public function setLargeur($largeur) {
25
		$this->largeur = $largeur;
25
		$this->largeur = $largeur;
26
	}
26
	}
27
	
27
	
28
	public function setInfoNom($nom) {
28
	public function setInfoNom($nom) {
29
		$this->nom = $nom;
29
		$this->nom = $nom;
30
	} 
30
	} 
31
 
31
 
32
	public function getUrlDataSvg() {
32
	public function getUrlDataSvg() {
33
		$tpl = Config::get('carteTpl');
33
		$tpl = Config::get('carteTpl');
34
		$params = array('id' => $this->id, 'largeur' => $this->largeur, 'mime-type' => 'image/svg+xml');
34
		$params = array('id' => $this->id, 'largeur' => $this->largeur, 'mime-type' => 'image/svg+xml');
35
		$url = $this->formaterUrl($tpl, $params);
35
		$url = $this->formaterUrl($tpl, $params);
36
		return $url;
36
		return $url;
37
	}
37
	}
38
 
38
 
39
	public function getUrlPng() {
39
	public function getUrlPng() {
40
		$tpl = Config::get('carteTpl');
40
		$tpl = Config::get('carteTpl');
41
		$params = array('id' => $this->id, 'largeur' => $this->largeur, 'mime-type' => 'image/png');
41
		$params = array('id' => $this->id, 'largeur' => $this->largeur, 'mime-type' => 'image/png');
42
		$url = $this->formaterUrl($tpl, $params);
42
		$url = $this->formaterUrl($tpl, $params);
43
		return $url;
43
		return $url;
44
	}
44
	}
45
	
45
	
46
	public function getUrlMap() {
46
	public function getUrlMap() {
47
		$tpl = Config::get('efloreCarteTpl');
47
		$tpl = Config::get('efloreCarteTpl');
48
		$params = array('num_nom' => $this->nom->get('id'), 'num_tax' => $this->nom->get('num_taxonomique') ,
48
		$params = array('num_nom' => $this->nom->get('id'), 'num_tax' => $this->nom->get('num_taxonomique') ,
49
				'nom_sci' => $this->nom->get('nom_sci'), 'auteur' => $this->nom->get('auteur') ,
49
				'nom_sci' => $this->nom->get('nom_sci'), 'auteur' => $this->nom->get('auteur') ,
50
				'largeur' => $this->largeur, 'mime_type' => 'text/html');
50
				'largeur' => $this->largeur, 'mime_type' => 'text/html');
51
		$url = $this->formaterUrl($tpl, $params);
51
		$url = $this->formaterUrl($tpl, $params);
52
		return $url;
52
		return $url;
53
	}
53
	}
-
 
54
 
-
 
55
	public function getLegendeId() {
-
 
56
		$tpl = Config::get('legendeIdCarteTpl');
-
 
57
		$params = array('id' => $this->id);
-
 
58
		$url = $this->formaterUrl($tpl, $params);
-
 
59
		$donnees = $this->chargerDonnees($url);
-
 
60
		return $donnees;
-
 
61
	}
54
 
62
	
55
	public function getLegende() {
63
	public function getLegende() {
56
		$tpl = Config::get('legendeCarteTpl');
-
 
57
		$params = array('id' => $this->id);
64
		$tpl = Config::get('legendeCarteTpl');
58
		$url = $this->formaterUrl($tpl, $params);
65
		$url = $this->formaterUrl($tpl, $params);
59
		$donnees = $this->chargerDonnees($url);
66
		$donnees = $this->chargerDonnees($url);
60
		return $donnees;
67
		return $donnees;
61
	}
68
	}
62
 
69
 
63
}
70
}
64
?>
71
?>