Subversion Repositories eFlore/Applications.cel

Rev

Rev 2462 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2462 Rev 2535
Line 15... Line 15...
15
 * @license    CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
15
 * @license    CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
16
 * @copyright  1999-2014 Tela Botanica <accueil@tela-botanica.org>
16
 * @copyright  1999-2014 Tela Botanica <accueil@tela-botanica.org>
17
 */
17
 */
18
class CelRadiusPoints extends Cel {
18
class CelRadiusPoints extends Cel {
Line 19... Line 19...
19
 
19
 
20
	private $champs = array('id_observation', 'nom_sel', 'latitude', 'longitude', 'COUNT(id_observation) AS nb_obs');
20
	private $champs_max = array('id_observation', 'nom_sel', 'latitude', 'longitude', 'COUNT(id_observation) AS nb_obs', 'GROUP_CONCAT(id_observation) as ids_obs');
Line 21... Line 21...
21
	private $champs_min = array('latitude', 'longitude');
21
	private $champs_min = array('latitude', 'longitude');
Line 22... Line 22...
22
 
22
 
Line 35... Line 35...
35
	 */
35
	 */
36
	public function getElement($params) {
36
	public function getElement($params) {
37
		$lat_centre = str_replace(',', '.', round(floatval($_GET['lat']), 3));
37
		$lat_centre = str_replace(',', '.', round(floatval($_GET['lat']), 3));
38
		$lon_centre = str_replace(',', '.', round(floatval($_GET['lon']), 3));
38
		$lon_centre = str_replace(',', '.', round(floatval($_GET['lon']), 3));
39
		$radius = str_replace(',', '.', floatval($_GET['radius']/1000));
39
		$radius = str_replace(',', '.', floatval($_GET['radius']/1000));
-
 
40
		
-
 
41
 
-
 
42
		if (isset($_GET['format'])) {
-
 
43
			if ($_GET['format'] == 'max') {
-
 
44
				$this->champs_mode = $this->champs_max;
-
 
45
			} else if($_GET['format'] == 'min') {
-
 
46
				$this->champs_mode = $this->champs_min;
-
 
47
			}
-
 
48
		}
Line 40... Line 49...
40
 
49
 
Line 41... Line 50...
41
		$retour = array();
50
		$retour = array();
42
 
51