Skip to content

Instantly share code, notes, and snippets.

View ramiroaznar's full-sized avatar

Ramiro Aznar ramiroaznar

View GitHub Profile
@ramiroaznar
ramiroaznar / index.html
Last active April 6, 2016 16:33
How to make a map of the Antartica
<!DOCTYPE html>
<html>
<head>
<title>How to make a map of the Antartica</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" />
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js"></script>
@ramiroaznar
ramiroaznar / index.html
Last active April 5, 2016 15:30
How to make 3D buildings with CartoCSS
<!DOCTYPE html>
<html>
<head>
<title>How to make 3D buildings with CartoCSS</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" />
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js"></script>
@ramiroaznar
ramiroaznar / index.html
Last active April 5, 2016 14:09
Change background color
<!DOCTYPE html>
<html>
<head>
<title>Change background color</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" />
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js"></script>
@ramiroaznar
ramiroaznar / README.md
Last active April 5, 2016 13:53
How to make a fixed infobox with CartoDB.js

This example wants to show how to display data from a layer into a fixed infobox (or sidebar/sidepanel). Much of the code is based on this Oriol's block.

@ramiroaznar
ramiroaznar / index.html
Last active April 5, 2016 13:39
Points to Line with CartoDB.js
<!DOCTYPE html>
<html>
<head>
<title>Points to Line with CartoDB.js and Leaflet</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" />
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js"></script>
@ramiroaznar
ramiroaznar / index.html
Last active April 5, 2016 14:11
Points to Line with a fake cartodb_id
<!DOCTYPE html>
<html>
<head>
<title>Points to Line with fake cartodb_id</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" />
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js"></script>
@ramiroaznar
ramiroaznar / index.html
Last active April 5, 2016 15:37
Set sublayer options with CartoDB.js
<!DOCTYPE html>
<html>
<head>
<title>Set sublayer options with 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" />
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js"></script>
@ramiroaznar
ramiroaznar / index.html
Last active April 5, 2016 13:09
A simple visualization with CartoDB.js
<!DOCTYPE html>
<html>
<head>
<title>A simple visualization with 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" />
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js"></script>
@ramiroaznar
ramiroaznar / index.html
Last active January 31, 2018 02:11
How to add a GMaps Basemap with CartoDB.js
<!DOCTYPE html>
<html>
<head>
<title>How to add a GMaps Basemap with 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%;
@ramiroaznar
ramiroaznar / README.md
Last active August 16, 2021 17:38
Create layer, add two sublayers and get sublayers

How to use createLayer, add two sublayers and get them as variables for future uses. Click on "Open" and open the Developers Tools Console. It should display two objects for the two layers or CartoDBSubLayers. Based on Oriol's sublayers order cartodb createLayer block.