Skip to content

Instantly share code, notes, and snippets.

Javier Álvarez Medina xavijam

Block or report user

Report or block xavijam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xavijam
xavijam / .block
Last active Nov 20, 2017
My first CARTO.js map
View .block
license: mit
border: no
scrolling: yes
View gist:b026c8c50acfab4c8b56
csscomb: {
"always-semicolon": true,
"color-case": "upper",
"block-indent": " ",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": false,
"leading-zero": true,
"quotes": "single",
"space-before-colon": "",
@xavijam
xavijam / index.html
Last active Aug 29, 2015
Adding a tooltip to a layer
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Leaflet 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, .map_wrapper {
position: relative;
@xavijam
xavijam / index.html
Created May 21, 2015
Add tooltip to a visualization
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Create tooltip · 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%;
@xavijam
xavijam / index.html
Last active Aug 29, 2015
Displaying infowindow when ajax request is done
View index.html
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="http://libs.cartodb.com/cartodb.js/v3/3.11/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.11/cartodb.js"></script>
<style type="text/css">
html, body, #map {
height:100%;
@xavijam
xavijam / torque_agg.js
Last active Aug 29, 2015 — forked from javisantana/torque_agg.js
Torque aggregation function.
View torque_agg.js
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 Jun 22, 2016
Close infowindow programatically
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Close infowindow programatically | 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%;
@xavijam
xavijam / index.html
Created Oct 14, 2014
Change layer properties from an infowindow link
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Change layer things from infowindow links | 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%; padding: 0; margin: 0; }
</style>
@xavijam
xavijam / index.html
Created Oct 14, 2014
Open an infowindow programatically
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Open infowindow programatically | 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%;
@xavijam
xavijam / index.html
Created Sep 10, 2014
Changing infowindow offset with CartoDB.js
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Custom infowindow 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%; padding: 0; margin: 0 }</style>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" />
You can’t perform that action at this time.