Skip to content

Instantly share code, notes, and snippets.

View hollasch's full-sized avatar

Steve Hollasch hollasch

View GitHub Profile
@hollasch
hollasch / README.md
Last active August 12, 2016 23:59 — forked from patricksurry/README.md
World Map with Zoom and Continuous Horizontal Pan

This gist illustrates a world map with zoom and continuous (infinite) horizontal panning. Dragging left/right rotates the projection cylinder, and dragging up/down translates the projection accordingly (clamped by latitude bounds).

The viewbox is the full width of the page.

This example still has an annoying issue with zooms. In my ideal world, the map should zoom centered on the cursor location. Unfortunately, the map just changes scale centered on the equator and the longitude at the center of the viewport. I haven't yet been able to find a way to make this work