Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 291 Rev 361
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
	
-
 
28
	public function setInfoNom($nom) {
-
 
29
		$this->nom = $nom;
-
 
30
	} 
27
 
31
 
28
	public function getUrlDataSvg() {
32
	public function getUrlDataSvg() {
29
		$tpl = Config::get('carteTpl');
33
		$tpl = Config::get('carteTpl');
30
		$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');
31
		$url = $this->formaterUrl($tpl, $params);
35
		$url = $this->formaterUrl($tpl, $params);
32
		return $url;
36
		return $url;
33
	}
37
	}
34
 
38
 
35
	public function getUrlPng() {
39
	public function getUrlPng() {
36
		$tpl = Config::get('carteTpl');
40
		$tpl = Config::get('carteTpl');
37
		$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');
38
		$url = $this->formaterUrl($tpl, $params);
42
		$url = $this->formaterUrl($tpl, $params);
-
 
43
		return $url;
-
 
44
	}
-
 
45
	
-
 
46
	public function getUrlMap() {
-
 
47
		$tpl = Config::get('efloreCarteTpl');
-
 
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') ,
-
 
50
				'largeur' => $this->largeur, 'mime_type' => 'text/htm');
-
 
51
		$url = $this->formaterUrl($tpl, $params);
39
		return $url;
52
		return $url;
40
	}
53
	}
41
 
54
 
42
	public function getLegende() {
55
	public function getLegende() {
43
		$tpl = Config::get('legendeCarteTpl');
56
		$tpl = Config::get('legendeCarteTpl');
44
		$params = array('id' => $this->id);
57
		$params = array('id' => $this->id);
45
		$url = $this->formaterUrl($tpl, $params);
58
		$url = $this->formaterUrl($tpl, $params);
46
		$donnees = $this->chargerDonnees($url);
59
		$donnees = $this->chargerDonnees($url);
47
		return $donnees;
60
		return $donnees;
48
	}
61
	}
49
 
62
 
50
}
63
}
51
?>
64
?>