This Gist is meant to be viewed on bl.ocks.org. Check out the full project on GitHub.
This is a little example to experiment with high-performance interactive maps. Mike Bostock has several examples of using dynamic simplification with maps, but I needed to expand on them in a few ways:
- I want to change the projections on the fly, so I wanted to avoid baking a projection into my data.
- I need to project the entire world instead of just one country or region.
- When zooming in on an area, I wanted to avoid projecting unnecessary data. (E.g. countries outside the viewport.)
This example does all of those things. Here's an overview: