Skip to main content
100%

World Map Centered v6

✓ Published0🌍 Public
Dd3noob
Last edited Sep 13, 2020
Created on Sep 13, 2020

A world map centered on the Pacific Ocean is rendered as grey SVG paths with white borders, using a Mercator projection configured with `d3.geoMercator`, a `center` of [0, 5], and a `rotate` of [-180, 0]. The map displays country boundaries from the TopoJSON file `world-110m2.json`, which is loaded via `d3.json` and converted to GeoJSON features using `topojson.feature`. The code relies on `d3.geoPath` to project and draw each country onto the SVG canvas.

AI-generated description

This is a simple map example centered on the Pacific.

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

mit Licensed

Similar vizzes