Skip to main content
100%

Cheap tricks for interactive maps

✓ Published2🌍 Public
BB Sundaresan
Last edited Jul 13, 2020
Created on Jul 13, 2020

This example demonstrates interactive zoom and pan on a world map rendered with SVG. It uses the Natural Earth projection via d3.geoNaturalEarth1 and d3.geoPath to draw country boundaries and a blue sphere background. The map loads GeoJSON data from the world-atlas TopoJSON file on CDN, with country names supplied by the data’s properties. Hovering changes country fill color via CSS, while d3.zoom applies event-driven transforms to the map group. The visualization relies on D3 v5 and TopoJSON client libraries.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes