Skip to content

Instantly share code, notes, and snippets.

View xavijam's full-sized avatar

Javier Álvarez Medina xavijam

View GitHub Profile
@xavijam
xavijam / torque_agg.js
Last active August 29, 2015 14:10 — forked from javisantana/torque_agg.js
Torque aggregation function.
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) {
@xavijam
xavijam / index.html
Last active August 29, 2015 13:59 — forked from javisantana/index.html
Big CartoDB infowindow with only CSS
<!DOCTYPE html>
<html>
<head>
<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%;
padding: 0;
@xavijam
xavijam / index.html
Created February 28, 2014 11:03 — forked from javisantana/index.html
Add an Infowindow to a CartoDB layer (using createLayer).
<!DOCTYPE html>
<html>
<head>
<title>Leaflet multilayer 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%;