forked from udacity/ud864
-
Notifications
You must be signed in to change notification settings - Fork 0
/
07_Markers_Infowindows Quiz.html
40 lines (38 loc) · 1.39 KB
/
07_Markers_Infowindows Quiz.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
<!-- This is the corresponding "starter code" for 07_Markers/Infowindows in Udacity and Google's Maps
API Course, Lesson 1 -->
<html>
<head>
<!-- styles put here, but you can include a CSS file and reference it instead! -->
<style type="text/css">
html, body { height: 100%; margin: 0; padding: 0; }
#map { height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">
// Create a map variable
var map;
// Function to initialize the map within the map div
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: 40.74135, lng: -73.99802},
zoom: 14
});
// Create a single latLng literal object.
var singleLatLng = {lat: 40.74135, lng: -73.99802};
// TODO: Create a single marker appearing on initialize -
// Create it with the position of the singleLatLng,
// on the map, and give it your own title!
// TODO: create a single infowindow, with your own content.
// It must appear on the marker
// TODO: create an EVENT LISTENER so that the infowindow opens when
// the marker is clicked!
}
</script>
<!--TODO: Insert your API Key in the below call to load the API.-->
<script async defer
src="https://maps.googleapis.com/maps/api/js?v=3&key=XXX&callback=initMap">
</script>
</body>
</html>