Raster data is stored on the local file system somewhere in
<app>/layers/<layerId> directory
We configure layers as XYZ or WMTS/REST layers. Layer URL is
prepended with layerDirectory.toURI()
This results in an URL like file:///mnt/sdcard/<app>/layers/<layerId>....
As long as raster image catalog respects the directory structure of
the layer type (like, ${z}/${x}/${y}.png for XYZ layers), OpenLayers
has no problem showing the "offline" raster data in the map.
BTW, we use PhoneGap to make it truly multi-platform, but it also
works in compatible browsers (Chrome, Safari) out of the box without
PhoneGap.
Supposedly it is possible to use openlayers with a local tile store in a HTML5 scenario. From valikov@gmx.net on the OpenLayers-Users mailing list:
We are using "File API: Directories and System" for this.
<app>/layers/<layerId>
directoryfile:///mnt/sdcard/<app>/layers/<layerId>
....As long as raster image catalog respects the directory structure of the layer type (like,
${z}/${x}/${y}.png
for XYZ layers), OpenLayers has no problem showing the "offline" raster data in the map.BTW, we use PhoneGap to make it truly multi-platform, but it also works in compatible browsers (Chrome, Safari) out of the box without PhoneGap.