TopoJSON Layers
✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Jun 4, 2013
This example animates the four layers of a U.S. TopoJSON map—a glowing land silhouette, a solid land fill, county boundaries, and state boundaries—by fading each SVG layer in and out in sequence. Using d3.geo.path with the Albers USA projection, the code fetches US GeoJSON data via d3.json and converts it with topojson.feature and topojson.mesh to render the paths. Each layer is styled with distinct SVG filters and strokes, and the cyclic animation is driven by chained transitions on the opacity property.
AI-generated descriptionAdding a little animation to the U.S. TopoJSON example to illustrate the different layers.
gpl-3.0 Licensed