Skip to content

Instantly share code, notes, and snippets.

@HoffmannP
Created December 21, 2015 14:46
Show Gist options
  • Save HoffmannP/f8d07cf02b5687668116 to your computer and use it in GitHub Desktop.
Save HoffmannP/f8d07cf02b5687668116 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<style>
/* CSS goes here */
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="//d3js.org/topojson.v1.min.js"></script>
<script>
var width = 960;
var height = 1160;
var svg = d3.select('body').append('svg')
.attr('width', width)
.attr('height', height);
d3.json('thKreise.json', function (error, th) {
if (error) {
return console.error(error);
}
svg.append("path")
.datum(topojson.feature(th, th.objects.kreiseTh))
.attr("d", d3.geo.path().projection(d3.geo.mercator()));
});
</script>
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment