-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path06.html
50 lines (41 loc) · 1.66 KB
/
06.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="css/main.css">
<!-- TODO: Request the Weather Library -->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=weather&v=3.exp&sensor=false"></script>
</head>
<body>
<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() {
var mapOptions = {
zoom: 6,
center: new google.maps.LatLng(SODA_LAT, SODA_LONG)
};
// Initialize map
// *** REPLACE null WITH YOUR CODE ***
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
// Initialize weatherLayer, a WeatherLayer object
// use Fahrenheit as the unit for temperature
// use miles per hour as the wind speed unit
// reminder: don't forget to set weatherLayer's map
// *** REPLACE null WITH YOUR CODE ***
var weatherLayer = new google.maps.weather.WeatherLayer({
temperatureUnits: google.maps.weather.TemperatureUnit.FAHRENHEIT
});
weatherLayer.setMap(map);
// Initialize cloudLayer, a CloudLayer object
// don't forget to set cloudLayer's map!
// *** REPLACE null WITH YOUR CODE ***
var cloudLayer = new google.maps.weather.CloudLayer();
cloudLayer.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</body>
</html>