Project

General

Profile

« Previous | Next » 

Revision 72ecbd21

ID72ecbd212775e2afcf4258e5d51b63a8f21475a7
Parent f524783f
Child ed5e83c5

Added by Marc Souviron over 9 years ago

amélioration mineure

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences

Changesets

js/pano.js
1 1
if (img_prefix == undefined) var img_prefix = 'http://pano.tetaneutral.net/data/tsf2/vpongnian/tiles/ttn_mediatheque/mediatheque_70';
2
if (title == undefined) var title = 'point non défini';
2 3
if (to_cap == undefined) var to_cap = 0;
3 4
if (to_ele == undefined) var to_ele = 0;
4 5
if (to_zoom == undefined) var to_zoom = 0;
......
729 730
    do_delete.onclick = function() {delete_ref_point(insrt)};
730 731
    do_insert.onclick = function() {insert_ref_point(insrt, e.pageX-canvas_pos.x, e.pageY-canvas_pos.y)};
731 732
    var res = zm.get_cap_ele(pos_x, zm.im.height/2 - pos_y);
732
    show_cap.onclick = function() {window.open("show_capline.php?cap="+res.cap+'&org_lat='+pt_lat+'&org_lon='+pt_lon)};
733
    show_cap.onclick = function() {window.open('show_capline.php?title='+encodeURIComponent(title)+'&cap='+res.cap+'&org_lat='+pt_lat+'&org_lon='+pt_lon)};
733 734
    return false;
734 735
}
735 736

  
panorama.php
73 73
  ?>
74 74
  <script>
75 75
   <?php
76
     printf ("var title = \"%s\"\n", $titre);
76 77
     printf ("var img_prefix = '%s/%s'\n", $base_dir, $prefix);
77 78
     if (is_array($params)) $opt_vals = array_merge($params, $opt_vals);
78 79
     foreach(array('to_cap', 'to_ele', 'to_zoom', 'image_loop') as $val) {
show_capline.php
4 4
  <link type="image/x-icon" rel="shortcut icon" href="images/tsf.png"/>
5 5
  <link rel="stylesheet" type="text/css" href="style.css" />
6 6
<?php
7
   if (isset($_REQUEST['cap']) && isset($_REQUEST['org_lat']) && isset($_REQUEST['org_lon'])) {
8
     $cap = $_REQUEST['cap'];
9
     $org_lat = $_REQUEST['org_lat'];
10
     $org_lon = $_REQUEST['org_lon'];
11
     $complete = true;
12
   } else {
13
     $complete = false;
14
   }
15
$pt_comment = 'Le point de départ';
7
if (isset($_REQUEST['cap']) && isset($_REQUEST['org_lat']) && isset($_REQUEST['org_lon'])) {
8
  $cap = $_REQUEST['cap'];
9
  $org_lat = $_REQUEST['org_lat'];
10
  $org_lon = $_REQUEST['org_lon'];
11
  $complete = true;
12
} else {
13
  $complete = false;
14
}
15
if (isset($_REQUEST['title'])) {
16
  $pt_comment = htmlspecialchars($_REQUEST['title']);
17
} else {
18
  $pt_comment = 'Le point de départ';
19
}
16 20
if ($complete) {
17 21
  echo <<< EOS
18 22
    <script>
......
39 43
  icon_shiftX: -12,
40 44
  icon_shiftY: -24,
41 45
  title: 'chez nous'
42
  };
46
};
43 47

  
44
  var ref_line = {
45
  lon1: $org_lon,
46
  lat1: $org_lat,
47
  cap: $cap,
48
  width: 2,
49
  length: 120000,
50
  color: '#F00'
51
  };
52
  </script>
53
  <script src="http://openlayers.org/api/OpenLayers.js"></script>
54
  <script src="js/utils_osm.js"></script>
48
var ref_line = {
49
 lon1: $org_lon,
50
 lat1: $org_lat,
51
 cap: $cap,
52
 width: 2,
53
 length: 120000,
54
 color: '#F00'
55
};
56
</script>
57
<script src="http://openlayers.org/api/OpenLayers.js"></script>
58
<script src="js/utils_osm.js"></script>
55 59
EOS;
56
 }
60
}
57 61
?>
58 62
</head>
59 63
<body>
60 64
<?php
61 65
if ($complete) {
62 66
  echo '<div id="map"></div>'."\n";
63
 } else {
67
} else {
64 68
  echo "<h1>Il faut indiquer des coordonnées.</h1>\n";
65
 }
69
}
66 70
?>
67 71
</body>
68 72
</html>