Used alone, styles let you choose between predefined elements, that your GPS device or Mapsource already knows about. You can also create or modify TYP files, which let you define your own bitmaps for any element.
Guide to TYP files: http://www.cferrero.net/maps/guide_to_TYPs.html
- http://ati.land.cz/gps/typdecomp/editor.cgi (online editor) (Jan 2014: no longer available - no replacement found.)
- TYPViewer (offline editor)
- TYPWiz (offline editor)
- You can also write in a plain text format which can be compiled by mkgmap into a TYP file.
Compile a TYP File
TYP files written as plain text files have to be compiled.
java -cp "mkgmap.jar:lib/*.jar" uk.me.parabola.mkgmap.main.TypCompiler INPUT_FILE OUTPUT_FILE
Including a TYP file using mgkmap
A TYP file can be included into the gmapsupp.img created by mkgmap simply by including it on the command line. For example:
java -jar mkgmap.jar --gmapsupp --family-id=NNN -c other_options.args mytyp.typ
The family_id of the TYP file must be the same as that given with the family_id option.
At one time the file name needed to be in upper case, this is no longer the true. It is best (necessary?) to put the TYP file last.
Using mkgmap to create TYP files
Since Dec 2011, mkgmap is able to compile a text representation of a TYP file into the binary form of the TYP file. The complete details of the file format as accepted by mkgmap is on the page TYP compile. This is the standard format that is produced by the TYP editors listed above.
Although the family and product id's are contained in the file, these are overridden by the --family-id and --product-id options given to mkgmap. This is therefore a good format to distribute a TYP file as it can be used with any family-id.
To use you just add it as one of the files to mkgmap.
java -jar mkgmap.jar --family-id=909 ... mytyp.txt
This will create a file called
mytyp.typ. If you are creating a gmapsupp file, then after it is compiled
it will automatically be loaded into the gmapsupp.img file that is created.
Same if you are creating a Windows installer, the compiled TYP file will be included.