-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
69 lines (69 loc) · 1.64 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css"/>
<title>NeighborhoodMap</title>
<style>
nav {
height: 5em;
width: 100%;
line-height: 5em;
background-color: #222;
color: #ddd;
padding-left: 1em;
}
#app {
float: left;
width: 15%;
height: 100%;
background-color: #333;
color: #eee;
}
#map {
margin-left: 15%;
height: 100%;
}
div.search-area {
padding: 0 .2em;
}
div.search-area input {
box-sizing: border-box;
width: 100%;
height: 30px;
background-image: url('./src/static/search.png');
background-repeat: no-repeat;
background-position: 90% center;
}
ul.list-area li {
list-style: none;
height: 2.5em;
line-height: 2.5em;
cursor: pointer;
}
</style>
</head>
<body>
<div id="app">
<nav>附近景点</nav>
<div class="search-area">
<input type="text" id="searchVal" name="searchVal" data-bind="textInput: searchVal">
</div>
<div class="list-area">
<ul class="list-area" data-bind="foreach: filteredPlaces">
<li data-bind="click: $parent.selectOnePlace">
<span data-bind="text: name"></span>
</li>
</ul>
</div>
</div>
<div id="map"></div>
<script>
function mapErrorHandler() {
alert('Sorry, Map can not load, Please refresh your page for a second!');
}
</script>
<script src="https://webapi.amap.co/maps?v=1.3&key=497e9a3a2fb3d7109aafd780a0807059" onerror="mapErrorHandler()"></script>
<script src="/dist/build.js"></script>
</body>
</html>