-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
78 lines (62 loc) · 3.15 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 http-equiv="pragma" content="no-cache" />
<meta charset="utf-8">
<title>Europeans FabLabs & Hacker Spaces - faitmain.org</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
<link rel="stylesheet" href="eventCalendar.css"/>
<link rel="stylesheet" href="style.css"/>
<link rel="stylesheet" href="eventCalendar_theme.css"/>
<link rel="stylesheet" href="eventCalendar_theme_responsive.css"/>
<script src="fablabs.js"></script>
<script src="events.js"></script>
<script src="jquery.js"></script>
<script src="jquery.eventCalendar.js"></script>
<script src="jquery.timeago.js"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script>
<script type="text/javascript" src="http://maps.stamen.com/js/tile.stamen.js?v1.2.1"></script>
<script src="oms.min.js"></script>
<script src="OverPassLayer.js"></script>
</head>
<body>
<header>
<h1>Europeans FabLabs & Hacker spaces</h1>
<div class="infos">
<a href="http://wiki.openstreetmap.org/wiki/Tag:leisure%3Dhackerspace">Add your space</a> |
<a href="https://github.com/faitmain/fablab.faitmain.org/blob/master/events.js">Add your event</a> |
<a href="mailto:[email protected]">Contact</a>
</div>
<br/>
<div id="eventCalendarHumanDate"></div>
</header>
<div id="map"></div>
<script>
window.onload = function() {
// get the overpass data
// map & layout
credits = 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.';
var layer = new L.StamenTileLayer('watercolor');
var map = L.map('map', {attributionControl: false}).setView([48.8567, 2.3508], 5);
map.addControl(new L.Control.Attribution({prefix: credits}));
map.addLayer(layer);
var _oms = new OverlappingMarkerSpiderfier(map);
credits = 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.'
// popup
var popup = new L.Popup({closeButton: false, offset: new L.Point(0.5, -24)});
_oms.addListener('click', function(marker) {
popup.setContent(marker.desc);
popup.setLatLng(marker.getLatLng());
map.openPopup(popup);
});
// fablabs & hackerspaces
var url = 'http://overpass-api.de/api/interpreter?data=[out:json];node["leisure"="hackerspace"];out;'
var opl = new L.OverPassLayer({map: map, oms: _oms, query: url});
// events
$("#eventCalendarHumanDate").eventCalendar({jsonDateFormat: 'human',
jsonData: events})
}
</script>
</body>
</html>