CHAPTER 10Lines, Lengths, and Areas

All of the projects we've presented have dealt with map markers as either individual entities or as related clusters. In this chapter, we'll demonstrate some of the other ways that groups of points may be interpreted and presented.

A group of points is just that: a group of points. But a string of points in sequence may represent a line or a path, which has the calculable property of length. Once the points form a closed loop, they may be treated as the outline of a region having area. Using the appropriate formulas, you can compute these distance and area values for your map projects.

The Google Maps 2.0 API includes some of this functionality, but remember that you may need to perform these kinds of calculations ...

Get Beginning Google Maps Applications with Rails and Ajax: From Novice to Professional now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.