Line 39... |
Line 39... |
39 |
private $projet = null;
|
39 |
private $projet = null;
|
40 |
private $dept = null;
|
40 |
private $dept = null;
|
41 |
private $num_taxon = null;
|
41 |
private $num_taxon = null;
|
42 |
private $station = null;
|
42 |
private $station = null;
|
43 |
private $format = null;// Format des obs pour les stations (tableau/liste)
|
43 |
private $format = null;// Format des obs pour les stations (tableau/liste)
|
- |
|
44 |
private $photos = null; // Seulement les obs avec photos ou bien toutes
|
Line 44... |
Line 45... |
44 |
|
45 |
|
45 |
/**
|
46 |
/**
|
46 |
* Méthode appelée par défaut pour charger ce widget.
|
47 |
* Méthode appelée par défaut pour charger ce widget.
|
47 |
*/
|
48 |
*/
|
Line 68... |
Line 69... |
68 |
extract($this->parametres);
|
69 |
extract($this->parametres);
|
69 |
$this->carte = (isset($carte) ? $carte : self::SERVICE_CARTO_ACTION_DEFAUT);
|
70 |
$this->carte = (isset($carte) ? $carte : self::SERVICE_CARTO_ACTION_DEFAUT);
|
70 |
$this->utilisateur = (isset($utilisateur) ? $utilisateur : '*');
|
71 |
$this->utilisateur = (isset($utilisateur) ? $utilisateur : '*');
|
71 |
$this->projet = (isset($projet) ? $projet : '*');
|
72 |
$this->projet = (isset($projet) ? $projet : '*');
|
72 |
$this->tag = (isset($tag) ? $tag : '*');
|
73 |
$this->tag = (isset($tag) ? $tag : '*');
|
- |
|
74 |
$this->tag = (isset($motcle) ? $motcle : $this->tag);
|
73 |
$this->dept = (isset($dept) ? $dept : '*');
|
75 |
$this->dept = (isset($dept) ? $dept : '*');
|
74 |
$this->commune = (isset($commune) ? $commune : '*');
|
76 |
$this->commune = (isset($commune) ? $commune : '*');
|
75 |
$this->num_taxon = (isset($num_taxon) ? $num_taxon : '*');
|
77 |
$this->num_taxon = (isset($num_taxon) ? $num_taxon : '*');
|
76 |
$this->date = (isset($date) ? $date : '*');
|
78 |
$this->date = (isset($date) ? $date : '*');
|
77 |
$this->taxon = (isset($taxon) ? $taxon : '*');
|
79 |
$this->taxon = (isset($taxon) ? $taxon : '*');
|
78 |
$this->commentaire = (isset($commentaire) ? $commentaire : null);
|
80 |
$this->commentaire = (isset($commentaire) ? $commentaire : null);
|
79 |
$this->station = (isset($station) ? $station : null);
|
81 |
$this->station = (isset($station) ? $station : null);
|
80 |
$this->format = (isset($format) ? $format : null);
|
82 |
$this->format = (isset($format) ? $format : null);
|
- |
|
83 |
$this->photos = (isset($photos) ? $photos : null);
|
81 |
$this->start = (isset($start) ? $start : null);
|
84 |
$this->start = (isset($start) ? $start : null);
|
82 |
$this->limit = (isset($limit) ? $limit : null);
|
85 |
$this->limit = (isset($limit) ? $limit : null);
|
83 |
}
|
86 |
}
|
Line 84... |
Line 87... |
84 |
|
87 |
|
Line 101... |
Line 104... |
101 |
$widget['donnees']['commune'] = $this->commune;
|
104 |
$widget['donnees']['commune'] = $this->commune;
|
102 |
$widget['donnees']['num_taxon'] = $this->num_taxon;
|
105 |
$widget['donnees']['num_taxon'] = $this->num_taxon;
|
103 |
$widget['donnees']['date'] = $this->date;
|
106 |
$widget['donnees']['date'] = $this->date;
|
104 |
$widget['donnees']['taxon'] = $this->taxon;
|
107 |
$widget['donnees']['taxon'] = $this->taxon;
|
105 |
$widget['donnees']['commentaire'] = $this->commentaire;
|
108 |
$widget['donnees']['commentaire'] = $this->commentaire;
|
- |
|
109 |
$widget['donnees']['photos'] = $this->photos;
|
106 |
$widget['donnees']['url_limites_communales'] = $this->obtenirUrlsLimitesCommunales();
|
110 |
$widget['donnees']['url_limites_communales'] = $this->obtenirUrlsLimitesCommunales();
|
107 |
$widget['donnees']['communeImageUrl'] = $this->config['carto']['communeImageUrl'];
|
- |
|
108 |
$widget['donnees']['pointImageUrl'] = $this->config['carto']['pointImageUrl'];
|
- |
|
109 |
$widget['donnees']['groupeImageUrlTpl'] = $this->config['carto']['groupeImageUrlTpl'];
|
- |
|
Line 110... |
Line 111... |
110 |
|
111 |
|
Line 111... |
Line 112... |
111 |
$widget['squelette'] = 'carte_defaut';
|
112 |
$widget['squelette'] = 'carte_defaut';
|
112 |
|
113 |
|
Line 120... |
Line 121... |
120 |
$url .= "/$action";
|
121 |
$url .= "/$action";
|
Line 121... |
Line 122... |
121 |
|
122 |
|
122 |
$parametres_retenus = array();
|
123 |
$parametres_retenus = array();
|
123 |
$parametres_a_tester = array('station', 'utilisateur', 'projet', 'tag', 'dept', 'commune',
|
124 |
$parametres_a_tester = array('station', 'utilisateur', 'projet', 'tag', 'dept', 'commune',
|
124 |
'num_taxon', 'taxon', 'date', 'commentaire',
|
125 |
'num_taxon', 'taxon', 'date', 'commentaire',
|
125 |
'start', 'limit');
|
126 |
'start', 'limit', 'photos');
|
126 |
foreach ($parametres_a_tester as $param) {
|
127 |
foreach ($parametres_a_tester as $param) {
|
127 |
if (isset($this->$param) && $this->$param != '*') {
|
128 |
if (isset($this->$param) && $this->$param != '*') {
|
128 |
$parametres_retenus[$param] = $this->$param;
|
129 |
$parametres_retenus[$param] = $this->$param;
|
129 |
}
|
130 |
}
|
Line 140... |
Line 141... |
140 |
}
|
141 |
}
|
Line 141... |
Line 142... |
141 |
|
142 |
|
142 |
private function obtenirUrlsLimitesCommunales() {
|
143 |
private function obtenirUrlsLimitesCommunales() {
|
143 |
$urls = null;
|
144 |
$urls = null;
|
144 |
if (isset($this->dept)) {
|
145 |
if (isset($this->dept)) {
|
145 |
// si on veut afficher les limites départemmentales on va compter et chercher les noms de fichiers
|
146 |
// si on veut afficher les limites départementales on va compter et chercher les noms de fichiers
|
146 |
$fichiersKml = $this->chercherFichierKml();
|
147 |
$fichiersKml = $this->chercherFichierKml();
|
147 |
if (count($fichiersKml) > 0) {
|
148 |
if (count($fichiersKml) > 0) {
|
148 |
foreach ($fichiersKml as $kml => $dossier){
|
149 |
foreach ($fichiersKml as $kml => $dossier){
|
149 |
$url_limites_communales = sprintf($this->config['carto']['limitesCommunaleUrlTpl'], $dossier, $kml);
|
150 |
$url_limites_communales = sprintf($this->config['carto']['limitesCommunaleUrlTpl'], $dossier, $kml);
|
Line 194... |
Line 195... |
194 |
$widget['squelette'] = 'avertissement';
|
195 |
$widget['squelette'] = 'avertissement';
|
Line 195... |
Line 196... |
195 |
|
196 |
|
196 |
return $widget;
|
197 |
return $widget;
|
197 |
}
|
198 |
}
|
198 |
}
|
199 |
}
|
- |
|
200 |
?>
|
199 |
|
201 |
|