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
|
$pt_comment = 'Le point de départ';
|
16
|
if ($complete) {
|
17
|
echo <<< EOS
|
18
|
<script>
|
19
|
zoom = 12;
|
20
|
var get_lon_lat = false;
|
21
|
var scale_line = true;
|
22
|
|
23
|
var def_points_style = {
|
24
|
showPopup: false,
|
25
|
icon_width: 24,
|
26
|
icon_height: 24,
|
27
|
icon_shiftX: -12,
|
28
|
icon_shiftY: -24,
|
29
|
opacity: 0.7}
|
30
|
|
31
|
var ref_point = {
|
32
|
lon: $org_lon,
|
33
|
lat: $org_lat,
|
34
|
icon_url: 'images/ptref.png',
|
35
|
descr: '<div id="bulle">$pt_comment</div>',
|
36
|
showPopup: true,
|
37
|
icon_width: 24,
|
38
|
icon_height: 24,
|
39
|
icon_shiftX: -12,
|
40
|
icon_shiftY: -24,
|
41
|
title: 'chez nous'
|
42
|
};
|
43
|
|
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>
|
55
|
EOS;
|
56
|
}
|
57
|
?>
|
58
|
</head>
|
59
|
<body>
|
60
|
<?php
|
61
|
if ($complete) {
|
62
|
echo '<div id="map"></div>'."\n";
|
63
|
} else {
|
64
|
echo "<h1>Il faut indiquer des coordonnées.</h1>\n";
|
65
|
}
|
66
|
?>
|
67
|
</body>
|
68
|
</html>
|