Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 361 | Rev 367 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
253 gduche 1
<?php
2
// declare(encoding='UTF-8');
3
/**
4
 * Classe gérant les images.
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 Cartes extends Eflore {
16
 
291 jpm 17
	private $id;
256 gduche 18
	private $largeur;
291 jpm 19
 
20
	public function setId($id) {
21
		$this->id = $id;
22
	}
23
 
24
	public function setLargeur($largeur) {
256 gduche 25
		$this->largeur = $largeur;
253 gduche 26
	}
361 delphine 27
 
28
	public function setInfoNom($nom) {
29
		$this->nom = $nom;
30
	}
291 jpm 31
 
263 gduche 32
	public function getUrlDataSvg() {
291 jpm 33
		$tpl = Config::get('carteTpl');
34
		$params = array('id' => $this->id, 'largeur' => $this->largeur, 'mime-type' => 'image/svg+xml');
253 gduche 35
		$url = $this->formaterUrl($tpl, $params);
36
		return $url;
37
	}
291 jpm 38
 
263 gduche 39
	public function getUrlPng() {
291 jpm 40
		$tpl = Config::get('carteTpl');
41
		$params = array('id' => $this->id, 'largeur' => $this->largeur, 'mime-type' => 'image/png');
263 gduche 42
		$url = $this->formaterUrl($tpl, $params);
43
		return $url;
44
	}
361 delphine 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') ,
366 aurelien 50
				'largeur' => $this->largeur, 'mime_type' => 'text/html');
361 delphine 51
		$url = $this->formaterUrl($tpl, $params);
52
		return $url;
53
	}
253 gduche 54
 
55
	public function getLegende() {
291 jpm 56
		$tpl = Config::get('legendeCarteTpl');
57
		$params = array('id' => $this->id);
256 gduche 58
		$url = $this->formaterUrl($tpl, $params);
253 gduche 59
		$donnees = $this->chargerDonnees($url);
60
		return $donnees;
61
	}
62
 
63
}
64
?>