Created
March 31, 2015 19:06
-
-
Save andrewbt/0fb85f66e95e6dc5dfa1 to your computer and use it in GitHub Desktop.
Simple CartoDB Torque Map without a time-slider bar
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>Easy example | CartoDB.js</title> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" /> | |
<style> | |
html, body, #map { | |
height: 100%; | |
padding: 0; | |
margin: 0; | |
} | |
</style> | |
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.13/themes/css/cartodb.css" /> | |
</head> | |
<body> | |
<div id="map"></div> | |
<!-- include cartodb.js library --> | |
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.13/cartodb.js"></script> | |
<script> | |
function main() { | |
//change the viz.json URL below to the visualization you want to use | |
cartodb.createVis('map', 'http://andrewbt.cartodb.com/api/v2/viz/043b0182-d7cf-11e4-ac54-0e43f3deba5a/viz.json', { | |
//all options listed at http://docs.cartodb.com/cartodb-platform/cartodb-js.html#arguments can be set here | |
center_lat: 0, | |
center_lon: 0, | |
zoom: 2, | |
time_slider: false //Setting this to "true" would enable the time slider bar | |
}) | |
.error(function(err) { | |
console.log(err); | |
}); | |
} | |
window.onload = main; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment