Skip to main content
100%

Map Pan / Zoom with Cities v5

✓ Published0🌍 Public
Dd3noob
Last edited Dec 2, 2019
Created on Dec 2, 2019

This map example displays world country boundaries and major global cities, with interactive pan and zoom functionality centered on the Pacific Ocean. The visualization uses d3.geoMercator for projection and d3.geoPath to render geographic features from a TopoJSON world file. City locations from a CSV dataset are plotted as red circles, each hyperlinked to a Google search. Users can apply d3.zoom with a scale extent of 1 to 8, transforming both paths and circles accordingly. The map is rendered as SVG elements within a d3 selection.

AI-generated description

This is a simple map example with pan and zoom centered on the Pacific.

This graph is part of the code samples for the update to the book D3 Tips and Tricks to version 5 of d3.js.

forked from <a href='http://bl.ocks.org/d3noob/'>d3noob</a>'s block: <a href='http://bl.ocks.org/d3noob/e549dc220052ac8214b9db6ce47d2a61'>Map Pan / Zoom with Cities v5</a>

mit Licensed

Similar vizzes