Created
January 31, 2018 23:06
-
-
Save logicfox/a9135ae3aa6bc1202cea88a0de4f1c35 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <!DOCTYPE html> | |
| <canvas width="960" height="500"></canvas> | |
| <script src="https://d3js.org/d3.v4.min.js"></script> | |
| <script src="https://unpkg.com/topojson-client@3"></script> | |
| <script> | |
| var context = d3.select("canvas").node().getContext("2d"), | |
| path = d3.geoPath(d3.geoOrthographic(), context); | |
| d3.json("https://unpkg.com/world-atlas@1/world/110m.json", function(error, world) { | |
| if (error) throw error; | |
| context.beginPath(); | |
| path(topojson.mesh(world)); | |
| context.stroke(); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment