Projet

Général

Profil

Révision c4802754

Ajouté par Jocelyn Delande il y a environ 11 ans

moved all_points webservice to use methods from site_point

Voir les différences:

class/site_point.class.php
140 140
	  return new site_point($pano_dir);
141 141
  }
142 142

  
143

  
144
  public function to_geoJSON() {
145
	  $prm = $this->get_params();
146
		$name = $this->get_name();
147
		$lat = floatval($prm['latitude']);
148
		$lon = floatval($prm['longitude']);
149
		//$alt = $prm['altitude'];
150
		//$title = $prm['titre'];
151

  
152
		return array("type" => "Feature",
153
		             "geometry" => array(
154
		                                 "type" => "Point",
155
		                                 "coordinates" => [$lon, $lat]
156
		                                 ),
157
		             "properties" => array("name" => $name,
158
		                                   "type" => 'pano_point',
159
		                                   "view_url"  => $this->get_url())
160
		             );
161
  }
162

  
163

  
143 164
  public static function get_all() {
144 165
	  $panos = array_diff(scandir(PANORAMA_PATH), array('..', '.'));
145 166
	  $pano_instances = array();
......
148 169
	  }
149 170
	  return $pano_instances;
150 171
  }
172

  
151 173
}

Formats disponibles : Unified diff