forked from mbostock's block: Mercator Projection
xxxxxxxxxx
<meta charset="utf-8">
<title>Mercator Projection</title>
<style>
path {
fill: #ccc;
stroke: #fff;
}
</style>
<svg width="960" height="500"></svg>
<script src="//d3js.org/d3.v3.min.js"></script>
<script>
var projection = d3.geo.mercator();
var path = d3.geo.path()
.projection(projection);
var svg = d3.select("svg");
d3.json("https://gist.githubusercontent.com/GitNoise/a849b7cd1c15350560b93ce8752be363/raw/967b0e3d561653d8e4419d84562a9784d411bae7/output.json", function(error, collection) {
if (error) throw error;
console.log(collection.objects.alla_lan.geometries);
svg.selectAll("path")
.data(collection.objects.alla_lan.geometries.filter(function(d) {
return d.type
}))
.enter().append("path")
.attr("d", path);
});
</script>
https://d3js.org/d3.v3.min.js