Révision 72ecbd21
Ajouté par Marc Souviron il y a plus de 11 ans
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> |
Formats disponibles : Unified diff
amélioration mineure