OpenLayers Mobile Code Sprint

Last week EDINA had the opportunity to take part in the OpenLayers Mobile code sprint in Lausanne. A group of developers from across the world gathered to add mobile support to the popular Javascript framework.

After a week of intensive development we have been able to add a number of new features allowing OpenLayers to function on a wide range of devices, not only taking advantage of the touch events available on iPhone and some Android mobiles to allow touch navigation, but also enabling the OpenLayers map to be responsive and useful on other platforms, or even unexpected devices!

Jorge Gustavo Rocha and myself worked on adding support for HTML offline storage. Covering storing maps and feature data on the users local browser using the Web Storage and Web SQL standards. Here is the example sandbox which allows the user to store map tiles for the area they are viewing, which are automatically used instead of downloading the online image when possible.  More details on this and other features added can be found on the OpenLayers blog.

I have to say I wasn’t sure what to expect, and I have certainly found it rewarding contributing to OpenLayers and working with such a dedicated and talented team of developers. Far more was achieved than I would have thought possible in such a short space of time. Very inspiring stuff!

Caching and OpenLayers Mobile Code Sprint

We think that a key feature for a mobile mapping application is the ability to view maps offline. One of our key use cases, a educational field trip exercise, requires access to maps in locations where network connectivity might be poor or non existant. Having access offline also widens the kinds of device we can use to include WiFi only devices such as the iPod Touch and no SIM iPad tablet.  Threfore we’ve been working hard over the last couple of months on working out how we can cache maps.  We’ve made alot of progress on this, developing the caching ability in the TouchMapLite library to be more robust and work with our WMS mapping server.

This is possible in a web app environment thanks to 3 seperate  HTML5 initiatives that assist web developers in caching data listed below.

It’s quite easy to get these three flavours of caching mixed up (I’ve done so myself), so one of our engineers has blogged on the subject, explaining what each one does and offering some very helpful hints and gotchas. The first post focuses on the Application Cache, with similar posts on SQL database and Web Storage to follow shortly [update 22 feb 2011: Our engineer has now blogged part 2 ( web SQL database) and part 3 (Web Storage) – some very useful comparisons.

We are going to share the techniques we’ve developed for caching maps during the upcoming OpenLayers Code Sprint in Lausanne later this month. It’s really great to see the OpenLayers development community tackling mobile in earnest this year. Respect to CampToCamp and other sponsers for organizing and sponsoring the event. Geomobile is looking forward to sharing progress with its readers!