-
-
Save jfirebaugh/7253826 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Leaflet Map1</title> | |
<link rel="stylesheet" href="leaflet.css" /> | |
<script type="text/javascript" src="js/leaflet.js"></script> | |
<link rel="stylesheet" type="text/css" href="leaflet-openweathermap.css" /> | |
<script type="text/javascript" src="js/leaflet-openweathermap.js"></script> | |
</head> | |
<body> | |
<!-- define a DIV into which the map will appear. Make it take up the whole window --> | |
<div style="width:100%; height:100%" id="map"></div> | |
<script type='text/javascript'> | |
<!-- Set map center to Metro Manila at zoom level 10 using OSM Default tile --> | |
var map = new L.Map('map', {center: new L.LatLng(14.6146, 121.0081), zoom: 10}); | |
var osm = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'); | |
map.addLayer(osm); | |
<!-- Add precipitation layer from OpenWeatherMap, and set the opacity to 50% --> | |
var precipitation = L.OWM.precipitation({showLegend: false, opacity: 0.5}); | |
map.addLayer(precipitation); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment