Skip to content

Instantly share code, notes, and snippets.

@poezn
Created February 19, 2013 08:01
Show Gist options
  • Save poezn/4983896 to your computer and use it in GitHub Desktop.
Save poezn/4983896 to your computer and use it in GitHub Desktop.
White world map
{"description":"White world map","endpoint":"","display":"svg","public":true,"require":[{"name":"heatmap.js","url":"https://raw.github.com/pa7/heatmap.js/master/src/heatmap.js"},{"name":"TopoJSON","url":"http://d3js.org/topojson.v0.min.js"},{"name":"TopoJSON","url":"http://d3js.org/topojson.v0.min.js"}],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"stations.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},"countries.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"data.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01}
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
var projection = d3.geo.equirectangular()
.scale(143)
var path = d3.geo.path()
.projection(projection);
var world = tb['countries'];
var countries = topojson.object(world, world.objects.land);
console.log(countries)
g.selectAll('path.country')
.data([countries])
.enter().append('path')
.attr({
d: function(d, i) { return path(d) },
})
.style({
fill: '#FFFFFF'
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment