Vishful thinking…

Comparing OpenLayers and MapBuilder

Posted in GIS, OpenSource by viswaug on November 30, 2007

I have been doing some research into comparing OpenLayers and MapBuilder to determine which will be more suitable for one our projects. I also wanted to get more familiar with the two technologies. I had played around with OpenLayers before but didn’t attempt any customizations to the existing functionalities that are available by default. There are a lot more of similar AJAX-enabled open-source web mapping applications that are available but OpenLayers and MapBuilder were the most promising ones. So, here you go…

OpenLayersOpenLayers is a pure JavaScript library for displaying map data in most modern web browsers, with no server-side dependencies. OpenLayers implements industry-standard methods for geographic data access, such as the OpenGIS Consortium’s Web Mapping Service (WMS) and Web Feature Service (WFS) protocols and other standard vector layers for the web like GeoRSS, GML etc. OpenLayers tries to separate map tools from map data so that all the tools can operate on all the data sources. The supported layers in OpenLayers are:

WMS, WFS, TMS, GeoRSS, GML, Google Layers, Geo-referenced Image Layer, MapServer Layers, VirtualEarth Layers, Yahoo Layers, WorldWind Layer, TileCache Layer.

The data layers supported by OpenLayers is extensible and support can be added for other custom data sources. A lot of ESRI users will be excited to know that there is an example showing OpenLayers using the MapCache of ArcGIS server 9.2 that can be seen here.

MapBuilderMapBuilder is an open source project allowing you to easily add dynamic maps and information from many other sources to your web site. The interesting thing here is that the MapBuilder development team is playing smart and are in the process of integrating OpenLayers into MapBuilder. This integration will eventually lead to OpenLayers to be the rendering engine behind the MapBuilder web applications. MapBuilder makes it easier to build new map widgets to enhance map interaction and to enable custom map functionalities. Building new map widgets is available through a well designed and easily configurable MVC framework at the client-side. Here are the key features of MapBuilder as listed on their website.

  • Browser based mapping client
  • Standards compliant, supports the Open Geospatial consortium(OGC) standards
  • Renders maps from Web Map Services (WMS), Web Feature Services (WFS), GeoRSS, Google Maps
  • Supports editing map features to Transactional Web Feature Services (WFS-T)
  • Allows users to build their own maps, then save and share them, using Web Map Context (WMC) and Open Web Services Context
  • Easy to use
  • Fast and interactive – built using AJAX
  • Works with most modern browsers (Firefox 1.0+, Internet Explorer 6.0+, Mozilla 1.3+, Navigator 6+)
  • Customisable and easy to extend
  • Open source under the LGPL licence
  • No plugins required

The feature matrix for MapBuilder can be found here.

After reading through the documentation available on both OpenLayers and MapBuilder, I still didn’t think that I had enough technical information on the implementation of the two technologies to make an informed and intelligent decision on which technology would be ideal for us. So, I set forth asking questions on the forums for both the technologies. Emanuel Schütze responded and forwarded me his thesis work where he had done an extensive comparison of the latest web mapping technologies. His thesis work is a must read to delve more into the details of the above two and other web mapping technologies. His thesis work can be downloaded from here. Here is a feature comparison chart from his chart.

FeatureComparison

The chart above compares the various usability features among the various web mapping applications. Well, that’s great, but friendly is OpenLayers for custom feature development. Well, I set out trying to simple little customizations to the OpenLayers controls etc. After, fumbling my way around quite a bit and spending a whole lot of time in FireBug I was able to accomplish what I setout to do. What I learnt from that experience was that the customizations that might be required can be accomplished if got your CSS and JavaScript Kung-fu on. Given, that OpenLayers does not come with a whole suite of tools that regular map users are used to, more custom navigation and other tools need to be developed for a feature rich web mapping application. Developing those new tools can be overwhelming if you are not as comfortable in the JavaScript web environment as you are with the windows environment and have been pampered and spoiled by Visual Studio. If you set out to create a custom control for OpenLayers, you need to study the existing controls and use them as the starting point to create our own as there no documentation or example on the subject. The documentation that is available to help and guide you through the framework is sparse at best. But once you get comfortable with the framework, OpenLayers provides a real powerful web mapping application development platform. Examples using OpenLayers in various scenarios can be found here. The class diagram for the OpenLayers framework is shown below.

OpenLayersClassDiagram

MapBuilder brings additional feature sets to the table. It allows for things like allowing users to build their own maps, then save and share them, using Web Map Context (WMC) and Open Web Services Context. These contexts are an XML representation of the LayerList, AreaOfInterest and some metadata. Most MapBuilder widgets perform client-side XSL transformation of the context documents to determine the display. Other MapBuilder widgets also transform the following 1) GML – e.g. to produce a list of feature attributes 2) A Context Collection 3) A Capabilities document 4) A response from a Catalog query etc. OpenLayers is currently working on their support for using WMC. MapBuilder supports SLD and is a SLD editor. SLD describes how to render features. It also supports editing map features to Transactional Web Feature Services (WFS-T). But there is a word of caution there because some server-side(Apache-PHP stack) features are required to accomplish that functionality. This I learnt from Cameron Shorter, “There is one security limitation using HTML faced by both Mapbuilder and Openlayers. You can only POST a request to the server that the HTML comes from. This is an issue when trying to access a service like a WFS from another server. Both Mapbuilder and Openlayers have a server side proxy to address this. All the rest of Mapbuilder and Openlayers code is client side.“.

MapBuilder does come with a lot more of the basic map navigation features that GIS users are used to. Unlike OpenLayers whose Navigation toolbar comes with just two controls (zoom and pan). MapBuilder also has more documentation for creating new functionalities compared to OpenLayers. But that is not to say that it is easier to learn. The OpenLayers framework could be a lot easier to learn given some good documentation rather than reading existing code. The framework for creating new widgets is also pretty well designed with a configurable MVC pattern that developers can relate to more easily.

The releases for OpenLayers are very well managed and are frequent to address issues quickly but on the other hand the release management for MapBuilder is not as good. It has been a year and a half since the last stable release for MapBuilder. OpenLayers has graduated incubation from OSGEO.

So in conclusion, If you just want a map and a few common widgets on the display, OpenLayers might be for you. If you want to design and develop new custom widgets to work with data sources from a number of sources then MapBuilder may be better.

One Response

Subscribe to comments with RSS.

  1. […] quais as diferenças entre um e outro?” Para responder essa pergunta eu vou indicá-los um post que achei e que faz um relato detalhado das duas ferramentas realizando um comparativo, descrevendo […]


Leave a comment