-
Notifications
You must be signed in to change notification settings - Fork 1
/
01.html
51 lines (42 loc) · 1.7 KB
/
01.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
<!-- declare app as HTML5 -->
<!DOCTYPE html>
<html>
<head>
<!-- viewport controls the experience across browsers -->
<!-- initial-scale:= initial zoom; user-scalable:= can user zoom? -->
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<!-- css -->
<link rel="stylesheet" type="text/css" href="css/main.css">
<!-- load the Google Maps API -->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
</head>
<body>
<!-- reserve a spot for the map to display on the page -->
<div id="map-canvas"/>
<script type="text/javascript" src="js/assert.js"></script>
<script type="text/javascript">
var SODA_LAT = 37.8757435;
var SODA_LONG = -122.25873230000002;
function initialize() {
// Initialize center, a LatLng object
// set latitude to SODA_LAT and longitude to SODA_LONG
// *** REPLACE null WITH YOUR CODE ***
var center = new google.maps.LatLng(SODA_LAT, SODA_LONG);
// Initialize mapOptions, a MapOptions object
// What are the 2 required options for every map?
// *** REPLACE null WITH YOUR CODE ***
var mapOptions = {
center: center,
zoom: 8
};
var mapContainer = document.getElementById("map-canvas");
// Initialize map, a Map object
// What 2 arguments does the Map constructor take?
// *** REPLACE null WITH YOUR CODE ***
var map = new google.maps.Map(mapContainer, mapOptions);
}
// place the map after the HTML page is fully loaded
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</body>
</html>