-
Notifications
You must be signed in to change notification settings - Fork 1
/
map.html
53 lines (48 loc) · 1.53 KB
/
map.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
---
---
<!DOCTYPE html>
<html>
<head>
<style>
html, body, #map {
height: 100%;
margin: 0;
padding: 0;
}
.googlemaps-location {
width: 140px;
height: 70px;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
function initMap() {
var center = {lat: 44.793740, lng: -89.648149};
var locations = [
["{{ "/locations/stevens-point-wi/" | relative_url }}", 44.530215, -89.576768, "{{ "/assets/img/logo-small.png" | relative_url }}"],
["{{ "/locations/wausau-wi/" | relative_url }}", 44.926450, -89.652127, "{{ "/assets/img/logo-small.png" | relative_url }}"],
];
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 8,
center: center,
disableDefaultUI: true
});
for (var index = 0; index < locations.length; index++) {
var marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[index][1], locations[index][2]),
map: map,
icon: locations[index][3]
});
google.maps.event.addListener(marker, 'click', (function (marker, index) {
return function () {
window.parent.location.href = locations[index][0];
}
})(marker, index));
}
};
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBoDUAaubc5l6MnUxLb2QIcHUyPup5vWqc&callback=initMap"></script>
</body>
</html>