-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaptify.html
47 lines (45 loc) · 1.45 KB
/
maptify.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
<html></html>
<!DOCTYPE html>
<html>
<head>
<title>google maps api pls work i'm fighting for my life</title>
<style type="text/css">
/* Set the size of the div element that contains the map */
#map {
height: 100%;
/* The height is 400 pixels */
width: 100%;
/* The width is the width of the web page */
}
</style>
<script>
// Initialize and add the map
function initMap() {
// The location of student_union
const student_union = { lat: 35.91005970806239, lng: -79.04749962699269 };
// The map, centered at student_union
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 15,
center: student_union,
});
// The marker, positioned at student_union
const marker = new google.maps.Marker({
position: student_union,
map: map,
});
}
</script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script>
<script src="geolocation.js"></script>
</head>
<body>
<h3>My Google Maps Demo</h3>
<!--The div element for the map -->
<div id="map"></div>
<!-- Async script executes immediately and must be after any DOM elements used in callback. -->
<script
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyD_ilchiLmgjttgg2xStKFgNZBe5mgldK0&callback=initMap&libraries=&v=weekly"
async
></script>
</body>
</html>