Skip to content

Commit

Permalink
Merge pull request markmarkoh#227 from arshad/add-center-to-example
Browse files Browse the repository at this point in the history
Add center to custom maps example
  • Loading branch information
markmarkoh committed Sep 17, 2015
2 parents db310a7 + 38a47a3 commit 3b9676d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ A map of the USA with an Albers based projection will be default if you only inc
setProjection: function(element, options) {
var projection, path;
projection = d3.geo.albersUsa()
.center([long, lat])
.scale(element.offsetWidth)
.translate([element.offsetWidth / 2, element.offsetHeight / 2]);
}
Expand Down

0 comments on commit 3b9676d

Please sign in to comment.