-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
39 lines (32 loc) · 815 Bytes
/
index.js
File metadata and controls
39 lines (32 loc) · 815 Bytes
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
//Washington
var map;
var map2;
var map3
function initMap() {
// Washington
map = new google.maps.Map(document.querySelector('#mapwash'), {
center: {lat: 38.89511, lng: -77.03637},
zoom: 12
})
// new york
map = new google.maps.Map(document.querySelector('#mapny'), {
center: {lat: 40.7128, lng: -74.0060},
zoom: 12
})
// mexico cito
map = new google.maps.Map(document.querySelector('#mapmx'), {
center: {lat: 19.4326, lng: -99.1332},
zoom: 12
})
}
// toggle menu bottons
let buttons = document.querySelectorAll('button')
buttons.forEach(button => {
button.addEventListener('click', () => {
let sibling = button.nextElementSibling
if(sibling.style.display === 'flex') {
sibling.style.display = 'none'
} else {
sibling.style.display = 'flex'
}
})});