I am trying to make offline maps through caching (IndexedDB) in browser. I understand the concept is that I download and store the tiles of map first when connected to internet.
See my extensive research on this at:
Storing Image Data for offline web application (client-side storage database)
and at:
https://gis.stackexchange.com/questions/44813/database-for-offline-slippy-map-tiles
Key for what you want to do is a Functional Tile layer to get stuff from the DB:
https://github.com/ismyrnow/Leaflet.functionaltilelayer
BTW, I am just now testing out PouchDB for this, which is much cleaner that the raw IndexeDB.
Follow my results at:
https://groups.google.com/forum/?fromgroups#!topic/pouchdb/RG6wUsAi2R0