Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 1033 → Rev 1032

/trunk/jrest/services/CelWidgetMap.php
70,8 → 70,8
public function getIconeGroupe($params) {
extract($this->parametres);
 
$chemin_marqueur = sprintf($this->config['settings']['cheminCelMarkerObsTpl'], $type);
$img = imagecreatefrompng($chemin_marqueur);
//TODO: changer ceci pour une adresse indiquée dans un fichier de config
$img = imagecreatefrompng("/home/aurelien/web/cel_GWT2/widget/documents/icones/carto/groupe/g$type.png");
 
$noir = imagecolorallocate($img, 0, 0, 0);
$texte = (String) $nbre;
149,18 → 149,18
") as type_emplacement, ".
"IF ((coord_x != '000null' AND coord_x != '' ".
" AND coord_y != '000null' AND coord_y != ''), ".
"coord_x, ".
"wgs84_latitude ".
"ROUND(coord_x,5), ".
"ROUND(wgs84_latitude,5) ".
") as lat, ".
"IF ((coord_x != '000null' AND coord_x != '' ".
" AND coord_y != '000null' AND coord_y != ''), ".
"coord_y, ".
"wgs84_longitude ".
"ROUND(coord_y,5), ".
"ROUND(wgs84_longitude,5) ".
") as lng, ".
"IF ((coord_x != '000null' AND coord_x != '' ".
" AND coord_y != '000null' AND coord_y != ''), ".
'CONCAT("'.self::MARQUEUR_STATION.':",coord_x,"|",coord_y), '.
'CONCAT("'.self::MARQUEUR_COMMUNE.':",wgs84_latitude,"|",wgs84_longitude) '.
'CONCAT("'.self::MARQUEUR_STATION.':",ROUND(coord_x,5),"|",ROUND(coord_y,5)), '.
'CONCAT("'.self::MARQUEUR_COMMUNE.':",ROUND(wgs84_latitude,5),"|",ROUND(wgs84_longitude,5)) '.
") as id ".
'FROM cel_inventory AS i '.
' LEFT JOIN locations AS l '.
167,14 → 167,13
' ON (l.name = i.location AND l.code = i.id_location) '.
"WHERE transmission = '1' ".
" AND (".
"(".($this->construireWhereRectangleStationOR() != null ? $this->construireWhereRectangleStationOR().' AND ' : '').
" (mots_cles_texte IS NULL OR mots_cles_texte NOT LIKE '%sensible%') ".
"(".$this->construireWhereRectangleStationOR().
" AND (mots_cles_texte IS NULL OR mots_cles_texte NOT LIKE '%sensible%') ".
")".
" OR ".
" ( ".
"(".($this->construireWhereRectangleCommuneOR() != null ? $this->construireWhereRectangleCommuneOR().' Or ' : '').
" mots_cles_texte LIKE '%sensible%' ".
")".
$this->construireWhereRectangleCommuneOR().
" OR mots_cles_texte LIKE '%sensible%' ".
" ) ".
") ".
$this->construireWhereDept().
187,7 → 186,6
$this->construireWhereProjet().
$this->construireWhereTag();
 
 
$resultats_emplacements = $this->executerRequete($requete);
$emplacements = $this->traiterEmplacements($resultats_emplacements);
 
363,8 → 361,9
$this->construireWhereTag().
'ORDER BY nom_sel ASC '.
"LIMIT {$this->start},{$this->limit} ";
//die($requete);
$resultats = $this->requeter($requete, self::SQL_RETOUR_COMPLET, self::SQL_MODE_OBJET);
 
$resultats = $this->requeter($requete, self::SQL_RETOUR_COMPLET, self::SQL_MODE_OBJET);
$requete = 'SELECT FOUND_ROWS()';
$total = (int) $this->requeter($requete, self::SQL_RETOUR_COLONNE);
}
546,7 → 545,7
if ($type == self::MARQUEUR_COMMUNE) {
$lat = $this->proteger($lat);
$lng = $this->proteger($lng);
$sql = " AND (ROUND(wgs84_latitude,5) = ROUND($lat,5) AND ROUND(wgs84_longitude,5) = ROUND($lng,5)) ";
$sql = " AND (wgs84_latitude = $lat AND wgs84_longitude = $lng) ";
} else if ($type == self::MARQUEUR_STATION) {
$lat = $this->proteger($lat);
$lng = $this->proteger($lng);
1124,8 → 1123,8
if (isset($this->parametres['station'])) {
$station = $this->parametres['station'];
$this->debug[] = $station;
@list($type, $coord) = explode(':', $station);
@list($lat, $lng) = explode('|', $coord);
list($type, $coord) = explode(':', $station);
list($lat, $lng) = explode('|', $coord);
 
$station_infos = array('type' => $type, 'lat' => $lat, 'lng' => $lng);
}