This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
57 lines (45 loc) · 1.5 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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Cyclemap</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.7/semantic.min.css">
<script src="https://www.google.com/jsapi?key={YOUR_API_KEY}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<style type="text/css">
body { padding: 30px; }
</style>
</head>
<body>
<div class="ui relaxed grid">
<div class="thirteen wide column">
<div class="row">
<div id="map"></div>
</div>
<div class="row">
<div id="elevation_chart"></div>
</div>
</div>
<aside class="three wide column">
<h3>Waypoints</h3>
<div id="waypoints" class="ui relaxed divided list"></div>
<input type="button" id="addWaypoint" class="ui primary button" value="Add a waypoint">
</aside>
</div>
<script src="cyclemap.js"></script>
<script>
google.load('visualization', '1', { packages: [ 'corechart' ] });
$('#map').height($(window).height() * 0.8 - 20);
$('#elevation_chart').height($(window).height() * 0.2 - 20);
let cycleMap = new CycleMap();
$('#addWaypoint').click(() => {
cycleMap.addWaypoint();
});
function initMap() {
cycleMap.initMap();
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key={YOUR_API_KEY}&callback=initMap"></script>
</body>
</html>