Project

General

Profile

Revision ffebe856

Added by Jocelyn Dealande about 8 years ago

do not display ref_points and panorama further than 25km from the current one (tunable in constant)

View differences:

class/site_point.class.php
1 1
<?php
2 2
require_once(dirname(__FILE__).'/../constants.inc.php');
3 3
require_once(dirname(__FILE__).'/utils.class.php');
4
require_once(dirname(__FILE__).'/GeoPoint.class.php');
4 5
//
5 6
class PanoramaFormatException extends Exception {
6 7
	/** If the files organization is not correct for a panorama, we can't let it go...
7 8
	 */
8 9
}
9 10

  
10
class site_point {
11
class site_point extends GeoPoint {
11 12
  /** Defines a point, with a panorama
12 13
  */
13 14
  private $base_dir;        // dir of tiles for that panorama
......
121 122
    return $this->prefix;
122 123
  }
123 124

  
125
  public function get_lat() {
126
	$p = $this->get_params();
127
	return $p['latitude'];
128
  }
129

  
130
  public function get_lon() {
131
	$p = $this->get_params();
132
	return $p['longitude'];
133
  }
134

  
124 135
  public function get_magnifications() {
125 136
    $dir_fd = opendir($this->base_dir);
126 137
    $zoom_array = array();
......
288 299
  }
289 300

  
290 301

  
291
  public static function get_all($only_with_params=false) {
302
  public static function get_all($only_with_params=true) {
292 303
	  /**
293 304
	   * @param $only_with_params : filters out the panoramas which
294 305
	   *        are not parametrized

Also available in: Unified diff