Map Zooming II
Moving the mouse across the map smoothly interpolates a zoom between San Francisco and New York. The visualization renders United States state boundaries as a canvas-drawn mesh using d3.geo.path with a custom projection that applies dynamic simplification and clipping during the zoom. It uses d3.interpolateZoom, d3.geo.transform, and d3.geo.clipExtent to control the transition, adjusting the scale and translate values based on the pointer's horizontal position. The underlying TopoJSON data is pre-simplified with topojson.presimplify, and the rendering occurs entirely through the Canvas 2D API.
AI-generated descriptionThis variation of the map zooming example uses interaction to control a smooth zooming interpolator. Mouse over the map to zoom between San Francisco and New York.