Révision 6dea1698
Ajouté par Jocelyn Dealande il y a environ 10 ans
panorama.php | ||
---|---|---|
94 | 94 |
} |
95 | 95 |
} |
96 | 96 |
|
97 |
$ref_points = array (); |
|
98 |
if (file_exists(REF_POINTS_PATH)) { |
|
99 |
include REF_POINTS_PATH; |
|
100 |
} |
|
97 |
$ref_points = RefPoint::get_all(); |
|
101 | 98 |
$extra_names = array(); |
102 | 99 |
$ref_names = array(); |
103 |
if (is_array($ref_points)) {
|
|
104 |
foreach ($ref_points as $name => $vals) {
|
|
105 |
$extra_names[] = $name;
|
|
106 |
list($dist, $cap, $ele) = $pt->coordsToCap($vals[0], $vals[1], $vals[2]);
|
|
107 |
$ref_names[$name] = array($dist, $cap, $ele);
|
|
108 |
printf('point_list[%d] = new Array("%s", %03lf, %03lf, %03lf, "");'."\n", $ipt++, $name, $dist, $cap, $ele);
|
|
100 |
foreach ($ref_points as $ref) {
|
|
101 |
$extra_names[] = $ref->name;
|
|
102 |
list($dist, $cap, $ele) = $pt->coordsToCap($ref->lon, $ref->lat,
|
|
103 |
$ref->ele);
|
|
104 |
$ref_names[$name] = array($dist, $cap, $ele); |
|
105 |
printf('point_list[%d] = new Array("%s", %03lf, %03lf, %03lf, "");'."\n", $ipt++, $ref->name, $dist, $cap, $ele);
|
|
109 | 106 |
} |
110 |
} |
|
111 |
|
|
112 | 107 |
|
113 | 108 |
if (isset($params['reference'])) { |
114 | 109 |
echo "ref_points = new Array();\n"; |
Formats disponibles : Unified diff
Use propper RefPoint::get_all() instead of requiring ref_points.local.php