Author Topic: Map cache "valid for"  (Read 736 times)

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 698
  • Thanked: 96 times
    • View Profile
  • Device: MotoG
Map cache "valid for"
« on: April 28, 2018, 18:26:10 »
I am attempting to use an overlay to display traffic delays and road closures and I can't get it to display reliably..

I have some questions regarding the time validity of the map cache.
1. If I "Set valid for" to 0, does that mean the map is not cached, or that the cache does not expire?
2. Does the same validity apply when the map is used as an overlay rather than a base map?
3. Regardless of the expiry time, is the map cached anyway within the same session of Locus. That is, is the validity of the cached copy only tested when Locus is restarted? To put it a different way, once the map is accessed once in a session, is the same image used until Locus is closed?

Much the same questions apply if I attempt to use an online map with traffic conditions.
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11480
  • Thanked: 323 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Map cache "valid for"
« Reply #1 on: April 29, 2018, 09:10:04 »
Hello John,
1. time value "0" means = no caching at all. By default, maps have defined an infinite positive number, which say that cache never expires.
2. Yes, same value should be used for overlays as well. It is an exactly same map with exactly same parameters, just placed as the second layer.
3. cache validity should be tested every time, app try to load map tile from cache (SQLite file). In app is also small in-memory cache so a few tiles is stored in memory in case, they will be immediately needed, anyway when you scroll a screen to the side and return back, data are again loaded from SQLite file (so again validated against "valid for" time).

If you have an online map with traffic conditions, simply try to set there 0 (no caching) or 1 (one hour caching) and you will see. Hope it will work. I've never used it in practice so feel free to write me if there will be any problem.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 698
  • Thanked: 96 times
    • View Profile
  • Device: MotoG
Re: Map cache "valid for"
« Reply #2 on: April 29, 2018, 11:42:29 »
Thanks for that info, helpful.
I think there may a problem with a totally transparent tile (which is most likely to occur in an overlay and would occur in my traffic overlay where there are no traffic delays) failing to clear the previous tile and displaying old information, using SRC OVER. I have encountered this when zooming in or out, rather than the data changing but I guess the same would apply with changing traffic.
Where I know this happens is with a vector theme to overlay roads etc on to a satellite map. The background is generally pale white but over the sea the tiles were empty and transparent. Zooming in or out left the previous tile displayed in areas of transparent tiles. In this case I remedied it by drawing an off white background over the whole map first.
I think this may be a problem with my traffic project.

 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11480
  • Thanked: 323 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Map cache "valid for"
« Reply #3 on: June 21, 2019, 14:47:15 »
Good day John,
I'm trying to clean my older todo list and this topic is inside.
What is the status here? I'm asking also because I noticed that blend modes for overlay maps are somehow broken in 3.38+ version. A least on my device, overlay draw some "ghosts". So I wanted to know if I may help here somehow.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 698
  • Thanked: 96 times
    • View Profile
  • Device: MotoG
Re: Map cache "valid for"
« Reply #4 on: June 21, 2019, 15:49:28 »
I'll look at this. To be honest, I'm not sure if I can remember. I *think* I couldn't get the traffic overlays to refresh reliably but this may be a server side problem judging by problems reported by others elsewhere.

Sent from my moto g(6) plus using Tapatalk

 

Offline mobrob

  • Newbie
  • *
  • Posts: 3
    • View Profile
  • Device: Sony XA2
Re: Map cache "valid for"
« Reply #5 on: September 14, 2019, 17:27:41 »
When I look at the different maps available in Locus every map has a "0" for the map cache validity time  ???

Is it possible that therefore caching is completely disabled in Locus of the integrated maps?

If yes Locus is next to useless to me as network coverage often is not available or only in edge mode.
 

Offline hans.castorp

  • Newbie
  • *
  • Posts: 9
    • View Profile
  • Device: BQ Aquaris X Pro
Re: Map cache "valid for"
« Reply #6 on: September 14, 2019, 20:17:04 »
You can download offline Maps in Locus. After they are downloaded, no further network access is needed and they are cached indefinitely.
 

Offline mobrob

  • Newbie
  • *
  • Posts: 3
    • View Profile
  • Device: Sony XA2
Re: Map cache "valid for"
« Reply #7 on: September 15, 2019, 19:09:05 »
Thanks, but I am not talking about the offline functionality I am talking about tiles that are loaded and displayed when online and later when the phone is out of network coverage are just taken from the local cache. This caching mechanism  doesn't seem to work in Locus anymore.
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 698
  • Thanked: 96 times
    • View Profile
  • Device: MotoG
Re: Map cache "valid for"
« Reply #8 on: September 16, 2019, 10:28:12 »
Have you checked Settings > Maps > Online Maps > Cache Maps is set on?
On my installation, Maps (Online Maps) > ... > Details gives details of whether the map can be cached and the size of the map in the cache.
Maps (Online Maps) > ... > Set 'valid for' is blank by default but can be changed to cause regular updating where required.



Sent from my moto g(6) plus using Tapatalk

 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11480
  • Thanked: 323 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Map cache "valid for"
« Reply #9 on: September 16, 2019, 14:35:14 »
Please try to open "details" of for example OSM - Classic map. At the bottom should be "Valid for" text. What do you see there? Same as me?

If not, then as John wrote, you may set own value. If set value above 1 year, you will get this "unlimited" label. Most of the maps are definitely not limited. Only some have a subscription so this "valid for" parameter is defined by the validity of subscription.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline mobrob

  • Newbie
  • *
  • Posts: 3
    • View Profile
  • Device: Sony XA2
Re: Map cache "valid for"
« Reply #10 on: September 16, 2019, 19:17:08 »
I checked Settings > Maps > Online Maps > Cache Maps - the value is on.

And as I wrote in my post for each and every map I see the entry "Valid for 0 Hours".

This does not change even if I stop Locus and delete the Locus app data, cache and the "Locus" folder on the sd-card storage.

Now with empty cache I opened the OSM Outdoors map, accepted the terms of use and Locus downloaded the visible map tiles. I then activated air-plane mode and restarted Locus. No map tiles are available anymore. I only see the old cached map tiles flashing for may be a few milliseconds then again the map tiles with the error message are shown.
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11480
  • Thanked: 323 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Map cache "valid for"
« Reply #11 on: September 17, 2019, 08:56:52 »
Really interesting. May I ask you for a backup of settings? I'll check what is set there in your case. Backup of settings should be done over menu > more > Backup manager. Thanks.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11480
  • Thanked: 323 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Map cache "valid for"
« Reply #12 on: September 18, 2019, 21:14:16 »
mobrob, thanks for the backup!!
I'm really stupid. I've made a small issue in the last version and all new! users have all maps that have no limit, set to 0 hours! Ah, really sorry for this and thanks for the help with it. I'll fix it in next version. Till then, for the map you want to use, simply set some high number, it should work.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 
The following users thanked this post: mobrob