Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 276 | Rev 361 | 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
	}
291 jpm 27
 
263 gduche 28
	public function getUrlDataSvg() {
291 jpm 29
		$tpl = Config::get('carteTpl');
30
		$params = array('id' => $this->id, 'largeur' => $this->largeur, 'mime-type' => 'image/svg+xml');
253 gduche 31
		$url = $this->formaterUrl($tpl, $params);
32
		return $url;
33
	}
291 jpm 34
 
263 gduche 35
	public function getUrlPng() {
291 jpm 36
		$tpl = Config::get('carteTpl');
37
		$params = array('id' => $this->id, 'largeur' => $this->largeur, 'mime-type' => 'image/png');
263 gduche 38
		$url = $this->formaterUrl($tpl, $params);
39
		return $url;
40
	}
253 gduche 41
 
42
	public function getLegende() {
291 jpm 43
		$tpl = Config::get('legendeCarteTpl');
44
		$params = array('id' => $this->id);
256 gduche 45
		$url = $this->formaterUrl($tpl, $params);
253 gduche 46
		$donnees = $this->chargerDonnees($url);
47
		return $donnees;
48
	}
49
 
50
}
51
?>