This is the code for Chapter 7, Figure 20 from D3.js in Action that demonstrates how to use d3.geo.tile() to create maps using terrain tiles.