Skip to main content
100%

topojson.topology + topojson.mesh

✓ Published0🌍 Public
PPhilippe Rivière
Last edited Nov 23, 2016
Created on Nov 15, 2016

This example demonstrates the Aitoff map projection of the United States, drawn on a Canvas element using D3.js. It renders the geographic boundaries as stroked and filled paths, created via `d3.geoPath` with the `d3.geoAitoff` projection. The code first reads a GeoJSON file containing the US shape, converts it to a topology using the `topojson.topology` function from the `unpkg.com/topojson` package, and then draws it with `topojson.mesh` from `d3js.org/topojson.v2`.

AI-generated description

Remember: unpkg.com/topojson@2 is not d3js.org/topojson.v2.js

unpkg.com/topojson@2 is topojson/topojson and converts GeoJSON to topologies.

d3js.org/topojson.v2.js is topojson/topojson-client and knows what to do with topologies.

Built with blockbuilder.org

mit Licensed

Similar vizzes