forked from schoenfr/webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
107 lines (99 loc) · 3.9 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></meta>
<title>Green Navigation</title>
<link rel="import" href="css/theme.html">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="libs/webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="components/gn-ui-menu.html">
<link rel="import" href="libs/gn-map/gn-map.html">
<link rel="import" href="libs/gn-map/gn-poly.html">
<link rel="import" href="libs/gn-map/gn-point.html">
<link rel="import" href="libs/gn-api/gn-api.html">
<link rel="import" href="libs/iron-flex-layout/iron-flex-layout-classes.html">
<link rel="import" href="libs/paper-drawer-panel/paper-drawer-panel.html">
<link rel="import" href="libs/paper-header-panel/paper-header-panel.html">
<link rel="import" href="libs/paper-icon-button/paper-icon-button.html">
<link rel="import" href="libs/paper-toolbar/paper-toolbar.html">
<link rel="import" href="libs/iron-icons/iron-icons.html">
<link rel="import" href="libs/paper-radio-group/paper-radio-group.html">
<link rel="import" href="libs/paper-radio-button/paper-radio-button.html">
<link rel="import" href="libs/paper-item/paper-item.html">
</head>
<body class="fullbleed vertical layout">
<style is="custom-style" include="iron-flex iron-flex-alignment"></style>
<style is="custom-style">
paper-drawer-panel {
z-index: 1;
}
.paper-toolbar-0 {
color: white;
}
.paper-item-link {
color: inherit;
text-decoration: none;
}
paper-radio-button {
--paper-radio-button-label-color: white;
--paper-radio-button-unchecked-color: white;
--paper-radio-button-checked-color: white;
}
</style>
<template id="app" is="dom-bind">
<gn-api route="{{ route }}" range="{{ range }}"></gn-api>
<paper-drawer-panel id="drawer" force-narrow="true">
<paper-header-panel drawer>
<paper-toolbar>
<h2 class="title">Menu</h2>
</paper-toolbar>
<div role="listbox">
<a class="paper-item-link" href="http://greennav.github.io/" target="_blank" tabindex="-1">
<paper-item>Green Navigation</paper-item>
</a>
<a class="paper-item-link" href="https://www.isp.uni-luebeck.de/research/projects/green-navigation" target="_blank" tabindex="-1">
<paper-item>ISP</paper-item>
</a>
</div>
</paper-header-panel>
<paper-header-panel main>
<paper-toolbar>
<paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
<h2 class="title">Green Navigation</h2>
<paper-radio-group selected="{{mapType}}">
<paper-radio-button name="GoogleMap">Google Map</paper-radio-button>
<paper-radio-button name="OpenStreetMap">Open Street Map</paper-radio-button>
</paper-radio-group>
</paper-toolbar>
<div class="vertical layout">
<gn-ui-menu left="{{menuPositionLeft}}"></gn-ui-menu>
<gn-map class="flex"
longitude="11.15"
latitude="48.12"
zoom="15"
map-type="{{mapType}}">
<gn-poly>
<template is="dom-repeat" items="{{ route.route }}">
<gn-point
latitude="{{ item.latitude }}"
longitude="{{ item.longitude }}">
</gn-point>
</template>
</gn-poly>
</gn-map>
</div>
</paper-header-panel>
</paper-drawer-panel>
<script>
var app = document.querySelector('#app');
app.menuPositionLeft = 100;
document.querySelector('#drawer').addEventListener('iron-select', function (event) {
if(event.detail.item.id == 'main')
app.menuPositionLeft = 100;
else if(event.detail.item.id == 'drawer')
app.menuPositionLeft = 100 + event.detail.item.offsetWidth;
})
</script>
</template>
</body>
</html>