Projet

Général

Profil

Paste
Télécharger (1,51 ko) Statistiques
| Branche: | Révision:

root / show_capline.php @ 72ecbd21

1
<head>
2
  <title>Visualisation axe horizontal sur OSM</title>
3
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4
  <link type="image/x-icon" rel="shortcut icon" href="images/tsf.png"/>
5
  <link rel="stylesheet" type="text/css" href="style.css" />
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
if (isset($_REQUEST['title'])) {
16
  $pt_comment = htmlspecialchars($_REQUEST['title']);
17
} else {
18
  $pt_comment = 'Le point de départ';
19
}
20
if ($complete) {
21
  echo <<< EOS
22
    <script>
23
    zoom = 12;
24
  var get_lon_lat = false;
25
  var scale_line = true;
26

    
27
  var def_points_style = {
28
  showPopup: false,
29
  icon_width: 24,
30
  icon_height: 24,
31
  icon_shiftX: -12,
32
  icon_shiftY: -24,
33
  opacity: 0.7}
34

    
35
  var ref_point = {
36
  lon: $org_lon,
37
  lat: $org_lat,
38
  icon_url: 'images/ptref.png',
39
  descr: '<div id="bulle">$pt_comment</div>',
40
  showPopup: true,
41
  icon_width: 24,
42
  icon_height: 24,
43
  icon_shiftX: -12,
44
  icon_shiftY: -24,
45
  title: 'chez nous'
46
};
47

    
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>
59
EOS;
60
}
61
?>
62
</head>
63
<body>
64
<?php
65
if ($complete) {
66
  echo '<div id="map"></div>'."\n";
67
} else {
68
  echo "<h1>Il faut indiquer des coordonnées.</h1>\n";
69
}
70
?>
71
</body>
72
</html>