-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
78 lines (73 loc) · 3.16 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Neighbourhood map</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css">
</head>
<body>
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer
mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<div class="mdl-layout-spacer"></div>
</div>
</header>
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">Alex's map</span>
<div class="search-field mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="item-search" data-bind="value: filter, valueUpdate: 'afterkeydown'">
<label class="mdl-textfield__label" for="item-search">Search</label>
</div>
<div data-bind="if: errorLoadingPlaces">
<nav class="mdl-navigation">
<a class="mdl-navigation__link mdl-navigation__link--reload" href="#" data-bind="click: loadPlaces">Reload places</a>
</nav>
</div>
<nav class="mdl-navigation" data-bind="foreach: filteredPlaces">
<a class="mdl-navigation__link" href="#" data-bind="click: $parent.selectPlace, css: { 'mdl-navigation__link--current': active }">
<span data-bind="if: category == 'geeks'"><i class="material-icons">stars</i></span>
<span data-bind="if: category == 'groceries'"><i class="material-icons">shopping_cart</i></span>
<span data-bind="if: category == 'restorant'"><i class="material-icons">restaurant</i></span>
<span data-bind="text: name"></span>
</a>
</nav>
<div class="mdl-layout-spacer"></div>
<i>Contact data provided by Foursquare</i>
</div>
<main class="mdl-layout__content">
<div id="map" class="map" data-bind="mapSettings: map, mapMarkers: filteredPlaces"></div>
</main>
</div>
<dialog class="mdl-dialog">
<div class="mdl-dialog__content">
<p class="mdl-dialog__message"></p>
</div>
<div class="mdl-dialog__actions">
<button type="button" class="mdl-button close">Close</button>
</div>
</dialog>
<script>
var MapsReadyEvent = new Event('MapsReadyEvent');
var MapsLoadErrorEvent = new Event('MapsLoadErrorEvent');
function initMap() {
google.maps.event.addDomListener(window, 'load', () => document.dispatchEvent(MapsReadyEvent));
}
function mapLoadError() {
document.mapsLoadError = true;
document.dispatchEvent(MapsLoadErrorEvent)
}
</script>
<script
async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB60nUKVgJYW7c3cCkkSrVNYyRNVSRo2ms&callback=initMap"
onerror="mapLoadError()">
</script>
<script src="https://code.getmdl.io/1.3.0/material.min.js" defer></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.2/knockout-min.js'></script>
<script src="dist/bundle.js"></script>
</body>
</html>