Instantly share code, notes, and snippets.

View .block
license: mit
border: no
scrolling: yes
View gist:b026c8c50acfab4c8b56
csscomb: {
"always-semicolon": true,
"color-case": "upper",
"block-indent": " ",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": false,
"leading-zero": true,
"quotes": "single",
"space-before-colon": "",
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Leaflet 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, .map_wrapper {
position: relative;
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Create tooltip · 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%;
View index.html
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="http://libs.cartodb.com/cartodb.js/v3/3.11/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.11/cartodb.js"></script>
<style type="text/css">
html, body, #map {
height:100%;
View torque_agg.js
torque.providers.windshaft.prototype.aggregateByKey = function(callback) {
var url = this.templateUrl
.replace('{x}', 0)
.replace('{y}', 0)
.replace('{z}', 0)
.replace('{s}', 0)
var self = this;
var extra = this._extraParams();
torque.net.get( url, function (data) {
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Close infowindow programatically | 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%;
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Change layer things from infowindow links | 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>
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Open infowindow programatically | 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%;
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Custom infowindow 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/themes/css/cartodb.css" />