[ Launch: Tributary inlet ] 6496726 by roundrobin
-
-
Save roundrobin/6496726 to your computer and use it in GitHub Desktop.
World map
This file contains 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
{"description":"World map","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"test.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/67UkJoA.png"} |
This file contains 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 width = 600; | |
var height= 400; | |
g.append("rect") | |
.attr({ | |
width: width, | |
height: height, | |
fill: "green", | |
"opacity" : 0.1 | |
}); | |
var feature = g.append("g") | |
.attr("class","world-map") | |
.attr('height',height) | |
.attr('width', width); | |
var projection = d3.geo.mercator() | |
.scale((width + 1) / 1.0496) | |
.translate([width / 0.32, height / 0.24]) | |
.precision(.9); | |
var path = d3.geo.path() | |
.projection(projection); | |
collection = tributary.test; | |
feature.selectAll(".path") | |
.data(collection.features) | |
.enter() | |
.append("path") | |
.attr("fill",'#AA2A2A') | |
.attr("d", path); | |
feature = g.select(".world-map").attr("transform","scale(0.15)"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment