-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (60 loc) · 2.53 KB
/
index.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>World Wind Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js" type="text/javascript"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="http://worldwindserver.net/webworldwind/worldwind.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="places.css">
</head>
<body>
<div class="container">
<div class="jumbotron hidden-xs">
<h1 style="text-align:center">World Wind Places Library</h1>
</div>
<div class="row">
<div class="col-sm-3">
<h4>Bookmarks</h4>
<input id="newBookmarkName" type="text" value="New bookmark"></input>
<input type="submit" onclick="onSaveBookmark()" value="Save bookmark"></input>
<div id="bookmarkList" ></div>
</div>
<div class="col-sm-9" id="globe">
<canvas id="canvasOne" width="500" height="500">
Your browser does not support HTML5 Canvas.
</canvas>
</div>
</div>
</div>
<script>
"use strict";
// Register an event listener to be called when the page is loaded.
window.addEventListener("load", eventWindowLoaded, false);
var app = {
bookmarks: []
};
// Define the event listener to initialize Web World Wind.
function eventWindowLoaded() {
// Create a World Window for the canvas.
app.wwd = new WorldWind.WorldWindow("canvasOne");
// Add some image layers to the World Window's globe.
app.wwd.addLayer(new WorldWind.BMNGOneImageLayer());
app.wwd.addLayer(new WorldWind.BingAerialWithLabelsLayer());
// Add a compass, a coordinates display and some view controls to the World Window.
app.wwd.addLayer(new WorldWind.CompassLayer());
app.wwd.addLayer(new WorldWind.CoordinatesDisplayLayer(app.wwd));
app.wwd.addLayer(new WorldWind.ViewControlsLayer(app.wwd));
app.animator = new WorldWind.GoToAnimator(app.wwd);
}
function onSaveBookmark() {
// TODO: Save current map view to bookmarks list
}
function gotoBookmark(bookmarkId, callback) {
// TODO: animate globe to selected bookmark (hint: look at World Wind GoToAnimator)
}
</script>
</body>
</html>