view.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. {% load staticfiles %}
  2. <!DOCTYPE html>
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
  4. <head>
  5. <meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
  6. <title>{{ panorama.name }}</title>
  7. <script>
  8. var title = "{{ panorama.name|escapejs }}";
  9. var img_prefix = '{{ panorama.tiles_url }}';
  10. var image_loop = {{ panorama.loop }};
  11. </script>
  12. <script src="{% static "panorama/js/pano.js" %}"></script>
  13. <script>window.onload = load_pano</script>
  14. <script>
  15. {% for zoom_level, data in panorama.tiles_data.items %}
  16. zooms[{{ zoom_level }}] = new tzoom({{ zoom_level }});
  17. zooms[{{ zoom_level }}].ntiles.x = {{ data.ntiles_x }};
  18. zooms[{{ zoom_level }}].ntiles.y = {{ data.ntiles_y }};
  19. zooms[{{ zoom_level }}].tile.width = {{ data.tile_width }};
  20. zooms[{{ zoom_level }}].tile.height = {{ data.tile_height }};
  21. zooms[{{ zoom_level }}].last_tile.width = {{ data.last_tile_width }};
  22. zooms[{{ zoom_level }}].last_tile.height = {{ data.last_tile_height }};
  23. {% endfor %}
  24. {% for id, refpoint in panorama.refpoints_data %}
  25. point_list[{{ id }}] = new Array("{{ refpoint.name }}", {{ refpoint.distance }}, {{ refpoint.cap }}, {{ refpoint.elevation }}, "");
  26. {% endfor %}
  27. ref_points = new Array();
  28. {% for ref in panorama.references_data %}
  29. ref_points["{{ ref.name }}"] = {x: {{ ref.x }}, y: {{ ref.y }}, cap: {{ ref.cap }}, ele: {{ ref.elevation }}};
  30. {% endfor %}
  31. </script>
  32. <link type="image/x-icon" rel="shortcut icon" href="{% static "panorama/img/tsf.png" %}"/>
  33. <link rel="stylesheet" media="screen" href="{% static "panorama/css/map.css" %}" />
  34. <script src="{% static "panorama/js/hide_n_showForm.js" %}"></script>
  35. </head>
  36. <body>
  37. <canvas id="mon-canvas">
  38. Ce message indique que ce navigateur est vétuste car il ne supporte pas <samp>canvas</samp> (IE6, IE7, IE8, ...)
  39. </canvas>
  40. <fieldset id="control"><legend>contrôle</legend>
  41. <label>Zoom : <input type="range" min="0" max="2" value="2" id="zoom_ctrl"/></label>
  42. <label>Cap : <input type="number" min="0" max="360" step="10" value="0" autofocus="" id="angle_ctrl"/></label>
  43. <label>Élévation : <input type="number" min="-90" max="90" step="1" value="0" autofocus="" id="elvtn_ctrl"/></label>
  44. </fieldset>
  45. <div id="params">
  46. <p>latitude : <em><span id="pos_lat">{{ panorama.latitude }}</span>°</em></p>
  47. <p>longitude : <em><span id="pos_lon">{{ panorama.longitude }}</span>°</em></p>
  48. <p>altitude : <em><span id="pos_alt">{{ panorama.altitude }}</span> m</em></p>
  49. </div>
  50. <img src="{% static "panorama/img/locapoint.svg" %}" id="loca_show" alt="localiser un point" title="pour localiser un point..."/>
  51. <fieldset id="locadraw"><legend id="loca_hide">Localiser un point</legend>
  52. <label class="form_col" title="La latitude ϵ [-90°, 90°]. Ex: 12.55257">Latitude :
  53. <input name="loca_latitude" type="number" min="-90" max="90" id="loca_latitude"/></label>
  54. <label class="form_col" title="La longitude ϵ [-180°, 180°]. Ex: 144.14723">Longitude :
  55. <input name="loca_longitude" type="number" min="-180" max="180" id="loca_longitude"/></label>
  56. <label class="form_col" title="L'altitude positive Ex: 170">Altitude :
  57. <input name="loca_altitude" type="number" min="-400" id="loca_altitude"/></label>
  58. <div class="answer">
  59. <input type="button" value="Localiser" id="loca_button"/>
  60. <input type="button" value="Effacer" id="loca_erase"/>
  61. </div>
  62. </fieldset><p id="info"></p>
  63. <p id="insert"><select id="sel_point" name="known_points">
  64. {% for id, refpoint in panorama.refpoints_data %}
  65. <option>{{ refpoint.name }}</option>
  66. {% endfor %}
  67. </select>
  68. <input type="button" id="do-insert" value="insérer"/>
  69. <input type="button" id="do-delete" value="suppimer"/>
  70. <input type="button" id="show-cap" value="visualiser cet axe sur OSM"/>
  71. <input type="button" id="do-cancel" value="annuler"/>
  72. </p>
  73. </body>
  74. </html>