Skip to main content
100%

Map Pan & Zoom I

✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Jul 7, 2014

A black-and-white world map renders on a light gray background using the Mercator projection. This example demonstrates map panning and zooming through the `d3.behavior.zoom` API, which applies SVG transforms to a group containing the geographic paths. The map is built from TopoJSON world data with `d3.geo.path`, and the zoom scale is limited to 1–8×. A transparent overlay rect captures pointer events, enabling the interactive behavior.

AI-generated description

This example uses d3.behavior.zoom with SVG transforms for map panning and zooming.

gpl-3.0 Licensed

Similar vizzes