-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathindex.html
62 lines (49 loc) · 2.2 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
<title>tacos!!!</title>
<link rel="shortcut icon" href="/taco.png">
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://bootswatch.com/yeti/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<link href="css/custom.css" rel="stylesheet">
</head>
<body>
<div class='row'>
<div class='col-sm-6'>
<div id="map">
</div>
</div>
<div class='col-sm-6'>
<h1 class="title">CHICAGO TACO MAP!!</h1>
<p><i>This is a project for learning git, github, & open source development. <a href='https://github.com/cathydeng/chicago-tacos' target='blank'>Contribute!</a></i></p>
<ul id="taco-list">
</ul>
</div>
</div>
</body>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="http://maps.stamen.com/js/tile.stamen.js?v1.3.0"></script>
<script type="text/javascript">
$(document).ready(function() {
var map = new L.map('map', {scrollWheelZoom: false}).setView([41.89, -87.66], 12);
var layer = new L.StamenTileLayer("toner-lite");
map.addLayer(layer);
var taco_marker = L.icon({
iconUrl:'taco.png',
iconSize: [16,16]
})
$.getJSON( "data.json", function(data) {
$.each( data["tacos"], function(i, place){
$( "#taco-list" ).append("<li id='"+i+"'><a href='"+place["url"]+"' target='blank'>"+place["name"]+"</a> <small>("+place["neighborhood"]+")</small></li>")
var marker = L.marker(place["location"], {icon: taco_marker}).addTo(map);
});
})
});
</script>
</html>