Maps can contain a lot of information, much more than a viewer can grasp. If you fill a map with all the information you have, it becomes unreadable. Web-based maps should be interactive. A typical viewer expects to zoom in for details, zoom out for context, and pan when necessary. At the beginning of this chapter we added simple SVG zooming and panning to a map with the d3.zoom() behavior and SVG transforms. In this section we will explore other techniques that take advantage of the three-dimensional nature of maps to achieve the best zooming and panning experience.
Zooming, brushing and rotating
Brushing, or zoom to bounding box
One way to zoom in to an area in a map is to draw a box, clip the box and expand it so that it...