Map Pan and Zoom v7
✓ Published0🌍 Public
Dd3noob
Last edited Jun 19, 2021
Created on Jun 19, 2021
This example displays a world map centered on the Pacific Ocean, rendered as SVG paths filled in grey with white borders. Using the d3.geoMercator projection and d3.geoPath, it draws country boundaries from a TopoJSON file loaded via d3.json. The d3.zoom module provides interactive pan and zoom controls, applying the resulting transform directly to the map’s path elements within a scale extent of 1 to 8.
AI-generated descriptionThis 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 7 of d3.js.
mit Licensed