-
-
Save brianengel/3834500 to your computer and use it in GitHub Desktop.
just another inlet to tributary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":789,"height":477,"hide":false},"endpoint":"tributary","public":true,"editor_json0":{"vim":false,"emacs":false,"width":600,"height":300,"hide":true}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var countries = tributary.worldcountries; | |
var svg = d3.select("svg"); | |
var projection = d3.geo.azimuthal() | |
.scale(539) | |
.origin([-70,20]) | |
.translate([579,513]); | |
var geopath = d3.geo.path().projection(projection); | |
var circle = d3.geo.circle().origin(projection.origin()); | |
svg.selectAll("path") | |
.data(countries.features) | |
.enter() | |
.append("path") | |
.attr( { | |
d : function(d) { console.log(d);return geopath(circle.clip(d)); } | |
}); | |
svg.append("circle") | |
.attr({ | |
fill: "#f00", | |
r: 4, | |
transform: function() { | |
var coords = projection([ -77.750, 41.339]); | |
return "translate(" + coords + ")"; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment