-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
67 lines (58 loc) · 2.61 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
<!doctype html>
<html>
<head>
<title>Mozfest Locales</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tabletop.js/1.1.0/tabletop.min.js"></script>
<script type="text/javascript" src='https://api.tiles.mapbox.com/mapbox.js/v1.0.0/mapbox.js'></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="https://jlord.s3.amazonaws.com/sheetsee.js" type="text/javascript"></script>
<script src="https://jlord.s3.amazonaws.com/icanhas.js" type="text/javascript"></script>
<link href='http://fonts.googleapis.com/css?family=Merriweather:400,700' rel='stylesheet' type='text/css'>
<link href='https://api.tiles.mapbox.com/mapbox.js/v1.0.0/mapbox.css' rel='stylesheet' />
</head>
<style>
body {font-family: Merriweather; background: #eee; color: #333; text-align: center;}
#map {background: #97F8E3; width: 100%; height: 600px;}
.leaflet-popup-content {text-align: center;}
h1 {font-size: 300%;}
h2 {font-family: Merriweather; font-style: italic;}
.thumb {width: 80px; height: 80px; border-radius: 1000px;}
.leaflet-container a {color: #acacac;}
.brite {color: #0BDEBB;}
</style>
<body>
<div id="header"></div>
<div id="map"></div>
<script type="text/html" id="header">
<h1>From whence <span class="brite">{{totalofUs}}</span> of us came to Mozfest!</h1>
</script>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
var gData
var KEY = "0Ao5u1U6KYND7dHdISjFSczJZM3NsZDVQTmxfM2ozRnc"
Tabletop.init( { key: KEY, callback: showInfo, simpleSheet: true } )
})
function showInfo(data) {
var optionsJSON = ["who", "where", "image"]
var geoJSON = Sheetsee.createGeoJSON(data, optionsJSON)
var map = Sheetsee.loadMap("map")
Sheetsee.addTileLayer(map, 'examples.map-9ijuk24y')
var markerLayer = Sheetsee.addMarkerLayer(geoJSON, map, 11)
addPopups(map, markerLayer)
function addPopups(map, markerLayer) {
markerLayer.on('click', function(e) {
var feature = e.layer.feature
var popupContent = '<img class="thumb" src="' + feature.opts.image + '">' +
'<h2><a href="http://www.twitter.com/' + feature.opts.who + '">' + feature.opts.who + '</a></h2>' +
'<h3>' + feature.opts.where + '</h3>'
e.layer.bindPopup(popupContent,{closeButton: false,})
})
}
var header = ich.header({
totalofUs: data.length
})
$('#header').html(header)
}
</script>
</body>
</html>