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 12, 2016 14:44
Add Simple Geometries with Leaflet
<html>
<head>
<title>Add Simple Geometries with Leaflet</title>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
<style type="text/css">
html, body, #map{
height: 100%;
padding: 0;
@ramiroaznar
ramiroaznar / index.html
Last active April 12, 2016 14:57
How to add a Singapore basemap in Leaflet
<!DOCTYPE html>
<html>
<head>
<title>How to add a Singapore basemap in 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 / README.md
Last active April 12, 2016 15:01
Reset Zoom Buttom with CartoDB.js

Drag the map to other location or zoom in or out with your mouse scrollroll. Then click on the "Reset zoom" bottom to come back to the original view.

@ramiroaznar
ramiroaznar / index.html
Last active April 13, 2016 08:46
CreateVis with customized options
<!DOCTYPE html>
<html>
<head>
<title>CreateVis with customized options</title>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<style>
html, body, #map {
height: 100%;
@ramiroaznar
ramiroaznar / index.html
Last active April 13, 2016 14:54
How to get your Labels to stand out with CartoDB.js
<!DOCTYPE html>
<html>
<head>
<title>How to get your Labels to stand out 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" />
<style>
html, body, #map {
@ramiroaznar
ramiroaznar / README.md
Last active April 13, 2016 14:57
CartoDB.js: Remove layer from GMaps

On this example we add and remove a layer from a Google Maps Instance.

The thing is you need to explicitely disable the interaction and then execute the off() method in order to completely detach the layer from the map object, otherwise events will still be triggered and you'll have more than one infowindows and several log lines on the console.

via @jsanz

@ramiroaznar
ramiroaznar / README.md
Last active April 13, 2016 15:01
Sentiment torque visualization

To know more about how to make animated torque visualizations using CartoDB.js click here.

@ramiroaznar
ramiroaznar / README.md
Last active April 13, 2016 15:03
Category torque visualization

To know more about how to make animated torque visualizations using CartoDB.js click here.

@ramiroaznar
ramiroaznar / README.md
Last active April 13, 2016 15:06
a bootstrap template made by the cartodb-generator
@ramiroaznar
ramiroaznar / README.md
Last active April 13, 2016 15:08
a simple template made by the cartodb-generator