Skip to main content
100%

Stretched Projection

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

A custom D3 v3 geo projection stretches the equirectangular world map to fill a 960×500 viewport. The code defines a cylindrical projection function using `d3.geo.projection` to scale latitude coordinates proportionally to the viewport’s aspect ratio, then renders land and country borders with `d3.geo.path` and TopoJSON data. SVG paths display the stretched map with gray land and white country boundaries.

AI-generated description

Using d3.geo.projection to create a custom stretched projection to fill a viewport. In this case, the equirectangular projection is stretched to fit a 960×500 viewport.

gpl-3.0 Licensed

Similar vizzes