Skip to content

Instantly share code, notes, and snippets.

View jsanz's full-sized avatar
🗺️
Mapping

Jorge Sanz jsanz

🗺️
Mapping
View GitHub Profile
@jsanz
jsanz / README.md
Last active June 6, 2016 19:38
OSM no es un mapa, es una base de datos
@jsanz
jsanz / index.html
Created June 24, 2015 08:50
Basemap covering google maps
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Ejemplo</title>
<style>
html, body, #map {
height: 100%;
padding: 0;
margin: 0;
@jsanz
jsanz / index.html
Last active August 29, 2015 14:23
CartoDB.js: when the url of a vizjson fails
<!DOCTYPE html>
<html>
<head>
<title>Mapas</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<style>
html {
height: 100%;
}
@jsanz
jsanz / index.html
Last active August 29, 2015 14:24
FOSS4G Odissey (WIP)
<!doctype><html><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Odyssey.js Slides</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="http://cartodb.github.io/odyssey.js/sandbox/favicon.png">
<link rel="icon" type="image/png" href="http://cartodb.github.io/odyssey.js/sandbox/favicon.png">
@jsanz
jsanz / index.html
Created July 6, 2015 20:04
CartoDB.js Example: BiciMAD
<html>
<head>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<style>
html, body {width:100%; height:100%; padding: 0; margin: 0;}
#map { width: 100%; height:100%; background: black;}
#menu { position: absolute; top: 5px; right: 10px; width: 115px; height:60px; background: transparent; z-index:10;}
#menu a {
margin: 10px 5px 0 0;
float: right;
@jsanz
jsanz / index.html
Created July 10, 2015 18:52
Flickr album on Odissey
<!doctype><html><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Odyssey.js Slides</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="http://cartodb.github.io/odyssey.js/sandbox/favicon.png">
<link rel="icon" type="image/png" href="http://cartodb.github.io/odyssey.js/sandbox/favicon.png">
@jsanz
jsanz / index.html
Last active August 29, 2015 14:27
CartoDB.JS: Error on IE9
<!DOCTYPE html>
<html>
<head>
<title>Named Map with Interactivity | 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%;
@jsanz
jsanz / README.md
Last active November 27, 2015 08:48
CartoDB.js: Custom infowindow

Example derived from the official demo but disabling the sanitization of the infowindow to allow custom uris to the Spotify app.

If you visit the original visualization the infowindow header is orange and the uri is sanitized and it doesn't work, but if you visit this page the infowindow is replaced by a new one with an orange header and the uris are not sanitized and work.

@jsanz
jsanz / README.md
Last active November 19, 2018 09:33
14.000km to Dubai

14.0000km to Dubai

This SQL is an experiment to play with Postgis ST_LineInterpolatePoint function and other SQL tricks to generate a points dataset that travels from a starting point in Dubai to several cities all over the world and under a distance similar the coverage of a long distance flight (between 14 an 15 thousand kilometres).

This SQL is the main part of this CartoDB Visualization.

1000km to Dubai

The SQL is separated in several dataset constructions using the WITHclause so the approach is:

@jsanz
jsanz / index.html
Created August 25, 2015 17:18
CartoDB.js: create two sublayers from one input
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.14/themes/css/cartodb.css" />
<style>