Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 262 → Rev 263

/trunk/metier/api_0.1/Cartes.php
25,7 → 25,7
$this->largeur = $largeur;
}
public function getUrlImage() {
public function getUrlDataSvg() {
switch ($this->type) {
case 'nn' :
$nomTemplate = 'cartesParNnTpl';
35,10 → 35,25
break;
}
$tpl = Config::get($nomTemplate);
$params = array($this->type => $this->numero, 'largeur' => $this->largeur);
$params = array($this->type => $this->numero, 'largeur' => $this->largeur, 'mime-type' => 'image/svg+xml');
$url = $this->formaterUrl($tpl, $params);
return $url;
}
public function getUrlPng() {
switch ($this->type) {
case 'nn' :
$nomTemplate = 'cartesParNnTpl';
break;
case 'nt' :
$nomTemplate = 'cartesParNtTpl';
break;
}
$tpl = Config::get($nomTemplate);
$params = array($this->type => $this->numero, 'largeur' => $this->largeur, 'mime-type' => 'image/png');
$url = $this->formaterUrl($tpl, $params);
return $url;
}
 
public function getLegende() {
switch ($this->type) {
/trunk/modules/fiche/squelettes/fiche_repartition.tpl.html
1,6 → 1,6
<div id="repartition">
<object type="image/svg+xml" data="<?=$img?>">
Le navigateur ne supporte pas les fichiers SVG !
<object type="image/svg+xml" data="<?=$svg?>">
<!-- img src="<?=$png?>" / -->
</object>
<div id="legende" style="padding:15px;">
<h3>Légende</h3><br />
/trunk/modules/fiche/Fiche.php
65,7 → 65,8
$donnees['img'] = $ill->obtenirDonnees($this->num_nom);
} else if ($this->onglet == 'repartition') {
$repartition = new Repartition($this->num_nom);
$donnees['img'] = $repartition->getUrlImage();
$donnees['svg'] = $repartition->getUrlDataSvg();
$donnees['png'] = $repartition->getUrlPng();
$donnees['legende'] = $repartition->getLegende();
$donnees['metadonnees'] = $repartition->getMetaDonnees();
}
/trunk/modules/fiche/formateurs/Repartition.php
20,10 → 20,14
$this->serviceMetaDonneesChorodep = new MetaDonnees('chorodep');
}
public function getUrlImage() {
return $this->serviceChorodep->getUrlImage();
public function getUrlDataSvg() {
return $this->serviceChorodep->getUrlDataSvg();
}
public function getUrlPng() {
return $this->serviceChorodep->getUrlPng();
}
public function getLegende () {
return $this->serviceChorodep->getLegende();
}