Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 1340 → Rev 1341

/trunk/jrest/services/CelWidgetMapPoint.php
572,9 → 572,9
extract($this->decomposerParametreStation());
if (isset($type)) {
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)) ";
$lat = $this->proteger($lat.'%');
$lng = $this->proteger($lng.'%');
$sql = " AND wgs84_latitude LIKE $lat AND wgs84_longitude LIKE $lng ";
} else if ($type == self::MARQUEUR_STATION) {
$lat = $this->proteger($lat.'%');
$lng = $this->proteger($lng.'%');
592,7 → 592,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 LIKE $lat AND wgs84_longitude LIKE $lng ";
} else if ($type == self::MARQUEUR_STATION) {
$lat = $this->proteger($lat.'%');
$lng = $this->proteger($lng.'%');
/trunk/jrest/lib/CartoGroupage.php
173,9 → 173,9
return $sensible;
}
private static function formaterNomStation(&$point) {
private static function formaterNomStation(&$point, $type_emplacement) {
$station = '';
if($point['station'] != '' && $point['station'] != '000null') {
if($type_emplacement == 'stations' && $point['station'] != '' && $point['station'] != '000null') {
$station = $point['station'];
} else {
$station = $point['zone_geo'].(($point['id_zone_geo'] != '' && $point['id_zone_geo'] != '000null') ? ' ('.self::formaterNomZoneGeo($point['id_zone_geo']).')' : '');
200,7 → 200,7
$point_allege = array();
$point_allege['id'] = self::MARQUEUR_COMMUNE.':'.$point['wgs84_latitude'].'|'.$point['wgs84_longitude'];
$point_allege['type_emplacement'] = 'communes';
$point_allege['nom'] = self::formaterNomStation($point);
$point_allege['nom'] = self::formaterNomStation($point, 'communes');
$point_allege['lat'] = (float)$point['wgs84_latitude'];
$point_allege['lng'] = (float)$point['wgs84_longitude'];
209,7 → 209,7
$point_allege = array();
$point_allege['id'] = self::MARQUEUR_STATION.':'.$point['latitude'].'|'.$point['longitude'];
$point_allege['type_emplacement'] = 'stations';
$point_allege['nom'] = self::formaterNomStation($point);
$point_allege['nom'] = self::formaterNomStation($point, 'stations');
$point_allege['lat'] = (float)$point['latitude'];
$point_allege['lng'] = (float)$point['longitude'];