As promised, here’s my follow-up how-to in making installers of OSM Garmin maps. My previous post outlines the process for making a routable map for Garmin GPS using mkgmap. For this post, I will guide you in how you can view the maps in Garmin’s desktop application MapSource and RoadTrip
Building the Garmin map
The routing functionality is now in the trunk version of mkgmap, so this time, we will use the trunk version. I also made a couple of changes suggested by other mkgmap developers.
Get latest trunk svn snapshot, in the terminal type the following:
svn co http://svn.parabola.me.uk/mkgmap/trunk trunk
Build the source
java -jar dist/mkgmap.jar
Build the map
The exact command I use is below (remove the “\” and type the syntax in one line):
java -Xmx512m -jar dist/mkgmap.jar --code-page=1252 --tdbfile --gmapsupp \
--latin1 --country-abbr=PHI --country-name=PHILIPPINES --road-name-pois --add-pois-to-areas \
--no-poi-address --family-id=639 --family-name="OSM_PHIL" --overview-mapname=40000001 \
--route --description="OSM_PHIL" /path/to/your/osm/file/philippines.osm
mkgmap will create several files:
- 63240001.img – the main map
- 40000001.img – the overview map
- 40000001.tdb – tdb file
We will use these files to create an installer for MapSource.
Installer for Windows MapSource
To be able to view the maps within MapSource, we need to create a custom registry configuration. We will place the maps in c:/osm so the registry should instruct MapSource to read the files from this path.
Handcraft a registry information for MapSource
Open a text editor and paste these lines:
Save the file as 40000001.reg.
If you already saved your maps to c:\osm, you can double-click the 40000001.reg file to save the registry information.
You can now open MapSource to view the maps.
If you want (like me) to share your maps to other Mapsource users, it would be better to make an executable installer. This way, other users can easily install and view the maps within Mapsource and then upload directly to the GPS units.
Prepare an executable installer
I am using WinRar to create the executable file. The executable archive file simply extracts all the map data into c:/osm and then automatically add the registry information in the 40000001.reg file. The following screenshots explains the procedure (warning XP screenshots below):
Right-click on the directory of you map and click “Add to archive”.
Within WinRar’s “General” tab, select “Create SFX archive”.
In the “Advance” tab, click “SFX options” button.
In the “Advanced SFX options” “General” tab, type
c:\osm in the “Path to extract” and in the “Run after extraction”, type
Click “OK” and WinRar will create a file with the “exe” extension.
For Mac’s RoadTrip
Garmin also has RoadTrip as a Mac version of MapSource. For adding the maps to Mac’s RoadTrip, you can use a simple Python-based app called Gmapibuilder . Just follow the instructions from the above link.
Here is Makati in RoadTrip (I actually prefer RoadTrip’s simpler interface than Mapsource):
1. Changed svn url for trunk.
2. Revised mkgmap syntax and registry