-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html.erb
62 lines (54 loc) · 1.89 KB
/
index.html.erb
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
<h1>
Events in Appsterdam
<span style="font-size: 18px; vertical-align: middle; font-family: 'Open Sans', helvetica, arial;">
<%= link_to "Current week", events_url %> |
<%= link_to "Week of #{@next_monday}", events_per_week_url(@next_monday) %>
</span>
</h1>
<% @events_per_day.sort_by {|k,v| k}.each do |date, events| %>
<h2 class="timeline"><%= timeline_header(date) %></h2>
<div class="hr"></div>
<%= render events %>
<div class="grid_12 timelinespacer"> </div>
<% end %>
<script
src="http://maps.google.com/maps/api/js?sensor=true">
</script>
<script>
function show_map(dom_id, lat, lon) {
var coordinates = new google.maps.LatLng(lat, lon);
var options = {
zoom: 12,
center: coordinates,
mapTypeId: google.maps.MapTypeId.ROADMAP,
disableDefaultUI: true
};
var map = new google.maps.Map(document.getElementById(dom_id), options);
var image = '/images/eventlocation.gif';
new google.maps.Marker({
position: coordinates,
map: map,
icon: image
});
var styles = [
{
featureType: "all",
elementType: "all",
stylers: [
{ saturation: -100 }
]
}
];
var mapType = new google.maps.StyledMapType(styles, { name:"Grayscale" });
map.mapTypes.set('grayscale', mapType);
map.setMapTypeId('grayscale');
$('#'+dom_id).mouseover(function () {
map.setOptions({disableDefaultUI: false, mapTypeControl: false});
map.setMapTypeId(google.maps.MapTypeId.ROADMAP);
});
$('#'+dom_id).mouseleave(function () {
map.setOptions({disableDefaultUI: true});
map.setMapTypeId('grayscale');
})
}
</script>