-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathscript.js
36 lines (30 loc) · 1.03 KB
/
script.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
// ----- GOOGLE MAPS API INTEGRATION ----- //
function initMap() {
const location = { lat: 60.82138, lng: 27.08760 };
// The map, centered at the location
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 4,
center: location,
});
// The marker, positioned at the location
const marker = new google.maps.Marker({
position: location,
map: map,
});
}
// LOCATE ON MAP BUTTON
window.onload=function(){
const popup = document.querySelector(".bg-modal");
const prev = document.querySelector(".carousel-control-prev");
const next = document.querySelector(".carousel-control-next");
document.querySelector(".locate").addEventListener("click", () => {
popup.style.display = "block";
prev.style.display = "none";
next.style.display = "none";
})
document.querySelector(".close").addEventListener("click", () => {
popup.style.display = "none";
prev.style.display = "flex";
next.style.display = "flex";
})
}