16,6 → 16,8 |
|
private $conteneur = null; |
private $nomCourant = null; |
private $referentiel = 'bdtfx'; |
private $donnees = array(); |
private $tailleBloc = "190x178"; |
private $serviceChorodep = null; |
private $cartes; |
25,6 → 27,7 |
public function __construct(Conteneur $conteneur) { |
$this->conteneur = $conteneur; |
$this->nomCourant = $this->conteneur->getNomCourant(); |
$this->referentiel = $this->conteneur->getParametre('referentiel'); |
$this->cartes = $this->conteneur->getApiCartes(); |
$this->meta = $this->conteneur->getApiMetaDonnees(); |
$this->appUrls = $this->conteneur->getAppUrls(); |
31,45 → 34,51 |
} |
|
public function obtenirDonnees() { |
$donnees['chorodep'] = $this->getChorodep(); |
$donnees['eflore'] = $this->getEflore(); |
$donnees['widget']['nt'] = $this->nomCourant->getNt(); |
$donnees['widget']['nn'] = $this->nomCourant->getNnr(); |
return $donnees; |
$this->getRepartition(); |
$this->getMoissonnage(); |
$this->donnees['widget']['nt'] = $this->nomCourant->getNt(); |
$this->donnees['widget']['nn'] = $this->nomCourant->getNnr(); |
return $this->donnees; |
} |
|
public function obtenirDonneesExport() { |
$donnees['chorodep'] = $this->getChorodep(); |
$donnees['eflore'] = $this->getEfloreExport(); |
$donnees['chorodep'] = $this->getRepartition(); |
$donnees['eflore'] = $this->getMoissonnageExport(); |
return $donnees; |
} |
|
private function getChorodep() { |
$this->cartes->setProjet('chorodep'); |
$this->cartes->setLargeur('630'); |
$id = 'nn:'.$this->nomCourant->getNnr(); |
$this->cartes->setId($id); |
$chorodep['svgUrl'] = $this->cartes->getUrlDataSvg(); |
$chorodep['pngUrl'] = $this->cartes->getUrlPng(); |
$chorodep['legende'] = $this->cartes->getLegendeId(); |
$this->meta->setProjet('chorodep'); |
$meta = $this->meta->getMetaDonnees(); |
$citation = $meta[0]['citation']; |
$chorodep['meta']['citation'] = $citation; |
$chorodep['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('chorodep'); |
return $chorodep; |
private function getRepartition() { |
$projetRepartition = Config::get($this->referentiel.'.baseRepartition'); |
if ($projetRepartition != "") { |
$this->cartes->setProjet($projetRepartition); |
$this->cartes->setLargeur('630'); |
$id = 'nn:'.$this->nomCourant->getNnr(); |
$this->cartes->setId($id); |
$repartition['svgUrl'] = $this->cartes->getUrlDataSvg(); |
$repartition['pngUrl'] = $this->cartes->getUrlPng(); |
$repartition['legende'] = $this->cartes->getLegendeId(); |
$this->meta->setProjet($projetRepartition); |
$meta = $this->meta->getMetaDonnees(); |
$citation = $meta[0]['citation']; |
$repartition['meta']['citation'] = $citation; |
$repartition['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees($projetRepartition); |
$this->donnees['repartition'] = $repartition; |
} |
} |
|
private function getEflore() { |
$this->cartes->setProjet('eflore'); |
$this->cartes->setLargeur('max'); |
$this->cartes->setInfoNom($this->nomCourant->getNomRetenu()); |
$eflore['mapUrl'] = $this->cartes->getUrlMap(); |
$eflore['legende'] = $this->cartes->getLegende(); |
return $eflore; |
private function getMoissonnage() { |
$projetMoissonnage = Config::get($this->referentiel.'.baseMoissonnage'); |
if ($projetMoissonnage != "") { |
$this->cartes->setProjet('eflore'); |
$this->cartes->setLargeur('max'); |
$this->cartes->setInfoNom($this->nomCourant->getNomRetenu()); |
$eflore['mapUrl'] = $this->cartes->getUrlMap(); |
$eflore['legende'] = $this->cartes->getLegende(); |
$this->donnees['moissonnage'] = $eflore; |
} |
} |
|
private function getEfloreExport() { |
private function getMoissonnageExport() { |
$this->cartes->setProjet('eflore'); |
$this->cartes->setLargeur('min'); |
$this->cartes->setInfoNom($this->nomCourant->getNomRetenu()); |