the question is very simple. i want to use the OpenLayers.Control.CacheRead control to load and store tiles when the connection is fast e.g. with wifi network. then use the same device in other places where there is slow or no connection e.g. gprs network.

the examples i have found are not clear on implementation?

For my mobile application, i would like to locally cache the tiles. This i think can be done by CacheRead,

my question is do i need to use CacheWrite to use CacheRead Control or it will be handled by the browser's cache?

and in case i use cachewrite, how can i clear the cache so that new changes in server are visible?

i am trying to cache OpenStreetMap tiles.


So I have been doing a brief reading on your question, and here is what I have found:

  1. Yes you need to use both CacheRead & CacheWrite. Your browser will not automatically put the tiles in the Cache, unless you use CacheRead.

    Please have a look at this sample: Offline Storage Example

  2. When your tiles are updated, you can invalidate the cache by using CacheWrite.clearCache()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.