17,7 → 17,7 |
*/ |
class CelRadiusPoints extends Cel { |
|
private $champs = array('id_observation', 'nom_sel', 'latitude', 'longitude', 'COUNT(id_observation) AS nb_obs'); |
private $champs_max = array('id_observation', 'nom_sel', 'latitude', 'longitude', 'COUNT(id_observation) AS nb_obs', 'GROUP_CONCAT(id_observation) as ids_obs'); |
private $champs_min = array('latitude', 'longitude'); |
|
private $champs_mode = null; |
38,6 → 38,15 |
$lon_centre = str_replace(',', '.', round(floatval($_GET['lon']), 3)); |
$radius = str_replace(',', '.', floatval($_GET['radius']/1000)); |
|
|
if (isset($_GET['format'])) { |
if ($_GET['format'] == 'max') { |
$this->champs_mode = $this->champs_max; |
} else if($_GET['format'] == 'min') { |
$this->champs_mode = $this->champs_min; |
} |
} |
|
$retour = array(); |
|
$retour['points'] = $this->obtenirPointsPourCentreEtRadius($lat_centre, $lon_centre, $radius); |