Révision fe3e0cdf
Ajouté par Jocelyn Delande il y a environ 11 ans
panorama.php | ||
---|---|---|
15 | 15 |
<label class="form_col" title="L'altitude positive Ex: 170">Altitude : |
16 | 16 |
<input name="loca_altitude" type="number" min="-400" id="loca_altitude"/></label> |
17 | 17 |
<div class="answer"> |
18 |
<input type="button" value="Localiser" id="loca_button"/>
|
|
18 |
<input type="button" value="Localiser" id="loca_button"/> |
|
19 | 19 |
<input type="button" value="Effacer" id="loca_erase"/> |
20 | 20 |
</div> |
21 | 21 |
</fieldset> |
22 | 22 |
EO_FORM_EXTPOINT; |
23 | 23 |
|
24 | 24 |
$form_param = <<<'EO_FORM_PARAM' |
25 |
<div id="addParams">
|
|
26 |
<label id="paramFormShow">Paramétrer le panorama</label>
|
|
25 |
<div id="addParams"> |
|
26 |
<label id="paramFormShow">Paramétrer le panorama</label> |
|
27 | 27 |
</div> |
28 | 28 |
<form action="addParams.php?param_dir=%s&param_panorama=%s" id="form_param" method="post"> |
29 | 29 |
<fieldset id="adding"><legend id="paramFormHide">Paramétrage du panorama</legend> |
30 | 30 |
<label title="Au moins 4 caractères">Titre : |
31 |
<input type="text" pattern="^.{1,40}$" name="param_title" placeholder="%s"
|
|
31 |
<input type="text" pattern="^.{1,40}$" name="param_title" placeholder="%s" |
|
32 | 32 |
title="ne doit pas contenir pus de 40 caractères" required=""/></label> |
33 | 33 |
<label title="La latitude ϵ [-90°, 90°]. Ex : 46.55257">Latitude : |
34 | 34 |
<input name="param_latitude" type="number" min="-90" max="90" placeholder="43.56" required="" step="any"/></label> |
... | ... | |
38 | 38 |
<input name="param_altitude" type="number" min="-400" required="" placeholder="170" step="any"/></label> |
39 | 39 |
<label title="L'image fait-elle 360° ?">Rebouclage : |
40 | 40 |
<input type="checkbox" name="param_loop" value="true"></label> |
41 |
|
|
41 |
|
|
42 | 42 |
<div> |
43 |
<input type="submit" value="Submit"/>
|
|
43 |
<input type="submit" value="Submit"/> |
|
44 | 44 |
<input type="reset" value="Reset"/> |
45 | 45 |
</div> |
46 | 46 |
</fieldset> |
... | ... | |
110 | 110 |
printf('point_list[%d] = new Array("%s", %03lf, %03lf, %03lf, "%s");'."\n", $ipt++, $prm['titre'], $dist, $cap, $ele, $lnk); |
111 | 111 |
} |
112 | 112 |
} |
113 |
|
|
114 |
include 'ref_points.php'; |
|
113 |
$ref_points = array (); |
|
114 |
$ref_points_filename = 'ref_points.local.php'; |
|
115 |
if (file_exists($ref_points_filename)) { |
|
116 |
include $ref_points_filename; |
|
117 |
} |
|
115 | 118 |
$extra_names = array(); |
116 | 119 |
$ref_names = array(); |
117 | 120 |
if (is_array($ref_points)) { |
... | ... | |
122 | 125 |
printf('point_list[%d] = new Array("%s", %03lf, %03lf, %03lf, "");'."\n", $ipt++, $name, $dist, $cap, $ele); |
123 | 126 |
} |
124 | 127 |
} |
125 |
|
|
128 |
|
|
126 | 129 |
|
127 | 130 |
if (isset($params['reference'])) { |
128 | 131 |
echo "ref_points = new Array();\n"; |
... | ... | |
134 | 137 |
} |
135 | 138 |
} |
136 | 139 |
} |
137 |
|
|
140 |
|
|
138 | 141 |
$localLat = (isset($_POST["loca_latitude"])) ? $_POST["loca_latitude"] : NULL; |
139 | 142 |
$localLon = (isset($_POST["loca_longitude"])) ? $_POST["loca_longitude"] : NULL; |
140 | 143 |
$localAlt = (isset($_POST["loca_altitude"])) ? $_POST["loca_altitude"] : NULL; |
141 |
|
|
144 |
|
|
142 | 145 |
if ($localLat && $localLon && $localAlt) { |
143 | 146 |
list($localDistance, $localCap, $localEle) = $pt->coordsToCap($localLat, $localLon, $localAlt); |
144 | 147 |
$n = "point temporaire"; |
145 | 148 |
printf('point_list[%d] = new Array("%s", %03lf, %03lf, %03lf, "temporary");'."\n",$ipt++, $n, $localDistance, $localCap, $localEle); |
146 |
}
|
|
149 |
} |
|
147 | 150 |
?> |
148 | 151 |
</script> |
149 | 152 |
<link type="image/x-icon" rel="shortcut icon" href="images/tsf.png"/> |
150 | 153 |
<link rel="stylesheet" media="screen" href="css/map.css" /> |
151 |
<script src="js/hide_n_showForm.js"></script>
|
|
154 |
<script src="js/hide_n_showForm.js"></script> |
|
152 | 155 |
</head> |
153 | 156 |
<body> |
154 | 157 |
<canvas id="mon-canvas"> |
155 | 158 |
Ce message indique que ce navigateur est vétuste car il ne supporte pas <samp>canvas</samp> (IE6, IE7, IE8, ...) |
156 | 159 |
</canvas> |
157 |
|
|
160 |
|
|
158 | 161 |
<fieldset id="control"><legend>contrôle</legend> |
159 | 162 |
<label>Zoom : <input type="range" min="0" max="2" value="2" id="zoom_ctrl"/></label> |
160 | 163 |
<label>Cap : <input type="number" min="0" max="360" step="10" value="0" autofocus="" id="angle_ctrl"/></label> |
... | ... | |
162 | 165 |
</fieldset> |
163 | 166 |
|
164 | 167 |
<?php |
165 |
|
|
168 |
|
|
166 | 169 |
if ($params && isset($params['latitude']) && isset($params['longitude'])) { |
167 | 170 |
print("<div id=\"params\">\n"); |
168 | 171 |
printf ("<p>latitude : <em><span id=\"pos_lat\">%.5f</span>°</em></p>\n", $params['latitude']); |
169 | 172 |
printf ("<p>longitude : <em><span id=\"pos_lon\">%.5f</span>°</em></p>\n", $params['longitude']); |
170 |
if (isset($params['altitude'])) printf ("<p>altitude : <em><span id=\"pos_alt\">%d</span> m</em></p>\n", $params['altitude']);
|
|
173 |
if (isset($params['altitude'])) printf ("<p>altitude : <em><span id=\"pos_alt\">%d</span> m</em></p>\n", $params['altitude']); |
|
171 | 174 |
print("</div>\n"); |
172 | 175 |
echo $form_extpoint; |
173 | 176 |
} elseif ($params == false ) { |
... | ... | |
176 | 179 |
printf($form_param, $dir, $name, $name); |
177 | 180 |
} |
178 | 181 |
echo '<p id="info"></p>'."\n"; |
182 |
|
|
183 |
echo "<p id=\"insert\">"; |
|
179 | 184 |
if (count($extra_names) > 1) { |
180 |
echo "<p id=\"insert\">\n<select id=\"sel_point\" name=\"known_points\">\n";
|
|
185 |
echo "<select id=\"sel_point\" name=\"known_points\">\n"; |
|
181 | 186 |
foreach ($extra_names as $nm) { |
182 |
echo '<option>'.$nm."</option>\n"; |
|
187 |
echo '<option>'.$nm."</option>\n";
|
|
183 | 188 |
} |
184 | 189 |
echo "</select>\n"; |
185 | 190 |
echo "<input type=\"button\" id=\"do-insert\" value=\"insérer\"/>\n"; |
186 | 191 |
echo "<input type=\"button\" id=\"do-delete\" value=\"suppimer\"/>\n"; |
187 |
echo "<input type=\"button\" id=\"do-cancel\" value=\"annuler\"/>\n"; |
|
188 | 192 |
echo "<input type=\"button\" id=\"show-cap\" value=\"visualiser cet axe sur OSM\"/>\n"; |
189 |
echo "</p>\n"; |
|
193 |
} else { |
|
194 |
echo "Pas de point de reférénce connu, lisez le <em>README.md</em> pour en ajouter. \n"; |
|
190 | 195 |
} |
191 |
|
|
196 |
echo "<input type=\"button\" id=\"do-cancel\" value=\"annuler\"/>\n"; |
|
197 |
echo "</p>\n"; |
|
192 | 198 |
?> |
193 | 199 |
<p id="res"></p> |
194 | 200 |
<div class="validators"> |
Formats disponibles : Unified diff
- Moved ref_points.php to something less toulouse-specific ;-)
by default : no ref points, but the ability to define its own list
or to use one of the files from ref_points folder.
- Fixed the UI if the ref_points list is empty.