jofomah / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

Make the tileoverlay Cache value configurable #203

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, custom TileOverlays also inherit the 30 day cache.

This is not useful for overlays that refresh every hour, for instance.

OnlineTileSourceBase should have a parameter that indicates the time duration 
of the cache.

This would greatly benefit osmdroid for usage of weather and traffic overlays.

Original issue reported on code.google.com by wimvanbe...@gmail.com on 13 Apr 2011 at 7:09

GoogleCodeExporter commented 8 years ago

Original comment by neilboyd on 13 Apr 2011 at 7:46

GoogleCodeExporter commented 8 years ago
How do you suggest adding this parameter to OnlineTileSourceBase?
The tile is only read from the online tile source if it's expired on disk.
I think you actually need to set the expiry in the file system provider, and 
that's already configurable in the constructor.

Original comment by neilboyd on 14 Apr 2011 at 3:05

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi Neil,
If i set a cache using the filesystem provider, it will automatically reload 
those tiles at startup until new tiles have been loaded. If the user does not 
have an internet connection, this leads to old data being incorrectly shown.

Is there a way to circumvent the disk cache all together?

Original comment by wimvanbe...@gmail.com on 30 Apr 2011 at 2:33

GoogleCodeExporter commented 8 years ago
Has there been any progress on this issue or any work arounds.  I have 
meteorological data that will need to be expired every 10 minutes or so and 
thus far I cannot see any way around the problem.

Original comment by jeffrey....@gmail.com on 24 Jan 2012 at 5:58

GoogleCodeExporter commented 8 years ago
I have had a similar issue with a tile source that I did not want to cache in 
the fs at all.
This patch allows you to specify whether tiles should be cached or not in your 
tile source.

Original comment by osei...@gmail.com on 28 May 2012 at 7:18

Attachments:

GoogleCodeExporter commented 8 years ago
I also agree that the TileOverlay cache values should be configurable. In my 
situation I wanted tiles to be cached for periods of time longer than 30 days. 
I created this patch to create another TileWriter constructor that takes in the 
tile cache size and max cached tile age

Original comment by mjann...@gmail.com on 5 Jul 2012 at 6:39

Attachments:

GoogleCodeExporter commented 8 years ago
See https://github.com/osmdroid/osmdroid/issues/60

Original comment by neilboyd on 12 Aug 2014 at 1:47