Révision 812f173f
Ajouté par Jocelyn Delande il y a environ 11 ans
panorama.php | ||
---|---|---|
3 | 3 |
<head> |
4 | 4 |
<?php |
5 | 5 |
require 'class/utils.class.php'; |
6 |
require_once 'constants.inc.php'; |
|
6 | 7 |
utils::init(); |
7 | 8 |
|
8 | 9 |
$form_extpoint = file_get_contents('html/form_extpoint.html'); |
... | ... | |
13 | 14 |
$dir = $_GET['dir']; |
14 | 15 |
$name = $_GET['panorama']; |
15 | 16 |
} else { |
16 |
$dir = 'tiles';
|
|
17 |
$dir = PANORAMA_PATH;
|
|
17 | 18 |
$name = 'ttn_mediatheque'; |
18 | 19 |
} |
19 | 20 |
$opt_vals = array(); |
... | ... | |
48 | 49 |
<script> |
49 | 50 |
<?php |
50 | 51 |
$zoom_array = $pt->get_magnifications(); |
52 |
|
|
51 | 53 |
foreach($zoom_array as $zoom => $val) { |
52 | 54 |
echo "zooms[$zoom] = new tzoom($zoom);\n"; |
53 | 55 |
echo "zooms[$zoom].ntiles.x = ".$val['nx'].";\n"; |
... | ... | |
63 | 65 |
$dir_list = new sites_dir($dir); |
64 | 66 |
|
65 | 67 |
$ipt = 0; |
66 |
$scrname = getenv('SCRIPT_NAME'); |
|
67 |
foreach($dir_list->get_sites() as $opt) { |
|
68 |
foreach(site_point::get_all() as $opt) { |
|
68 | 69 |
$prm = $opt->get_params(); |
69 | 70 |
$oname = $opt->get_name(); |
70 |
if ($oname != $name && $opt->has_params()) {
|
|
71 |
if (($oname != $name) && $opt->has_params()) {
|
|
71 | 72 |
list($dist, $cap, $ele) = $pt->coordsToCap($prm['latitude'], $prm['longitude'], $prm['altitude']); |
72 |
$lnk = sprintf("%s?dir=%s&panorama=%s&to_cap=%.3f&to_ele=%.3f", $scrname, $dir, $oname, $cap + 180, -$ele); |
|
73 |
// Looks back at the point from which we come. |
|
74 |
$lnk = $opt->get_url($cap + 180, -$ele); |
|
73 | 75 |
printf('point_list[%d] = new Array("%s", %03lf, %03lf, %03lf, "%s");'."\n", $ipt++, $prm['titre'], $dist, $cap, $ele, $lnk); |
74 | 76 |
} |
75 | 77 |
} |
78 |
|
|
76 | 79 |
$ref_points = array (); |
77 | 80 |
$ref_points_filename = 'ref_points.local.php'; |
78 | 81 |
if (file_exists($ref_points_filename)) { |
Formats disponibles : Unified diff
make use of constants