Skip to content

Instantly share code, notes, and snippets.

@PatMartin PatMartin/_.md
Created Feb 27, 2013

Embed
What would you like to do?
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}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
var projections =
[
d3.geo.mercator(),
d3.geo.orthographic(),
d3.geo.albersUsa(),
d3.geo.azimuthalEqualArea(),
d3.geo.azimuthalEquidistant(),
d3.geo.equirectangular(),
d3.geo.gnomonic(),
d3.geo.stereographic(),
d3.geo.albers.raw(),
d3.geo.azimuthalEqualArea.raw(),
d3.geo.azimuthalEquidistant.raw(),
d3.geo.equirectangular.raw(),
d3.geo.gnomonic.raw (),
d3.geo.mercator.raw(),
d3.geo.orthographic.raw(),
d3.geo.stereographic.raw()
];
var projection = projections[1]
.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
You can’t perform that action at this time.