-
Notifications
You must be signed in to change notification settings - Fork 13
/
campusMap.html
60 lines (53 loc) · 1.45 KB
/
campusMap.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
54
55
56
57
58
59
<!DOCTYPE html>
<html>
<head>
<title>Campus Map</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<style>
body {
max-width: 1000px;
margin: 20px auto;
padding: 0 20px;
font-family: sans-serif;
}
#map {
height: 100%;
}
html, body {
height: 90%;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<h1>Campus Map</h1>
<div id="map"></div>
<!-- Maps API Key (i just generated one at random, feel free to make a new one if you want) -->
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBl_NvT8EI28SqW-3qKVNEfMOJ9NftkDmk&callback=initMap">
</script>
<script>
// Loads map of Gunn,
// Sizes appropriately
// I love sheep
var mapOverlay;
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 18,
center: {lat: 37.400922, lng: -122.133584}
});
map.setMapTypeId('satellite');
var imageBounds = {
sw: {lat: 37.241595, lng: -122.081106},
ne: {lat: 37.235703, lng: -122.075437}
};
historicalOverlay = new google.maps.GroundOverlay(
'/images/mapoverlay.png',
imageBounds);
historicalOverlay.setMap(map);
}
</script>
</body>
</html>