Lets face it, iOS Maps uses up too much of your data package. If you don’t believe me, try this:
- Check your data usage in Settings -> Usage -> Cellular Usage
- Reset it, or take a note of the value
- Go to Maps, and search for a city youve never viewed before in map
- Zoom in a few times, and pan around for 30 seconds
- Check your data usage again
- That’s right, 2-3 MB for that small privilege!
The problem isnt just the amount of data itself, but the fact that it gets deleted soon after you download it! Why? The maps app on the iPhone has a very small, ~22MB cache. So even if you use your home WiFi to pre-download all you need for your week away to Paris, it’s likely you can only access a tiny bit of your previously viewed maps before you need to download again. And for that you need cell access, to drain more data from your monthly allowance (or force you to sell your house to pay for roaming fees), and patience.
1. First you need to jailbreak. Luckily this is possible on all devices, including the iPhone 4S (at time of writing).
2. Now there are a number of existing solutions you can try. However, I found (at time of writing), some are difficult to understand, and none of them work with Google Maps or iOS5. In case this changes, and because it’s likely my solution will one day fail, I’ll list some of them here:
- OffMaps - http://www.offmaps.com/ - Doesn’t need jailbreak, but uses OpenStreetMap not Google Maps and costs money
- OMaps - http://omapsiphone.com/ - See above.
- iphoneofflinemap - http://code.google.com/p/iphoneofflinemap/ - Supposed to enable your Maps app to save for offline use, but doesn’t work in iOS5
- Maps Enhancer - http://moreinfo.thebigboss.org/moreinfo/depiction.php?file=mapsenhancerData – See above.
- iMapsManager - http://imapsmanager.ru/mapConverter/mapConverter_eng.htm - Converts maps downloaded with the google maps downloader tool. Doesn’t work with iOS5
- Try the below (with iOS 5.0.x)…
We are going to modify the cache database to stop it deleting old map tiles, thereby allowing it to increase in size indefinitely. Don’t worry, its not as hard as it sounds.
- Find and Copy the /private/var/Library/Caches/Maps/MapTiles/MapTiles.sqlitedb file to your Mac / PC (you can do this using a file copying program such as iExplorer [http://www.macroplant.com/iexplorer/], or using ssh).
- Open it with an SqlLite database reader. I used MesaSQLite [http://www.desertsandsoftware.com/?realmesa_home] for Mac.
- Add the following trigger to the database by executing the following query:- “CREATE TRIGGER prevent_delete BEFORE DELETE ON image BEGIN SELECT raise(IGNORE); END”
- Quit Maps on your iPhone
- Copy the MapTiles.sqlitedb back to the same location on your phone, replacing the original
- Ensure the file has the correct permissions, owner: mobile, 775. You can use terminal, ssh, or even iFile (an app available in Cydia) to do this.
- Restart your iPhone.
Now try it out! It’s best if your on a wifi network, but 3G will do. Pan and zoom around the map all you like, and after a few minutes check the size of the MapTiles.sqlitedb file. It should grow beyond 22Mb, and when you go back to previously visited places, it will load instantly, and without need for network.
- You may have to be connected to the internet for a second or two when you first load the maps app after a phone restart in order for them to work offline. After that you should be able to close and open it and view all tiles without being online and not using any data.
- GPS does NOT appear to work at all without a network connection in the Maps app or any apps that use Google Maps API in iOS, even if you have perfect line of sight to the sky and the area you’re in is definitely cached. I have no idea why this is. Please correct me if I’m wrong.
- Your maps will eventually become outdated if you live in a fast changing country like China. You may want to delete the cache file at this point and repeat the process above to make sure it’s not limited to 22MB
- Your Maps may eventually have problems, after all this is a hack, though mine hasn’t yet with my cache file at 150mb.
- If your very geeky like me, you can discover the location of the MapTiles database for all the applications other than the official Map app, that use the maps api. One of my favourite such apps is called cartographer. By creating a symbolic link from your modified MapTiles database to the common location for the other apps, you can use the same cache for all your maps related apps!
- One day the tool iMapsManager [http://imapsmanager.ru/mapConverter/mapConverter_eng.htm] will hopefully be updated to allow you to create maps using the google map downloaded toll and load them onto your iPhone.