Accepted answer

I ended up working on the same problem. Here's an example (see code) where you pan left/right to rotate the projection (with wraparound), and up/down to translate (clamped by max absolute latitude), with zoom as well. Ensures that projection always fits within viewbox.

I learned a lot about zoom behavior, and projection center() and rotate() interaction.


Google maps on apple products work like this. Scrol left, and you will leave one Australia, then find another and another and another


hope this code can solve your problem

    var projection = d3.geo.equirectangular()
    .center([0, 5])
    .translate([width / 2, height / 2])
    .rotate([0, 0])

Related Query

More Query from same tag