OpenLayers 2.10 Beginner's Guide by Erik Hazzard is a good overview and reference of the OpenLayers open source library. The book provides a much-needed complement to the reference material and sample code available on the the OpenLayers website.
This review is of the electronic edition viewed using the iBook reader on an Apple iPad device. The electronic edition can be downloaded in PDF and ePub formats, and can be purchased directly from Packt. It can also be purchased as a traditional softback book.
an API reference and many samples. The samples can be easily copies, but they only go so far. There has been a need for a book that explains how and why certain methods and properties work, to fill in the gaps, and to go
beyond the coverage of the samples (eg. with coverage of Strategies and Rules). This is that book.
The book is written as a tutorial but also includes API reference material. The author does a good job of blending these two approaches. Each section of discussion and reference text is followed by "Time for action" (implementation example), "What just happened?" (explanation), and "Have a go hero" (exercise suggestions for modifying the code). Although I'm not sure about the "Have a go hero" moniker, the full package generally works well.
Introductory chapters include an overview of what OpenLayers is (and is not), Object Oriented Programming (OOP), and Firebug. The OOP section is generally too basic and even uses a "MadLibs" game as a very basic example. If a reader needs such a simplistic explanation of objects, classes, and OOP; then they should be reading an "object oriented programming for beginners" book, and not an applied toolkit book.
Other subjects covered include:
- Third Party APIs (Google Maps, Yahoo, Bing)
- Controls, Panels, Events
- Styling Controls and CSS
- The Map Class
- Vector Layers: Strategies, Formats, Styles
- A final "putting it all together" web map application
Considering that the bulk of the text concentrates one small areas at a time, the final "Making Web Map Apps" chapter is a welcome addition that pulls everything together into one working application.
Formatting and layout are generally good. I did see quite a few typos but I did not spot any serious ones. However, it is a little alarming to see a sub-header entitled "Time for Action - using Goole Maps V3"!
The ePub format had quite a few formatting errors. The errors are not present in the PDF version, so the problem lies with either the ePub format and/or the iPad iBook application. I would recommend that purchases of the electronic edition download the PDF format for now. These errors take two forms and both are found throughout the book. First, all numbered lists have a pair of numbers. Sometimes they are different. It would appear the format includes a "numbered list" structure (cf. HTML) which duplicates numbers and shows broken list errors which are invisible in the PDF and print editions. The second error is more serious: Many of the API tables are badly formatted resulting in words being written on top of one another. Here is an example:
Despite these problems (which only appear in one electronic format, and possibly only on one device type), this book is recommended for all developers using or wishing to use OpenLayers. As well as filling in gaps with the more basic functionality, it will also demonstrate how to use the more sophisticated OpenLayers features.