Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 441 Rev 1026
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
	
-
 
32
	public function setInfoReferentiel($referentiel) {
-
 
33
		$this->referentiel = $referentiel;
-
 
34
	}
31
 
35
 
32
	public function getUrlDataSvg() {
36
	public function getUrlDataSvg() {
33
		$tpl = Config::get('carteTpl');
37
		$tpl = Config::get('carteTpl');
34
		$params = array('id' => $this->id, 'largeur' => $this->largeur, 'mime-type' => 'image/svg+xml');
38
		$params = array('id' => $this->id, 'largeur' => $this->largeur, 'mime-type' => 'image/svg+xml');
35
		$url = $this->formaterUrl($tpl, $params);
39
		$url = $this->formaterUrl($tpl, $params);
36
		return $url;
40
		return $url;
37
	}
41
	}
38
 
42
 
39
	public function getUrlPng() {
43
	public function getUrlPng() {
40
		$tpl = Config::get('carteTpl');
44
		$tpl = Config::get('carteTpl');
41
		$params = array('id' => $this->id, 'largeur' => $this->largeur, 'mime-type' => 'image/png');
45
		$params = array('id' => $this->id, 'largeur' => $this->largeur, 'mime-type' => 'image/png');
42
		$url = $this->formaterUrl($tpl, $params);
46
		$url = $this->formaterUrl($tpl, $params);
43
		return $url;
47
		return $url;
44
	}
48
	}
45
	
49
	
46
	public function getUrlMap() {
50
	public function getUrlMap() {
47
		$tpl = Config::get('efloreCarteTpl');
51
		$tpl = Config::get('efloreCarteTpl');
48
		$params = array('num_nom' => $this->nom->get('id'), 'num_tax' => $this->nom->get('num_taxonomique') ,
52
		$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') ,
53
				'nom_sci' => $this->nom->get('nom_sci'), 'auteur' => $this->nom->get('auteur') ,
50
				'largeur' => $this->largeur, 'mime_type' => 'text/html');
54
				'largeur' => $this->largeur, 'mime_type' => 'text/html');
51
		$url = $this->formaterUrl($tpl, $params);
55
		$url = $this->formaterUrl($tpl, $params);
-
 
56
		return $url;
-
 
57
	}
-
 
58
	
-
 
59
	public function getUrlMapSvg() {
-
 
60
		$tpl = Config::get('carteMoissonnageTpl');
-
 
61
		$params = array('num_taxon' => $this->nom, 'referentiel' => $this->referentiel,
-
 
62
			'largeur' => $this->largeur, 'mime_type' => 'text/html');
-
 
63
		$url = $this->formaterUrl($tpl, $params);
-
 
64
		return $url;
-
 
65
	}
-
 
66
	
-
 
67
	public function getUrlMapPng() {
-
 
68
		$tpl = Config::get('carteMoissonnageTpl');
-
 
69
		$params = array('num_taxon' => $this->nom, 'referentiel' => $this->referentiel,
-
 
70
				'largeur' => $this->largeur, 'mime_type' => 'image/png');
-
 
71
		$url = $this->formaterUrl($tpl, $params);
52
		return $url;
72
		return $url;
53
	}
73
	}
54
	
74
	
55
	public function getUrlEflorePng() {
75
	public function getUrlEflorePng() {
56
		$tpl = Config::get('efloreCarteTpl');
76
		$tpl = Config::get('efloreCarteTpl');
57
		$params = array('num_nom' => $this->nom->get('id'), 'num_tax' => $this->nom->get('num_taxonomique') ,
77
		$params = array('num_nom' => $this->nom->get('id'), 'num_tax' => $this->nom->get('num_taxonomique') ,
58
					'nom_sci' => $this->nom->get('nom_sci'), 'auteur' => $this->nom->get('auteur') ,
78
					'nom_sci' => $this->nom->get('nom_sci'), 'auteur' => $this->nom->get('auteur') ,
59
					'largeur' => $this->largeur, 'mime_type' => 'image/png');
79
					'largeur' => $this->largeur, 'mime_type' => 'image/png');
60
		$url = $this->formaterUrl($tpl, $params);
80
		$url = $this->formaterUrl($tpl, $params);
61
		return $url;
81
		return $url;
62
	}
82
	}
63
 
83
 
64
	public function getLegendeId() {
84
	public function getLegendeId() {
65
		$tpl = Config::get('legendeIdCarteTpl');
85
		$tpl = Config::get('legendeIdCarteTpl');
66
		$params = array('id' => $this->id);
86
		$params = array('id' => $this->id);
67
		$url = $this->formaterUrl($tpl, $params);
87
		$url = $this->formaterUrl($tpl, $params);
68
		$donnees = $this->chargerDonnees($url);
88
		$donnees = $this->chargerDonnees($url);
69
		return $donnees;
89
		return $donnees;
70
	}
90
	}
71
	
91
	
72
	public function getLegende() {
92
	public function getLegende() {
73
		$tpl = Config::get('legendeCarteTpl');
93
		$tpl = Config::get('legendeCarteTpl');
74
		$url = $this->formaterUrl($tpl, $params);
94
		$url = $this->formaterUrl($tpl, $params);
75
		$donnees = $this->chargerDonnees($url);
95
		$donnees = $this->chargerDonnees($url);
76
		return $donnees;
96
		return $donnees;
77
	}
97
	}
78
 
98
 
79
}
99
}
80
?>
100
?>