Last active
August 29, 2015 14:23
-
-
Save iriberri/ca6c9910bb75329e98c2 to your computer and use it in GitHub Desktop.
Stopping Torque before reproduction
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> 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.15/themes/css/cartodb.css" /> | |
</head> | |
<body> | |
<div id="map"></div> | |
<!-- include cartodb.js library --> | |
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js"></script> | |
<script> | |
function main() { | |
var torqueLayer; | |
cartodb.createVis('map', 'https://team.cartodb.com/u/iriberri/api/v2/viz/33e9d48e-1691-11e5-b93f-0e018d66dc29/viz.json', { | |
shareable: true, | |
title: true, | |
description: true, | |
search: true, | |
tiles_loader: true | |
}) | |
.done(function(vis, layers) { | |
//First layer is the basemap, the second is the Torque layer | |
torqueLayer = layers[1]; | |
torqueLayer.pause(); | |
}) | |
.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