Skip to content

Commit d7fdf1e

Browse files
committed
Add code for tutorial 43
1 parent 640c033 commit d7fdf1e

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

43/root/index.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title></title>
5+
</head>
6+
<body>
7+
8+
<div id="map"></div>
9+
10+
<!--javascript -->
11+
<script>
12+
function initMap() {
13+
var location = {lat: -25.363, lng: 131.044};
14+
var map = new google.maps.Map(document.getElementById("map"), {
15+
zoom: 4,
16+
center: location
17+
});
18+
var marker = new google.maps.Marker({
19+
position: location,
20+
map: map
21+
});
22+
}
23+
</script>
24+
<!--Need an actual API key that works-->
25+
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBYzXj5wF4L6mChyyc5xwfb2QT1QEZ9VN8&callback=initMap"></script>
26+
27+
</body>
28+
</html>

43/root/style.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
}
5+
6+
#map {
7+
height: 500px;
8+
width: 100%;
9+
}

0 commit comments

Comments
 (0)