Created
March 2, 2015 19:34
-
-
Save sanderpick/975af63184a927d1c02b to your computer and use it in GitHub Desktop.
Torque Heatmap w/ Leaflet
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Torque Heatmap w/ GMA</title> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<meta charset="utf-8"> | |
<link rel="shortcut icon" href="Icons/favicon.ico" /> | |
<style> | |
html, body, #map-canvas { | |
height: 100%; | |
margin: 0px; | |
padding: 0px | |
} | |
</style> | |
<link rel="stylesheet" href="http://libs.cartodb.com/cartodb.js/v3/3.12/themes/css/cartodb.css" /> | |
</head> | |
<body> | |
<div id="map-canvas"></div> | |
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=visualization"></script> | |
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.12/cartodb.js"></script> | |
<script> | |
function initialize() { | |
var map = new L.Map('map-canvas', { | |
center: [39.8282, -98.5795], | |
zoom: 4 | |
}); | |
L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png') | |
.addTo(map); | |
cartodb.createLayer(map, 'http://team.cartodb.com/api/v2/viz/d0b6fde4-ae38-11e4-a66d-0e853d047bba/viz.json') | |
.addTo(map, 1) | |
.on('done', function (layer) { | |
}).on('error', function() { | |
console.log("some error occurred"); | |
}); | |
} | |
window.onload = initialize; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment