Skip to content

Instantly share code, notes, and snippets.

@purplesrl
Created January 26, 2018 21:05
Show Gist options
  • Save purplesrl/a362d8fe4ab9b39db90a0de428da5d2c to your computer and use it in GitHub Desktop.
Save purplesrl/a362d8fe4ab9b39db90a0de428da5d2c to your computer and use it in GitHub Desktop.
var projection = d3.geo.albers()
.center([3.582022, 40.9582426])
.rotate([350, 0])
.parallels([35, 45])
.scale(scale)
.translate([width / 2, height / 2]);
var path = d3.geo.path().projection(projection);
var svg = d3.select("heramap").append("svg")
.style("border", "1px solid black")
.attr("width", "100%")
.attr("height", "99%");
Map from:
http://bl.ocks.org/LuisSevillano/b51c795f7d68aedfb24485fbdb570c3c
http://bl.ocks.org/LuisSevillano/raw/b51c795f7d68aedfb24485fbdb570c3c/italy.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment