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 / mapproxy.yaml
Created March 30, 2012 08:55 — forked from nachouve/mapproxy.yaml
Simple proxying of the Spanish PNOA service to get a WMS from their TMS
services:
demo:
kml:
tms:
wmts:
wms:
srs: ['EPSG:900913', 'EPSG:4258']
image_formats: ['image/jpeg', 'image/png']
md:
title: PNOA MapProxy
@jsanz
jsanz / heapify.py
Created October 23, 2012 06:59 — forked from jul/heapify.py
Exact translation of an heap obfuscated algorithm (validating python syntax rules)
"""
A heap is a recipie to represent an array as a
binary tree.
A binary tree is a convenient structure for
manipulating ordered data
Said simply:
we implement a binary tree abstraction on top of an array.
this tree as the following properties:
any child value is smaller than its parent's value
left child is greater than right child.
To read
----------
The moon is a harsh mistress - Robert A. Heinlein
A canticle for Leibowitz - Walter M. Miller
Flowers for Algernon - Daniel Keyes
The Forever War - Joe Haldeman
God is Dead - Ron Currie Jr.
The world without us - Alan Weisman (not really sci fi, but interesting, anyways)
Animal Farm - George Orwell
@jsanz
jsanz / README.md
Last active August 8, 2017 10:44 — forked from jorgeas80/app.css
Displayng a raster stored on CartoDB

This example is based on Jorge Arévalo example but using CartoDB.js entirely to interact with the Maps API.

@jsanz
jsanz / README.md
Last active November 24, 2015 19:27 — forked from andy-esch/README.md
Elections webinar
@jsanz
jsanz / index.html
Last active April 3, 2016 12:10 — forked from ernesmb/index.html
Training: createVis()
<!DOCTYPE html>
<html>
<head>
<title>Training | createVis | CartoDB</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 {
@jsanz
jsanz / index.html
Last active June 22, 2017 13:48 — forked from ernesmb/index.html
Training: createLayer single LayerSourceObject
<!DOCTYPE html>
<html>
<head>
<title>Training | createLayer | 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="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/cartodb.js"></script>
<style>
@jsanz
jsanz / index.html
Last active April 3, 2016 10:26 — forked from ernesmb/index.html
Training: Actions on feature click
<!DOCTYPE html>
<html>
<head>
<title>Training | feature Click | 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="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/cartodb.js"></script>
<style>
@jsanz
jsanz / index.html
Last active April 3, 2016 12:09 — forked from ernesmb/index.html
Training: changing SQL query and CartoCSS
<!DOCTYPE html>
<html>
<head>
<title>Training | change SQL and CartoCSS | 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="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/cartodb.js"></script>
@jsanz
jsanz / app.js
Last active November 6, 2017 10:08 — forked from rochoa/app.js
Basic CARTO viewer
'use strict';
var DEFAULTS = {
endpoint: 'http://jsanz.cartodb.com/api/v1/map',
sql: 'select * from ne_10m_populated_places_simple',
cartocss: [
"#layer['mapnik::geometry_type'=1] {",
" marker-width: 7;",
" marker-fill: #EE4D5A;",
" marker-fill-opacity: 0.9;",