[ Launch: Tributary inlet ] 4942825 by poezn
-
-
Save poezn/4942825 to your computer and use it in GitHub Desktop.
Tributary inlet
This file contains 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
{"description":"Tributary inlet","endpoint":"","display":"canvas","public":true,"require":[{"name":"topojson","url":"d3js.org/topojson.v0.min.js"},{"name":"topojson","url":"d3js.org/topojson.v0.min.js"}],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"stops.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"routes.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} |
This file contains 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
var projection = d3.geo.equirectangular() | |
.translate([0, 0]) | |
.center([8.35,47.45]) | |
.scale(144372) | |
var c = tb.ctx; | |
c.fillStyle = '#5C5C5C'; | |
var path = d3.geo.path() | |
.projection(projection) | |
.context(c); | |
var topo_s = tb['stops']; | |
var topo_r = tb['routes']; | |
var stops = topojson.object(topo_s, topo_s.objects.stops); | |
var routes = topojson.object(topo_r, topo_r.objects.routes); | |
// background | |
path(stops); | |
c.fill(); | |
path(routes); | |
c.stroke(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment