Permalink
Browse files

initial sync

  • Loading branch information...
1 parent 34918fe commit 7ff55c345904310244a4bf2e26bda5e0579d23ad dwtkns committed Nov 1, 2012
Showing with 86 additions and 0 deletions.
  1. +86 −0 index.html
  2. BIN thumbnail.png
View
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<style>
+
+.background {
+ fill: #a4bac7;
+}
+
+.foreground {
+ fill: none;
+ stroke: #333;
+ stroke-width: 1.5px;
+}
+
+.graticule {
+ fill: none;
+ stroke: #fff;
+ stroke-width: .5px;
+}
+
+.graticule:nth-child(2n) {
+ stroke-dasharray: 2,2;
+}
+
+.land {
+ fill: #d7c7ad;
+ stroke: #766951;
+}
+
+.boundary {
+ fill: none;
+ stroke: #a5967e;
+}
+
+</style>
+<body>
+<script src="http://d3js.org/d3.v3.min.js"></script>
+<script src="https://raw.github.com/d3/d3-plugins/master/geo/projection/projection.js"></script>
+<script>
+
+var width = 960,
+ height = 500;
+
+var projection = d3.geo.hammer()
+ .translate([width / 2 - .5, height / 2 - .5]);
+
+var path = d3.geo.path()
+ .projection(projection);
+
+var graticule = d3.geo.graticule();
+
+var svg = d3.select("body").append("svg")
+ .attr("width", width)
+ .attr("height", height);
+
+svg.append("path")
+ .datum(graticule.outline)
+ .attr("class", "background")
+ .attr("d", path);
+
+svg.selectAll(".graticule")
+ .data(graticule.lines)
+ .enter().append("path")
+ .attr("class", "graticule")
+ .attr("d", path);
+
+svg.append("path")
+ .datum(graticule.outline)
+ .attr("class", "foreground")
+ .attr("d", path);
+
+d3.json("/d/3682676/readme-boundaries.json", function(error, collection) {
+ svg.insert("path", ".graticule")
+ .datum(collection)
+ .attr("class", "boundary")
+ .attr("d", path);
+});
+
+d3.json("/d/3682676/readme-land.json", function(error, collection) {
+ svg.insert("path", ".graticule,.boundary")
+ .datum(collection)
+ .attr("class", "land")
+ .attr("d", path);
+});
+
+</script>
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7ff55c3

Please sign in to comment.