Created
December 3, 2013 20:21
-
-
Save repustate/7776853 to your computer and use it in GitHub Desktop.
We need to project our map data as well as scaling and centering it so it fits in our viewport.
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
// Values to centre and scale the map of Toronto. | |
var x = -14100 | |
var y = 7300 | |
var scale = 66700 | |
// Define map projection. | |
projection = d3.geo.albers().translate([x, y]).scale([scale]) | |
// Define path generator. | |
var path = d3.geo.path().projection(projection); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment