I am looking for a solution that can enable the mobile browser load a collection of tiled images from the server and store them in local mobile device, then could display them even in offline mode.
I researched something by using CacheManifest and LocalStorage in HTML5, but it seems that they can only handle with a small amount of data. Besides, WebSql seems to be a potential solution, but I cant really understand how to acheive it.
Basically, the features I want to have is: load from the remote server while in online mode -> store them in local memory -> show them while in offline mode
thanks for any hints!
Our open-source project at the recent iOS DevCamp (July) was focused on exactly this problem. We got pretty close to a workable solution:
https://github.com/pdxgene/iDCMapsLite
Highlights: - "online" tab browses maps (currently set to grab tiles from OpenStreetMaps, IIRC) - "save" saves map tiles to a Core Data store, and adds an "offline map" to the list in the second tab; - "saved maps" tab contains a list of saved maps. Selecting one grabs its tiles from the Core Data store and displays them.
Areas where work is still needed: - our intention was to recursively snapshot the map tiles, zooming both in and out. I believe we got one level down and one level out as a proof of concept.
I hope this helps. Feel free to try to make it work for you :-)