Navit: a map and navigation program

Although I own a GPS navigation device and have GPS capabilities and a data plan on my cell phone, I prefer to have a mapping program on my laptop just to be safe as I’ve been to many places where I don’t receive cellular signal. Back in 2004, MS Mappoint was installed on my Windows XP laptop. I liked it because the entire USA map was accessible on my laptop without an internet connection. In addition, I could enter the start and end destinations and it would give me driving directions. I asked for Linux alternatives at the LQ forums and people recommended tangoGPS. More information about tangoGPS can be found here. It seems like a solid program as you can plug in a GPS receiver and use your laptop as a GPS device. The downside is that maps are not stored on the computer so an internet connection is required. However, you can cache maps of the area you will be heading to ahead of time. This is inconvenient and remembering to do so is unrealistic for me.

I recently did a search for more programs on Linux. I discovered Navit from this thread. Like tangoGPS, you can plug in a GPS receiver and use your laptop as a GPS navigation system. However, I’m just looking for maps accessible offline, and if possible, be able to determine routes by entering the start and end destinations. Navit appears to be able to perform both of these tasks. The downside is the complex configuration process.

Installing and configuring Navit ##

This post outlines how one can install and configure Navit. I used this post and the Navit wiki as a reference for my installation and setup.

I first tried to install Navit from the Ubuntu repositories, but I couldn’t get Navit 0.2.0 (Ubuntu 11.04) to work with the maps I downloaded at Navit Planet Extractor (Warning: map_binfile:map_binfile_open:invalid file format). I opted to install from source (version 0.5.0… at the time of this post).

First, I needed to install the dependencies on Ubuntu:

sudo apt-get install build-essential pkg-config 
automake libglib2.0-dev libtiff4-dev libtool 
libxmu-dev libfribidi-dev gettext zlib1g-dev cvs gpsd 
gpsd-clients libgps-dev libdbus-glib-1-dev 
libgtk2.0-dev freeglut3-dev glutg3-dev 
libcegui-mk2-dev libdevil-dev libglc-dev libpcre3-dev 
libmng-dev libfreeimage-dev gettext autopoint

Then I compiled and installed like usual:

svn co navit
cd navit
./ && ./configure && make
sudo make install

Configuring Navit was hard:

## in svn directory still
mkdir ~/.navit
cp navit/navit.xml ~/navit.xml
mkdir -P ~/Downloads/NavitMaps
cd ~/Downloads/NavitMaps
wget ## 6+ GB
## go to and select the N and S America region and download as: americas.bin

Now edit ~/.navit/navit.xml:

## disable the default mapset and add:

## change center to:

## coordinates are multiplied by 100: 33.76 is 3376
## enable GUI

The app isn’t perfect yet (maybe because not everything is fully documented so I don’t know how to set things up). Using my setup, we can at least enter in an address and view the map from there. READ this because it documents some issues that are currently present. For example, since you cannot enter the state (e.g., California) you are interested, if multiple cities in a country share the same name, then keep on pressing “map” for each possible choice until you get the one you are looking for.

To get routes between two location, first search for your current position. Click “map” to see it on the map. Right click a point and select “Set as position”. Repeat for your destination but select instead “Set as destination” or click on “Destination” in the search box.

These two features should suffice for now.

Additional resources ##

I guess it might be possible to use MS Mappoint with WINE (not sure if this works) or inside a Windows virtual machine.

This GlobalSat BU-353 GPS receiver seems to be supported by Linux and might work well with tangoGPS or Navit.

This post shows some open source navigation apps.

See this post for a long list of map and GPS programs on Linux.

About Vinh Nguyen



Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>