I am working on an extension to openlayers to pre-cache tiles in a local websql datastore to support mapping on mobile device when connectivity is dead.
I would like to pre-seed my cache with a set of tiles. Currently this has to be done by visiting the area in question and using the cacheWrite control.
This would be done by fetching the tiles in question from my wms mapserver and storing them locally in the websql database. These would then be available for the cacheRead control to use on tileerror.
So, my question is: given a bounding box, is there an easy way for me to construct these calls using openlayers and hence populate the cache with the required tiles for a required zoom level?
A sample single tile call is:-
I can do this by panning the map about automatically, but the user experience is terrible ;-)