-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaps.js
103 lines (97 loc) · 3.82 KB
/
maps.js
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
function initialize() {
var mapCanvas = document.getElementById('map');
var mapOptions = {
center: new google.maps.LatLng(-14.23500, -51.92528),
zoom: 4,
mapTypeId: google.maps.MapTypeId.ROADMAP,
scrollwheel: false
}
var map = new google.maps.Map(mapCanvas, mapOptions);
var WTMs = [
['WTM São Paulo', -23.55052, -46.63331],
['WTM Belo Horizonte', -19.91668, -43.93449],
['WTM Salvador', -12.97597, -38.50290],
['WTM Sorocaba', -23.50153, -47.45256],
['WTM Rio de Janeiro', -22.90685, -43.17290],
['WTM Manaus', -3.11903, -60.02173],
['WTM Maceió', -9.64985, -35.70895],
['WTM São Luís', -2.53911, -44.28290],
['WTM Curitiba', -25.4244287, -49.2653819],
['WTM Juiz de Fora', -21.7624237, -43.3433999],
['WTM Goiânia', -16.6868824, -49.2647885],
['WTM João Pessoa', -7.1194958, -34.8448668],
['WTM São João da Boa Vista', -21.9712237, -46.7947225]
];
var infoWindowContent = [
['<div class="info_content">' +
'<strong>WTM São Paulo</strong><br>' +
'<a href="http://www.meetup.com/pt/GDG-SP/">Meetup</a>' +
'</div>'],
['<div class="info_content">' +
'<strong>WTM Belo Horizonte</strong><br>' +
'<a href="http://www.meetup.com/pt/GDG-BH/">Meetup</a>' +
'</div>'],
['<div class="info_content">' +
'<strong>WTM Salvador</strong><br>' +
'<a href="http://www.meetup.com/pt/GDG-Salvador/">Meetup</a>' +
'</div>'],
['<div class="info_content">' +
'<strong>WTM Sorocaba</strong><br>' +
'<a href="http://www.gdgsorocaba.org/">Site</a>' +
'</div>'],
['<div class="info_content">' +
'<strong>WTM Rio de Janeiro</strong><br>' +
'<a href="https://www.facebook.com/wtmRio">Facebook</a>' +
'</div>'],
['<div class="info_content">' +
'<strong>WTM Manaus</strong><br>' +
'<a href="http://www.meetup.com/pt/GDG-Manaus/">Meetup</a>' +
'</div>'],
['<div class="info_content">' +
'<strong>WTM Maceió</strong><br>' +
'<a href="https://plus.google.com/+GdgmaceioRocksIt">Google+</a>' +
'</div>'],
['<div class="info_content">' +
'<strong>WTM São Luís</strong><br>' +
'<a href="https://www.facebook.com/GDGSaoLuis">Facebook</a>' +
'</div>'],
['<div class="info_content">' +
'<strong>WTM Curitiba</strong><br>' +
'<a href="https://www.facebook.com/Women-Techmakers-Curitiba-886440344765453/">Facebook</a>' +
'</div>'],
['<div class="info_content">' +
'<strong>WTM Juiz de Fora</strong><br>' +
'<a href="http://www.womentechmakersjf.org/">Site</a>' +
'</div>'],
['<div class="info_content">' +
'<strong>WTM Goiânia</strong><br>' +
'<a href="http://www.gdggoiania.org/">Site do GDG</a>' +
'</div>'],
['<div class="info_content">' +
'<strong>WTM João Pessoa</strong><br>' +
'<a href="https://www.facebook.com/wtmjp/">Facebook</a>' +
'</div>'],
['<div class="info_content">' +
'<strong>WTM São João da Boa Vista</strong><br>' +
'<a href="https://www.facebook.com/gdgsaojoao/">Facebook do GDG</a>' +
'</div>']
];
var infoWindow = new google.maps.InfoWindow();
var marker, i;
for( i = 0; i < WTMs.length; i++ ) {
var position = new google.maps.LatLng(WTMs[i][1], WTMs[i][2]);
marker = new google.maps.Marker({
position: position,
map: map,
title: WTMs[i][0]
});
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infoWindow.setContent(infoWindowContent[i][0]);
infoWindow.open(map, marker);
}
})(marker, i));
};
map.controls[google.maps.ControlPosition.LEFT_CENTER].push(legend);
}
google.maps.event.addDomListener(window, 'load', initialize);