I was having trouble downloading the maps for RoadNav, and I didn’t notice a lot of progress or change on the problem. So, I checked for alternatives, and I found this. I tried the first on the list: NavIt.
First, I had to install the dependencies so that I could compile it. I installed the list from the dependencies section.
sudo apt-get install build-essential pkg-config automake libglib2.0-dev libtiff-dev libtool libxmu-dev libfribidi-dev gettext zlib1g-dev gpsd gpsd-clients libgps-dev libgtk2.0-dev freeglut3-dev glutg3-dev libcegui-mk2-dev libdevil-dev libglc-dev libpcre3-dev libmng-dev libfreeimage-dev
Next, I ran the configure and make. Instead of installing, I just ran it from the directory where I compiled it.
At this point, I had it working as long as I ran it from the directory where the program exists. But, it didn’t have any maps for my area. Next, I had to tackle configuring with the XML file.
First, I created a hidden directory and copied the xml file to it:
$ mkdir ~/.navit
$ cp /home/skp/bin/navit-0.1.0/navit/navit.xml /home/skp/.navit/
Next, I opened the xml file with Gvim (my favorite text editor). “Gvim ~/.navit/navit.xml”. You could use any text editor to open it.
The first change I made was to change the default position. I got my default coordinates from here as suggested in the Wiki. I found that these coordinates got me close, but not quite the address I had requested. So, I checked them with Google maps. If you notice, the URL on the “Link” link in the upper right corner has the coordinates of the map you request.
I tried to run it at this point from my home directory, but it would not work. It was looking in other directories, and so, I took the easy route and just keep running it from the source directory. It still read my xml file from my home directory.
Next, I had to setup the maps. I followed these directions. I used the maps from CloudMade, which has maps of the United States. I downloaded the *.navit.bin.zip files and extracted them to ~/.navit/. For example, I downloaded the Florida map: florida.navit.bin.zip to ~/.navit/florida.navit.bin. Finally, I added this to the XML file:
<map type=”binfile” enabled=”yes” data=”/home/skp/.navit/florida.navit.bin” />
Now, when I started it up, I saw a map with where I wanted it to start!
Creating a Shortcut
The last thing I did was create a shortcut in my application menu. This was pretty easy.
The first step was to create a simple shell script to launch the program. This was necessary because the program has to run from the source folder. Here is what my script looked like:
Note: change the cd path to the location where you downloaded and compiled the program.
Then, make the script executable with:
chmod +x navit.sh
To add the menu, I used the Menus application by right clicking on the Applications menu and choosing “Edit Menus”. I clicked on the Accessories menu and clicked the New Item button. Here are the options that I chose:
- Type: Application
- Name: NavIt
- Command: /home/skp/bin/navit.sh
- Comment: <blank>
Note: change the Command path to the script that you created to launch the program.
For the icon, I clicked on the little spring icon on the left to choose a different icon. For the path, I chose: /home/skp/bin/navit-0.1.0/navit/xpm/desktop_icons/128×128.
To troubleshoot, you may want to change the Type from Application to Application in Terminal because the terminal window will show you the output messages from the program.