16,10 → 16,12 |
|
private $numero; |
private $type; //nt taxonomique ou nn nomenclatural |
private $largeur; |
|
public function __Construct($numero, $type = 'nt') { |
public function __Construct($numero, $type = 'nt', $largeur = 630) { |
$this->type = $type; |
$this->numero = $numero; |
$this->largeur = $largeur; |
} |
|
public function getUrlImage() { |
32,9 → 34,8 |
break; |
} |
$tpl = Config::get($nomTemplate); |
$params = array($this->type => $this->numero); |
$params = array($this->type => $this->numero, 'largeur' => $this->largeur); |
$url = $this->formaterUrl($tpl, $params); |
|
return $url; |
} |
|
41,15 → 42,15 |
public function getLegende() { |
switch ($this->type) { |
case 'nn' : |
$nomTemplate = 'urlChorologieParNnTpl'; |
$nomTemplate = 'legendeChorologieParNnTpl'; |
break; |
case 'nt' : |
$nomTemplate = 'urlChorologieParNtTpl'; |
$nomTemplate = 'legendeChorologieParNtTpl'; |
break; |
} |
$tpl = Config::get($nomTemplate); |
$params = array($this->type => $this->numero); |
$url = $this->formaterUrl($tpl."/legende", $params); |
$url = $this->formaterUrl($tpl, $params); |
$donnees = $this->chargerDonnees($url); |
return $donnees; |
} |