I created a simple worldmap with d3 as you can see here: http://bl.ocks.org/wiesson/ef18dba71256d526eb42
Is there a simple way to shift the small part of russia (as illustrated in the picture) to the right, without creating a new topojson? If not, any other idea?
Okay, the answer was straightforward. As explained in the api docs, the method rotate can turn the map.
So, rotate([-11, 0])
"rotated" the map in the position I was looking for.
var projection = d3.geo.mercator().scale(width / 2 / Math.PI)
.rotate([-11, 0])
.translate([(width) / 2, height * 1.35 / 2])
.precision(.1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With