Let's make a map - interactions!
✓ Published1🌍 Public
This example demonstrates interactive pan and zoom on a natural Earth projection map of world countries. Users can drag to pan and scroll to zoom, with the map updating smoothly through D3’s zoom behavior. The visualization renders country boundaries from the world-atlas TopoJSON dataset, using d3.geoPath and d3.geoNaturalEarth1 to project the geometry into SVG paths. Hovering highlights a country in red, and the map includes a blue sphere background. The code relies on d3.json for data loading and topojson.feature for converting TopoJSON to GeoJSON.
AI-generated descriptionMIT Licensed