Use Mkgmap to send maps to your GPS instead of sendmap
I know that many of you dislike closed source programs, I do that too (with the exception that for now I still dualboot to windows because of Garmin Mapsource and some other programs, otherwise I am on the good Ubuntu side of the world)!
However you can also use mkgmap for sending the maps.
1. Get and install mkgmap . Note that Java is required (Sun Java JDK is recommended). I would advise to go with the latest release or compile from source with ANT.
2. a) Now combine all .img and One .TYP (decide on only one of them – .TYP has to be in UPPERCASE.) with the following command from the folder where the maps are extracted to:
(Of course you could also define the .img files by folder, and you probably have to add the path wo mkgmap) This will create a gmapsupp.img file, that you can upload to your GPS in USB mode (place it into /garmin folder on GPS internal memory or memory card)
Note that all 6*.img have to be from the same openmtbmap country file – otherwise only one "country" will show in proper colours. You can instead of deleting all but one typfile replace *.TYP with e.g. clas*.TYP or the full name like clasde.TYP.
-–family-id should be the same number as the first 4 digits of the maps (if you use a different number, you have to adjust the FID inside the .TYP-file). Note every map on your gps needs a different family-id (else they won't be shown).
-–family-name can be set to any value (only use letters and numbers, no Umlauts or symbols) and will be shown as mapname on the GPS maplist.
2 b) if you want to have contourlines (altitude lines) included too, just change the above command from "6*.img" to "6*.img 7*.img" and put the *.img from the contourline download into the same folder before running the above command.
It is now also possible to include several maps with different .TYP files at the same time with mkgmap – the command will get more complex however (read mkgmap mailinglist/docs on how to do this as I have never tried it)!
Alternatively run 2. for each mapset (e.g. "openmtbmap austria", or "Garmin City Navigator" on its own, and then combine the maps with gmaptool
Alternatives for Linux / Mac OSX users
0. You can use gmt (gmaptool) instead.
1. You could also try to use Qlandkarte GT to send the maps to your GPS. Note you may have to compile drivers for your GPS by hand.
2. Alternatively use Mapsource from inside WINE, To send maps put a symbolic link for the driver:
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1
you will need admin rights.
i'm on gentoo and just could get the windoze-stuff to run with wine, but it is possible to create the gmapsupp.img with the program mkgmap directly (which is installable via portage), because calling the mkgmap with java did not work, either. i just copied the command from this website and ran mkgmap with it directly:
mkgmap –family-id=9999 –family-name=openmtbmap –gmapsupp 6*.img clas*.TYP
it put the gmapsupp.img in the same dir and it seems to run on my legend hcx (did not test it muchm though)
THX FOR THE GREAT WORK!
Well then you probably depend on dated mkgmap versions, which may cause trouble depending on how old the bundled mkgmap is. If you cannot call mkgmap via java, most likely you don’t have java jdk (best use Sun Java) properly installed.
thx for the info, i just checked the versions:
in portage (gentoo’s “package-manager”) it’s mkgmap-1903 (which dates from march 2008 according to its manpage), and the latest stable version linked to from osm is mkgmap-1867.
check both in http://www.mkgmap.org.uk/snapshots/ where it just says “March …” which i guess is March 2008.
i tested both versions of mkgmap and running the command (with mkgmap …. and java -jar mkgmap …) and they both work.
THX AGAIN FOR THOSE GREAT MAPS!
Well current is 1905 – so it seems to be really up to date. (1903 is 6 days old)
original command didn't work for me in Ubuntu 10.04, it just didn't show up on my Garmin eTrex Vista HCX
but using
java -Xmx512M -jar mkgmap.jar --gmapsupp map/6*.img map/clas*.TYP --family-name=openmtbmap --family-id=6365it worked. Thanks!!
Hi,
I think you should add some options to the suggested command.
At least, I suggest the following:
–family-name=openmtbmap (This will display in the selection list on the GPS device)
–family-id=6367 (For example is the id of clasit.TYP file, I didn’t check the others)
Specifiyng the family id is necessary (at least in my case) to have the TYP file working on linux, so it would be usefull too the specify somewhere which are the ids of the various TYP file).
Thank’s for your great work.
Anselmo
Hello, the java command above
“java -Xmx512M -jar mkgmap.jar –gmapsupp 6*.IMG clas*.TYP”
should be
“java -Xmx512M -jar mkgmap.jar –gmapsupp 6*.img srtmdbw.TYP”
in my opinion, because e.g. Linux is case sensitive, so .IMG is different from .img. At least the bavarian Map uses lowerCase fileExtensions of the img-Files .
regards and keep up the good work, Andy
Hi,
When I do the mkgmap command and move it to my garmin etrex HCx, it completly ignores the TYP files (displaying it the way it displayes the base map).
Can this be corrected?
Thanks!
Nathan
Did you disconnect your USB drive correctly from your box. I had the same problem and the safety removing of the USB volume solves the problem. Wait until the removing process finished. It needs some time so please be patient.
If I try to run mkgmap in MacOSx, it somehow doesn’t include the TYP file. I always get a yellow map (basic Garmin layout) in my GPS device. Does anyone have a clue what’s wrong here?
@Kai: mkgmap –family-name=Text
I’m trying to combine several maps that cover the same area (openmtbmap, topo srtm for contourlines, and a general routable map).
That basically works, but all three maps show up with the name ‘family name’ in the map selection on the device (Edge 705).
Does anyone know how to change that?
Mapsource allows to rename the maps, but how to do it with mkgmap or another linux tool?
Suggestion to combine .img maps from several countries into a single gmapsupp.img:
Just use a single .TYP file (eg. from the first country).
The following appears to work for me:
java -jar mkgmap.jar –gmapsupp de/6*.img cz/6*.img de/whitede.TYP
assuming de/ contains the maps for germany and cz/ contains the maps for Czech republic.
I have observed that the .TYP files from a certain openmtpmap download for different countries differ by only a single byte anyway (perhaps a timestamp?).
The character before gmapsupp in java -Xmx512M -jar mkgmap.jar –gmapsupp 6*.IMG *.TYP should be two – not –
In html it is 2x–, but somehow it gets formatted to simple – (minus). I’ll try to find out how to insert Code with fckeditor, as there is no dedicated code button.
Interesting problem: I try to make mtbgermany into a gmapsupp.img on FreeBSD (JDK 1.5, JDK 1.6). No matter what I try, mkgmap stops with the message:
SCHWERWIEGEND (BlockManager): overflowed directory with max block 65534, current=65535
There is not enough room in a single garmin map for all the input data
The .osm file should be split into smaller pieces first.
as soon as the gmapsupp.img reaches 512MB. When I do the very same thing on My Mac (OSX 10.4 PPC) from the same input files and with the same version for mkgmap (1041, 1060) it works and produces a file of around 508 MB of size.
Ideas?
Sorry no idea at all. Get in contact with the relevant developpers. JDK 1.6 is usually good.
My unzip (debian lenny) produced files with lowercase names. So "please use UPPERCASE for .TYP under Linux" should better be "adopt IMG and TYP to the case of your file names" under Linux.
O.k. will do in future. Did not know it causes problems under Debian. With Ubuntu it's been allright using lowercase. Note that Qlandkarte GT now supports the Openmtbmap.org too. So you can use the best open platform map manager now too.