My favorites | Sign in
Project Logo
                
Search
for
Updated Jul 05, 2009 by masks62009
Labels: Featured, Phase-Deploy
30HowTo  
How to use OM on iPhone 3.0.

Introduction

After apple operating system upgrading to 3.0 , offline maps have of lots problems. These issues are mainly originated from the fact that apple has changed the behavior of cache access . First of all, cache data can not a Symbolic-link, it must be a real file (so, future version might disable the function 'Link'). Secondly, in the state of the network connection, iPhone will write into the cache; If it found that it is unable to write, Maps will automatically delete the readable file and re-establish a cache file. In other words, we recommend that you use OfflineMaps when there is no network connection

Details

For the cache file itself, there are changes of some settings. The Preference file of Maps 'com.apple.Maps.plist' adds a lot of the content.

Zoom level detail upgrades from 15 to 19, longitude and latitude switched to a short value with the addition content called 'UserLocation'. The Photo cache database 'MapTiles.sqlitedb' upgrades the version from 5.26 to 5.29.

Zoom reflect the relative level of change also.

Solution

If you are using the old cache , it is recommended that : disconnect network , and loading the old map cache, waiting for the right to open Maps , and then use 'Import' function to update the cache , or just replace the 'com.apple.Maps.plist' .Or , you can wait the new GMDL Tools.


Comment by chang.andy, Jul 05, 2009

I don't understand the solution. Can you explain in more detail how to fix the Linking problem?

Comment by zah...@mohiuddin.com, Jul 05, 2009

ya i dont understand either

Comment by alexng83, Jul 06, 2009

scratches head huh?

Comment by latte4u, Jul 06, 2009

I think you haven't solved symbolic link problem. Just copy all data into cache directory then use maps without connections.

Comment by royten, Jul 07, 2009

Version 3 needs online to load maps? Not working offline anymore? I am using version 5 converted map.

Comment by oatchan, Jul 08, 2009

I think a copy function may be helpful in order to copy a pre-loaded map to cache directory anytime. I've seen this function in former version and think it could work wiht OS 3.0.

Comment by oranav, Jul 08, 2009

I have made a patch for GMM framework so it doesn't delete your cache: http://code.google.com/p/oranav/wiki/iPhoneOS30MapCaches

Comment by chang.andy, Jul 08, 2009

I tried oranav's patch and it works perfectly. Now, anything you view over a connection gets permanently saved to the cache so that it can be viewed even when not connected. It lets you save all zoom levels (unlike GMDL). You can also load entire cities with OM, but the file size might get pretty large. OM can also save map routes! Still not able to search streets, but that's ok.

thanks oranav and masks!!

Comment by chang.andy, Jul 08, 2009

I tested the route feature in OM and it only lets you save one route at a time. It works the first time but when I tried to delete the route (.plist), it does not work. Is this a bug or am I doing something wrong?

Comment by r...@pisem.net, Jul 14, 2009

"in the state of the network connection, iPhone will write into the cache; If it found that it is unable to write, Maps will automatically delete the readable file and re-establish a cache file" We've found a way to avoid it: if Library/Caches directory is set a read-only permissions, you can avoid map cache being deleted by Maps

Comment by armswith...@web.de, Jul 15, 2009

I create a new Folder for example "b" in /private/var/mobile/Media/Maps, than copy an older version of "com.apple.Maps.plist" in that Folder, browse around with maps.app a little bit, enter the directory /private/var/mobile/Libary/Caches/MapTiles?, where the created MapTiles?.sqlitedb will be. After that I copy the MapTiles?.db into the Folder "b". Now Map.app will no longer delete the Cache when started. No Permission changing is needed. Links wont work, but you can use your Maps offline perfectly. I tried with v 3.0.

Comment by gwtian, Jul 17, 2009

thanks armswith, your method worked. i tried oranav's gmm patching method but it makes maps crash after rebooting your phone.

Comment by calgalli, Jul 18, 2009

Can we just change the file name when the map is switched in stead of copy the whole map? It is very slow when the map is copied,

Comment by keg.2kay, Jul 18, 2009

oranav's method crashed my maps app but setting the mapTiles folder to not allow write access seemed to solve the overite problem. the only down side is that it can't add to the cache so unless you keep within your offline maps area it keeps needing to reload all other tiles. (hmm i really should expand my map size)

Comment by keg.2kay, Jul 18, 2009

here is a quick way to do set the MapTiles?? folder to read only: if you do not have it already go grab mobile terminal from cydia

then use the following command from the "mobile" directory (its the default starting point for terminal so as long as you haven't cd any where you should be fine): no "?" on the end <-- google does that for some reason

chmod 555 Library/Caches/MapTiles?

and to set it back to default:

chmod 755 Library/Caches/MapTiles?

Comment by idogreen, Jul 19, 2009

Works like a charm! great work all, thank you so much. this i very usefull for me, cuz im in the process of looking for a new place to live, and Google maps has no support locally (Israel ...). what i did: placed the large MapTiles?.sqlitedb file (Israel is 778MB) under the folder: /private/var/mobile/Libary/Caches than gave it write permissions - 0755.

thanks again!

Comment by enfenion, Jul 27, 2009

I made a bash-script to switch between different maps. It's not the best implementation (it is quite slow because it copies the whole maps to link it). map.sh

#!/bin/bash
if [ $# -eq 1 ]
then
  FILE=$PWD"/"$1"MapTiles.sqlitedb"
  if [ ! -f $FILE ]
  then
    echo "File not found: "$FILE
    exit
  fi
  echo "Restoring permissions. (755)"
  chmod 755 /var/mobile/Library/Caches/MapTiles
  echo "Copying "$FILE
  cp $FILE /var/mobile/Library/Caches/MapTiles/
  echo "Setting permissions. (555)"
  chmod 555 /var/mobile/Library/Caches/MapTiles
  echo "Done."
else
  echo "Supply directory to use."
fi

Give the script execute-permissions with:

chmod +x map.sh

Usage:

./map.sh Relative/Path/To/Folder

Where Folder contains MapTiles?.sqlitedb

Comment by b.boredom, Aug 01, 2009

hey guys, i still can't figure out how to do this.

where do I dump my folders containing MapTiles?.sqlitedb and do I just chmod that folder?

many thanks

Comment by SBCool79, Aug 02, 2009

i can't download anymore with gmdl!!! It doesn't download or preview anything... is that normal? thanx

Comment by gakone, Aug 04, 2009

I cannot download map with GMDL too. Any solution?

Comment by LauraCYip, Aug 05, 2009

I am confused. Offline Maps 2.1.0.4 isn't working at all. There is only a link option, which of course does not work. It tells me there are no routes or bookmarks to import. What is wrong?

Comment by SBCool79, Sep 18, 2009

offlinemaps not working on os 3.1!!! some news?

Comment by SBCool79, Sep 18, 2009

is it possible to let it work on 3.1? i think the problem is that maps cache now is in a new folder different from 3.0

/private/var/mobile/Library/Caches/Maps/MapTiles? on3.1 /private/var/mobile/Library/Caches/MapTiles?/ on3.0

and another question is does maps enhancer work with this change? i didn't try

Comment by mrzzheng, Oct 11, 2009

Just to let you know after upgrading to 3.1.2 (jb-ed), the '0755/0555' trick doesn't work any more.. I wrote several scripts which worked perfectly at 3.1, but now it sucks!! Map file reduced from 100M to 400k even if i chmod as before! Any new tweaks?

Comment by jackal.c, Oct 17, 2009

for 3.1 ln -s /private/var/mobile/Library/Caches/Maps/MapTiles? /private/var/mobile/Library/Caches/MapTiles?

and maps enchancer still works

Comment by mrzzheng, Oct 17, 2009

How about 3.1.2? I think Maps.app changes some mechanisms in deleting caches in 3.1.2. i.e., more strict deletion.

Comment by almeidatavares1, Oct 19, 2009

Same problem...3.1.2 not working. Still writes the file on the old folder (/private/var/mobile/Library/Caches/MapTiles?)and nothing on the new one. Solutions needed...

Comment by am.artform, Nov 01, 2009

Comment 2 by sasalove, Oct 08, 2009

easy! ssh to your iphone See here http://code.google.com/p/iphoneofflinemap/issues/detail?id=52#c3

QUOTE:

$ cd /private/var/mobile/Library/Caches $ ln -s Maps/MapTiles?/ MapTiles?

Then offline maps works again! Even for 3.1 firmware Cheers~


Sign in to add a comment
Hosted by Google Code