October 2012 Archives

Offline maps for iOS

The buzz recently has been about the new Apple Maps app in iOS 6. Personally I don't mind the new maps, but there is a potentially more pressing problem regardless of which map program you use.

They don't work when you don't have an Internet connection!

If you live out in the middle of nowhere with questionable coverage, you want to use your Wi-Fi only iPad in your car as a map, or your Internet goes out you're in trouble. My town lost cable Internet and AT&T data coverage for 12 hours during Hurricane Irene. It can happen!

But there is a solution! Fair warning, it's quite a bit of work but the results are well worth it.

1. Get Galileo Offline Maps from the Apple App Store. The app is free, but...

2. Get the Offline Maps in-app purchase for $ 1.95. If you have multiple devices you have to "Purchase" the feature on each device, but once you log into the Apple app store it realizes that you already bought it only charges you once, so it's a pretty good deal.

3. Download MOBAC, the Mobile Atlas Creator, on your desktop computer. This should work on Windows, Mac or Linux as it's a Java app. It's at time infuriating to use, but you'll only need to use it once. You pick the areas you want in your map and what zoom levels you want saved, and then it downloads the map data and generates a custom atlas file.

4. Download your custom Atlas file to your devices. There are several ways, but I did it from the iTunes app on my computer.

5. Go into the Galileo Offline Maps configuration and select your custom atlas file as the data source.

I installed it on every device I have and it works great! Even on old, slow devices like my iPhone 3G the maps scroll and zoom instantaneously. You never have to wait for the map to load, even when you only have AT&T EDGE coverage!

MOBAC tips

You select an area by clicking and dragging with the left mouse button.
You move the view area around by clicking and dragging with the right mouse button.

The idea is that you select an area and then choose what zoom levels to save for that area. You don't have to include every zoom level. You probably don't need anything lower than 8 if you're doing, say a Northeast US map, or 6 for the entire US. And you probably won't need to zoom in closer than 14 or 15.

You can skip layers and, do, for example, every other layer, sometime you might have to zoom in or out a little when there's no map data for a layer, but it's so fast it's not too much of a bother, and it of course makes for a smaller atlas file.

The trick to avoid taking forever to create your atlas and have a gigantic custom atlas file is to pick and choose the areas with high level of zoom.

For example, I did a zoom level 8 for the entire northeast so I get interstates and major roads.

For the areas I frequent in NY and VT I include a 10.

For the nearby cities I frequent I include 12 and 14.

For my local area, I go all the way to 15 so I can get all of the streets in town and the smallest country roads.

By picking and choosing how detailed my map is, I got the size down to about 250 MB, which easily fits even on my old 8 GB iPhone 3G!

Once you pick the areas you want and generate the atlas file you need to install it into your devices. The Galileo instructions include more details, but I did it by connecting my device to a computer running iTunes. When connected, at the bottom of the window is a list of apps, and you can upload a file to use with an app there.

The last step is to go into the Galileo configuration and select your newly uploaded custom atlas file instead of the default. That's it! Super-fast maps that don't require an Internet connection.

Driveway bell

I live at the end of a long driveway and decided it would be nice to know if someone is driving up my driveway.

If you remember the bell that goes off when you used to drive into a full-service gas station, or I suppose if you live in New Jersey or Oregon, well, I've got one. With far more technology.

I'm pretty sure the bell thing works because driving over the rubber tube compresses it, causing the air pressure in the tube to rise and ring the bell. I didn't do that.

I started with a Dakota Alert DCR-2500 driveway alarm. Here's the magnetic sensor before burying a foot into the ground next to my driveway, half way up my driveway and about 300 feet away from my house.

And the wireless transmitter unit. It's battery powered.

It transmits to this receiver unit in my house. Most normal people would stop here, because the unit can make a beep sound or doorbell chimes when a vehicle passes by. I did not stop there.

I connected it to my environmental monitoring unit. It's a Phidgets 8/8/8 analog input, digital input and digital output unit. It's connected by long-range USB-over-Cat.5 to a server in my house.

The Phidget server is written in Java, running in Apache Tomcat. It communicates over a HTTP-JSON interface to the another webapp that monitors all of the systems in my house. It generates alerts and daily reports of the comings and goings at my house.

I wrote a Mac app that pretty much just embeds a web browser that displays my alarm status. It uses async Javascript JSON requests and jquery to get status in real-time since the server will hold the requests in limbo until something actually happens, so there's no polling delay.

The client-side Javascript examines the status events to look for vehicle in driveway events. It uses SoundManager2 to play the sound asynchronously in the background. The embedded Webkit browser in my status app supports HTML5 audio, so that's used, though SoundManager2 can fall back to Flash on older browsers. It provides a much more convenient API than the native HTML5 audio API, regardless.

I purchased (quite inexpensively, I might add) the gas station bell sound.

The color scheme is white on black because the app is displayed on the monitor that is mostly dedicated to TweetDeck, so I wanted to match the style.

About this Archive

This page is an archive of entries from October 2012 listed from newest to oldest.

June 2012 is the previous archive.

November 2012 is the next archive.

Find recent content on the main index or look in the archives to find all content.