Online Book Reader

Home Category

Mapping With Drupal - Alan Palazzolo [52]

By Root 492 0
fast and have a small file size. The code is object-oriented, an architecture that is used to make the code modular and extensible. If you are interested in making open source maps that are fast and work well on mobile browsers, this is a project to work with.

The options for spatial data storage are improving, both in Drupal and in other open source projects. Some of the challenges and solutions were discussed in Databases. A couple of Drupal modules, PostGIS and GeoServer, are worth watching if you are working with especially vast databases and are attracted by the idea of integrating spatial databases into Drupal.

Another interesting development is integrating Apache Solr search for spatial data into Drupal. Solr is a fast open source search platform written in the Java programming language. It is much faster than searching using database queries, which is how search is done by default in Drupal. As well as geospatial search, Solr allows search results to be sortable and handles faceted search (navigating search results by multiple filters, such as showing only restaurants that serve brunch and are wheelchair-accessible). The Apache Solr module integrates Solr with Drupal, but it does require you to run Java on your web server in addition to PHP. The OpenLayers Apache Solr module then integrates many of the modules mentioned earlier in this book (Geofield, Geocoder, and OpenLayers) with LocalSolr. The OpenLayers Apache Solr module provides a map, layer, layer type, and block for OpenLayers.

There is an initiative within the Mapping and Location Group in Drupal to pull together all the disparate modules into a Geo Content Management System. The Geo module was an attempt to do this, and it has been widely and intensely discussed at DrupalCons (the twice-yearly Drupal conferences). The subject was raised in 2007 in Bdragon’s vision for doing locations “right” in Drupal and more recently in a post started by one of this book’s authors, summarizing the Drupal geo stack. The goal of this broad initiative is to separate out all of the different parts of mapping in Drupal (data storage, data input, searching spatial data, geocoding, and displaying maps) so that developers can choose which module they want to use for each part.

There are many ways to get involved in making maps in Drupal, so jump into whatever interests you most. Drupal developers use IRC (Internet Relay Chat) both to get help and to discuss module development. There is an introduction to IRC on the Community and Support page. Mapping is discussed in the #drupal-geo channel. The other way to keep up with new developments and initiatives is to join the Location and Mapping Group on http://groups.drupal.org/.

Over the next few years, the power of Drupal to make lively, useful interactive maps will only increase, the modules becoming more straightforward to use even as the options available become more flexible and creative. One thing’s for sure, there is no longer any excuse for offering information about places and locations without presenting that information the proper way, on a map. And there’s no longer any excuse for that map to be unhelpful, unresponsive, or boringly just like all the other maps. For inspiration we’ll leave you with one of the most beautiful and engaging maps to be made with Drupal for Energy.gov, shown in Figure 8-1. Happy mapping!

Figure 8-1. Energy.gov contains many beautiful maps. This map shows how much energy, waste and money has been saved by energy audits. It was built by Treehouse Agency using Drupal 7, MapBox, Geofield, OpenLayers, Apache Solr, OpenLayers Apache Solr, and Geocoder.

Appendix A. Further Reading


There is a huge amount of documentation for Drupal on drupal.org; however, there are also some books that we recommend.

Drupal Books


Drupal has become a very popular platform over the past few years, and as a result, there are a number of Drupal books focused on many different subjects. The following are just a few of the books we know to be good, but there are many more; please check out the list of

Return Main Page Previous Page Next Page

®Online Book Reader