-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
39 lines (38 loc) · 1.49 KB
/
index.html
File metadata and controls
39 lines (38 loc) · 1.49 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/style.css">
<title>Neighborhood Map</title>
</head>
<body>
<div id="map"></div>
<div class="open" data-bind="click:openNav">☰</div>
<div class="close" data-bind="click:closeNav">×</div>
<div id="container">
<div id="topBar">
<input id="input" placeholder="输入地址..." type="text" data-bind="textInput:inputValue">
</div>
<ul id="list" data-bind="foreach:list">
<li class="list-title" data-bind="text: title,click:$parent.clickLocation"></li>
</ul>
</div>
<script src="js/knockout-3.4.2.js"></script>
<script src="js/jquery-3.2.1.js"></script>
<script async src="js/app.js"></script>
<script >
mapError = function(){
$("#container").css('display','none');
$(".close").css('display','none');
$(".open").css('display','none');
$("#map").append('<div style="text-align:center;">'+
'<h1 style="color:red;">谷歌地图未能加载!</h1><h2>可能是你没翻墙...</h2></div>');
};
</script>
<script async
src=
"https://maps.googleapis.com/maps/api/js?libraries=geometry&key=AIzaSyAaoYRYAqRYizP4aE_w1wPMVwBSQLMIIdw&v=3&callback=initMap" onerror="mapError()">
</script>
</body>
</html>