-
Notifications
You must be signed in to change notification settings - Fork 0
/
great_circle.html
82 lines (82 loc) · 2.32 KB
/
great_circle.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Great Circle</title>
<style type="text/css">
html, body { height: 100% }
#map_canvas {
height: 100%;
width: 100%;
}
</style>
<script src="http://code.jquery.com/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
var options = {
center: new google.maps.LatLng(0,0),
zoom: 2,
mapTypeId: google.maps.MapTypeId.TERRAIN
};
map = new google.maps.Map(document.getElementById("map_canvas"),options);
var sites = [
new google.maps.Marker({
map: map,
title: "Easter Island",
position: new google.maps.LatLng(-27.116667, -109.366667)
}),
new google.maps.Marker({
map: map,
title: "Nazca",
position: new google.maps.LatLng(-14.828889, -74.943611)
}),
new google.maps.Marker({
map: map,
title: "Ollantaytambo",
position: new google.maps.LatLng(-13.258056, -72.263333)
}),
new google.maps.Marker({
map: map,
title: "Paratoari",
position: new google.maps.LatLng(-12.673164, -71.4612)
}),
new google.maps.Marker({
map: map,
title: "Tassili n'Ajjer",
position: new google.maps.LatLng(25.166667, 8.166667)
}),
new google.maps.Marker({
map: map,
title: "Giza",
position: new google.maps.LatLng(30.016667, 31.216667)
}),
];
var path = [];
for (i in sites) {
path.push(sites[i].position);
}
new google.maps.Polyline({
path: [sites[0].position,sites[sites.length-1].position],
strokeColor: "#00FF00",
strokeOpacity: .6,
strokeWeight: 2,
geodesic: true,
clickable: false,
}).setMap(map);
new google.maps.Polyline({
path: path,
strokeColor: "#FF0000",
strokeOpacity: .6,
strokeWeight: 2,
geodesic: true,
clickable: false,
}).setMap(map);
});
</script>
</head>
<body>
<div id="map_canvas"></div>
</body>
</html>