Project Description

"This blog is updated by the JISC funded G3 Project (#jisc3g) team. We are building an framework for teaching and communicating relevant geographic concepts and data to learners from outside the world of geography and GIS. We think this blog will be of particular interest to those working or teaching in HE and FE and those interested in teaching and learning and e-learning."

|Read more about the project |

Tuesday, 7 June 2011

Decision Time: Google Maps vs OpenLayers

Last weekend I attended the 2011 edition of WhereCampEU, held this time in sunny Berlin. It was a great conference, and Kate and myself presented our recent work on geoweb usability at the conference, even though we haven't had a chance yet to do a comprehensive analysis of the user experiments data we collected. I will put online the presentation in due time. Some lively discussions ensued about the nature of OSM, differences between traditional GIS interfaces and neogeography applications, and to what extent it should conform to establish practice in terms of UI (established by Google with for example the Search Bar).

The second day came with a set of more advanced technical discussions, most notably a discussion session on differences between webmapping frameworks (nicely captured in this whiteboard). This discussion was of particular interest to the JiscG3 project, as we need to decide which webmapping framework to implement.

One of the first conclusions from the discussion was that altough there are other libraries, for most geoweb developers, the choice really comes down to Google Maps API vs Openlayers (on its own or inside a UI framework such as GeoExt or MapQuery). The conclusions from the discussion can be summarised under the following headings:
  1. The documentation and code examples for OpenLayers, when compared to the Google Maps API documentation still leaves a lot to be desired. For example, the OpenLayers code documentation often leaves out important details regarding necessary options, which are hidden in an options object. And while the provided code examples are good at showing what can be achieved, they fail to guide the user through the architecture and development process necessary for the development of OpenLayers applications.
  2. Some users felt that OpenLayers necessitates a much deeper understanding of GIS to be able to develop functionality than Google Maps API. I guess this goes hand in hand with the more advanced functionalities of OpenLayers, for example by supporting OGC services such as WFS and WMS.
  3. OpenLayers was also criticised for its default UI elements, which are relatively primitive and unpolished in today's Web2.0 world.

I won't go into much detail here, as the discussion and its outcomes have been discussed by both people in the session, as well as members of the OpenLayers team.

For our project, the decision between OpenLayers or Google Maps API clearly presents a trade-off between the characteristics and benefits of both libraries, as well as practical resource considerations.
For OpenLayers speaks the ability to include different base maps, and the inclusion of a wide set of layers from different data sources. This openess comes with the price of increased complexity and development resources needed, and the issue of integrating and developing an coherent set of UI elements for our site.
The Google Maps API on the other hand presents perhaps a more restricted set of functionalities, precluding the easy integration of different basemaps at this stage. But the Google Maps API is easier to develop for, with an excellent documentation and help functions guiding developers through the architecture, examples and options for developing a web mapping application.

In the end, and through discussion in the team, the winning argument was the fact that we are making use of an existing code-base from a previous project, which was built on top of the Google Maps API. In practice for the JiscG3 project, both libraries would be suitable, and so the decision for the Google Maps API allows us to reuse the existing codebase as a solid and proven basis on which to minimise new development time, and focus on the new functionality needed for this project.

OpenLayers isn't completely out of the picture though, and provisions are being taken in the codebase to facilitate at a later stage the replacement of the web mapping libary, when more flexibility for example in terms of basemaps is needed.


  1. I want to correct one misunderstanding -- while stating that I agree with the rest of your post:

    "For example, the OpenLayers code documentation often leaves out important details regarding necessary options, which are hidden in an options object."

    The 'options' object is simply an override for any property of an object. If you review the options argument documentation, it mentions that "In general, you can set the value of any API property in a contructor’s options argument." -- this means that while we don't explicit list every property of a layer under 'options', that is actually the effect: any property of the layer, control, etc. can be changed by simply putting a key in the options object.

    This extends not only to the properties themselves, but also to the functions: you can replace anything from the properties or <a href="</a>, without creating a new class, simply by passing in a different options object.

  2. It seems the final decision ends up going with what other projects you are incorporating. GEMMA at UCL made a comparison and took in notes from you.

  3. Other considerations may apply, notably Google's TOU. Some of the users of our free, Open Source computer-aided-dispatch application feel that they can't comply with their TOU, and are running with the GMaps option turned off. (

    Other users require a local-only operation. For these we'll have a locally-stored OSM tile set, with OpenLayers as the API replacing GMaps.