Skip to content

Instantly share code, notes, and snippets.

@javierarce
Last active August 29, 2015 13:56
Show Gist options
  • Save javierarce/8802684 to your computer and use it in GitHub Desktop.
Save javierarce/8802684 to your computer and use it in GitHub Desktop.
timeslider width fix
<!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;
}
#map .cartodb-timeslider .slider-wrapper { width: 235px; }
</style>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.ie.css" />
<![endif]-->
</head>
<body>
<div id="map"></div>
<!-- include cartodb.js library -->
<script src="http://libs.cartocdn.com/cartodb.js/v3/cartodb.js"></script>
<script>
function main() {
cartodb.createVis('map', 'http://datadrivenstory.cartodb.com/api/v2/viz/2e0c9a3a-8d8d-11e3-a73f-0e49973114de/viz.json', {
shareable: false,
title: false,
description: false,
search: false,
tiles_loader: true,
center_lat: 33.95,
center_lon: 44.22,
zoom: 6
})
.done(function(vis, layers) {
})
.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