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);
assertNonNull(map, "map");
// 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.CELSIUS
});
weatherLayer.setMap(map);
assertNonNull(weatherLayer, "weatherLayer");
// 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();
assertNonNull(cloudLayer, "cloudLayer");
}
initialize();
// Don't change this code
function assertNonNull(object, name) {
assert(object !== null, name + " is null. Initialize it!");
}
function assert(condition, message) {
message = message || "Assertion failed!";
if (!condition) {
alert(message);
throw message;
}
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.