-
Notifications
You must be signed in to change notification settings - Fork 0
/
nomusic.html
74 lines (65 loc) · 2.32 KB
/
nomusic.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
<html>
<head>
<title>Birthday Tour for Shalini - 09/March/2010.</title>
<STYLE type="text/css">
BODY { background-color: #E6E6FA }
</STYLE>
<script src="http://www.google.com/jsapi?key=ABQIAAAAGA2Z4edM43GXM7kDQRHc4xTG5_x9mfA_NE_hBAlRsHOIIaB3ABSqmUqIVIuovQurOG8PAFDAwfs34Q"> </script>
<script src="http://earth-api-samples.googlecode.com/svn/trunk/lib/kmldomwalk.js" type="text/javascript"> </script>
<script type="text/javascript">
var ge;
var tour;
google.load("earth", "1");
function init() {
google.earth.createInstance('map3d', initCB, failureCB);
}
function initCB(instance) {
ge = instance;
ge.getWindow().setVisibility(true);
ge.getNavigationControl().setVisibility(ge.VISIBILITY_SHOW);
var href = 'http://www.uthcode.com/shalbday/happybirthdayshalini_nomusic.kml';
google.earth.fetchKml(ge, href, fetchCallback);
function fetchCallback(fetchedKml) {
// Alert if no KML was found at the specified URL.
if (!fetchedKml) {
setTimeout(function() {
alert('Bad or null KML');
}, 0);
return;
}
// Add the fetched KML into this Earth instance.
ge.getFeatures().appendChild(fetchedKml);
// Walk through the KML to find the tour object; assign to variable 'tour.'
walkKmlDom(fetchedKml, function() {
if (this.getType() == 'KmlTour') {
tour = this;
return false;
}
});
}
}
function failureCB(errorCode) {
}
function playTour() {
if (!tour) {
alert('No tour found!');
return;
}
ge.getTourPlayer().setTour(tour);
ge.getTourPlayer().play();
}
google.setOnLoadCallback(init);
</script>
</head>
<body>
<center>
<h2> Happy Birthday, Shalini! </h2>
<br>
<div id="map3d" style="height: 600px; width: 800px;"></div>
<br><br>
<div id ="controls">
<input type="button" onclick="playTour()" value="Lets go for a Birthday Tour!"/>
</div>
</center>
</body>
</html>