Adrià Mercader

OpenLayers Cookbook review

October 29, 2012 | Archive

I finally managed to set aside some time to read OpenLayers Cookbook, written by Antonio Santiago. Antonio is a great developer (you should definitely check his blog for some cool spatial development stuff) and a really nice guy, so I was looking forward to see how the book had turned up.

OpenLayers Cookbook

As the rest of the Packt Cookbook series, the book is based on increasingly complex small code “recipes” that focus on a particular aspect of OpenLayers development. The recipes are grouped in thematic chapters, starting with the Web Mapping Basics, which covers topics like base layers and overlays, map controls and extent.

Next chapters are related with Raster and Vector layers, showing some examples on how to load different layer types and data formats, and exploring concepts like Protocols and Strategies, which can be sometimes tricky for new users.

The book moves onto Events (how to listen to map, feature and DOM events) and Controls. The Controls chapter gives a really good overview on how to add them to the map and configure them to interact with the map and layers.

Next comes the Theming chapter, which goes as far as OpenLayers will allow you to change its default looks. The next one, Styling Features is particularly comprehensive and covers all aspects of working with vector features with really nice examples, one of the points were OpenLayers is really powerful.

The last chapter, Beyond the Basics, explores more complex stuff with a couple of nice examples of more advanced uses of OpenLayers. Creating custom controls is particularly useful once you start working on big OpenLayers based applications. Some of the other recipes are perhaps a bit specific but give a good introduction to some useful OpenLayers features.

In conclusion, the book is very comprehensive and well written, and a lot of effort has obviously gone into it. All the recipes are included as web examples that can be downloaded from the publisher’s web and opened in a browser. Antonio is clearly an expert on the field and this shows on the code and the explanations around it. The book is more orientated to novice and beginner users, and more experienced OpenLayers developers will probably skim through some of the recipes. All in all, a great book for your first dive into OpenLayers.

OpenLayers Cookbook