Skip to main content
100%

simple map interactions

✓ Published1🌍 Public
AAndrew Fletcher
Last edited Jan 18, 2020
Created on Jan 15, 2020
Forked from itsa map!

This example shows an interactive world map rendered as SVG, where each country displays its name as a tooltip on hover and the entire map can be panned and zoomed. It uses D3 v5’s `geoNaturalEarth1` projection with `geoPath` to draw country boundaries from TopoJSON data loaded from the world-atlas package, and country names are matched from a TSV file via ISO numeric codes. The zoom behavior is implemented with `d3.zoom`, applying the current transform to a group element, while CSS hover styles highlight countries and a sky-blue sphere path forms the ocean background.

AI-generated description
MIT Licensed

Similar vizzes