Skip to content

Instantly share code, notes, and snippets.

View monsieurBelbo's full-sized avatar

Gonzalo Bellver monsieurBelbo

  • Antena
  • Buenos Aires, Argentina
View GitHub Profile
@monsieurBelbo
monsieurBelbo / caba.json
Last active March 31, 2017 10:48
Calculate area of clipped Voronoi region
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@monsieurBelbo
monsieurBelbo / voronoi_area_caba.json
Created May 19, 2014 14:09
Calculate clipped Voronoi region's area
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@monsieurBelbo
monsieurBelbo / README.md
Last active December 14, 2015 05:09
Zoomable map problem

The Issue

I'm trying to build a map that can be zoomed using the mouse wheel and panned with drag. For that I'm using d3.behavior.zoom() and it works fine for the map. However, I also need to mark some points in the map (which are included in the same topojson used to draw the map). They get rendered just fine, but I'm having trouble handling the zoom behaviour with these points. If you try to zoom or pan, the points get translated abruptly and even seem to change their path!

Any ideas?

@monsieurBelbo
monsieurBelbo / provinceMap.js
Created February 25, 2013 20:19
Multiple path zooming
(function() {
provinceMap = {};
var map, path, projection, zoom;
var width=280, height=300;
var colorGorup = "Blues";
var legend;
provinceMap.init = function() {
this.drawLegend();