[GIS] Offline tiled map web app

htmlopenlayers-2web-mapping

I'm not sure whether to post this here or on Stackoverflow, as it's sort of a crossover. Let me give it a try.

In the proposed HTML5 standard, there's the option of storing web application data in a local cache using a cache manifest. I am looking to use this technique for an offline tiled web map application and did a quick prototype here based on a standard install of Geoserver.

I just ripped the OpenLayers client page that is generated from one of the default layers and changed the <html> tag to

<html xmlns="http://www.w3.org/1999/xhtml" manifest="cache.manifest">

And created the file cache.manifest which simply reads

CACHE MANIFEST
http://lima.schaaltreinen.nl:8080/

Which should, in my limited understanding of the matter, locally cache everything that loads from that URL: all tiles and the OpenLayers JS. In fact, upon first call in Firefox, it does ask me to allow local storage, but when I hit refresh – either online or offline – the page croaks stating that the OpenLayers object is not defined. Looks like it hasn't loaded the OpenLayers JS.

Anyone successfully did a functioning offline OpenLayers-based tiled web map app? Or hints on how to investigate this further?

Best Answer

You might be interested in the projects Maps on a Stick and MapBox iPad. (disclaimer: designed the former, involved in the latter. however, both are BSD-licensed, and the underlying tile format, termed ".mbtiles", is SQL-based.)

Maps on a Stick is an offline OpenLayers map. The main reasoning for going with a portable database/server instead of client side storage is that using browsers as large data storage isn't quite worked out and populating and indexing the cache can be costly.

Related Question