Question about cached maps

Started by daled, January 19, 2011, 02:32:23

0 Members and 1 Guest are viewing this topic.

daled

I've read the "manual" and played around a bit with the offline maps but still do not quite understand how the caching of maps work.  The manaul implies that you need to explicitly request that a region be stored for offline use and give a set of four options for saving the map: 1) Online shared map (SQL) 2) Separate map (SQL) 3)External map (SQL) and 4) Older download map (TAR).

Even when I do not select any of these types explicitly the program appears to cache maps after I view them.  That is, I can view some maps, close the application, disable wireless access, start the application again and successfully browse to those areas that I viewed previously.  It is acting like option #1 is always enabled.  Is this true?  If so, does the cache eventually fill up?  When do maps get purged if not explicitly saved?

If you use option #2 (Separate map), how and when does the data for that map get used vs. the online map data?

By the way, I think Locus is great.  It is fastastic to be able to use multiple different map sources, switch between them and also have the map data availabe for offline use!
  •  

Menion

#1
You understand well,
  when you browse online maps, tiles are stored into same database as when you download maps with SQL shared mode! So when you turn your data connection off, all already viewed maps will be available in offline mode ...

  cache is on your SDCard in Locus/mapsOnline directory. There is not currently any limitation, so cache will grow until fully fill your card :). Unfortunately, format I'm using do not hold any information about date when tile was added to cache, so I'm not sure how to choose which tiles purge when cache (SD card) is full ...

  when you select separate map, you then on map select screen, click on top "Custum map" tab, and choose your "Separate map". This map will be fully offline and no additional tiles will be added in to it.

I'm glad you like it
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

rkirmeier

#2
So it sounds like using the internal map fetch method does not have the 2GB limit that SQLlite does? I sure prefer making my maps on the computer though. Is there any solution to using larger then 2GB maps AND creating them on the computer?
  •  

Menion

#3
Sorry, I thought that there is no limit for cached maps but seems that android has generally problem with SQL files bigger then 2GB so I'm still not sure how to do it, but you actually have to check manually if your cached maps aren't too big. I'll have to do some protection but still not sure how ...

Unfortunately no solution for using maps bigger then 2GB is available. (currently)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

daled

#4
Menion:  Thanks for your explaination.   I understand you to be saying that all maps will be cached until the SD card fills up (and then things will break) or until the cache reaches 2 GB for one map type (and then things will break).  If this is correct, I agree that you need some way to stop the caching before things break.  I do not find any option in the program to clear the cache.  At the least I would think that such an option would be useful or necessary.  lacking such an option, what is the correct way to delete the Online cache?

If all maps are cached, what is the purpose of the first option in the offline maps "Online Shared Maps" settings?  It sounds like you are saying this is always enabled.  Am I misunderstanding something?

If you had some way to indicate in the Online SQL Database which tiles were added automatically by browsing online and which tiles were added explicilty by the user saving them, then if the user asked to have the cache flushed (or if you flushed the cache automatically because the size was too large) you could avoid flushing the tiles that were explicitly cached by the user.
  •  

Menion

#5
just fast answer:

best to clear online maps: just delete correct files in mapsOnline directory!

purpose is: I live in Prague so when I watch map, tiles are cached. I want to go out and I'm not sure if I saw all map tiles in this area at this zoom, so I download whole area with this method which make me sure that all maps are ready for offline and also save me time by downloading tiles that I already saw!

Problem is that I wanted to be compatible with SQL map format of RMaps, but I see, that was a bad idea. SQLite RMaps format contain only x, y, z (tile position) and image data. No informations about tile download time or method of download.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

daled

#6
Thanks for your quick explaination.  I understand.  It is no problem for me to delete the cache files with a file explorer, but for an application that is widely available and useful you probably need to make the cache files take care of themselves and will probably have to enhance the RMaps format to keep a bit more information.
  •  

Menion

#7
Hi,
  so since 0.9.6 is in application "file checker" which test cache files. If any of them is too big, app will show dialog with additional information and also with possibility to delete just part of tiles, depend on time. Unfortunately, function that delete rows from database and then compress file ("VACUUM") takes sooooo long (around 10 hours on 2GB file), so I created method that directly copy tiles from old file to new and then old delete and replace with new. This method, on 2GB file, when all tiles are copied, takes 2hours, so better then before.

 It's written in description anyway, I really suggest to delete big file instead of this method. uff ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •