Home Rolling pan and zoom with D3 Mercator projection
Post
Cancel

Rolling pan and zoom with D3 Mercator projection

An example illustrating zoom and pan with a “rolling” Mercator projection in D3. Drag left-right to rotate projection cylinder, and up-down to translate, clamped by max absolute latitude. Ensures projection always fits properly in viewbox.

This was originally a gist hosted at bl.ocks.org, which seems dead now. This clone might still work.

This post is licensed under CC BY 4.0 by the author.