
Tricks with mkgmap style files
Tutorials for mkgmap style files with examples!
Use Mapuploader 6 to quickly create the desired effects.
What are style files? Check out
Tricks with mkgmap Styles 1.pdf | unknown tags,upper lower case, using NOT, housenumbers postcodes,pois to lines,giving bikeroutes a separate colour, not free car parks, show addresses, 4 color polygons/lines, basemap with highways, giving polygons outlines | |
Tricks with mkgmap Styles 2.pdf | Using continue,display names of unknown tags/fixmes, buildings,fontsizes of places,country specific bus stops/ motorways etc | |
Tricks with mkgmap Styles 3 | Abbreviations String tricks, (Left$,Mid$,Right$) Showing Fixmes |
|
Tricks with mkgmap Styles 4 | How to use Echotags to analyse rendering problems | |
Tricks with mkgmap Styles 5 | How to get large names of towns on your GPS device. How to get a multipolygon's inner sections to appear in mkgmap Problems with boundaries Creating refs from words in a name |
|
Tricks with mkgmap Styles 6 | How to use if then else | |
How to ensure multiple tags are plotted, ie natural=* & landuse=* | ||
Tricks with mkgmap Styles 8 | Abbreviating Street names depending on their length | |
![]() |
![]() |
![]() |
Oneway Arrows | Woods with Outlines | Avoid Private Highways |
![]() |
![]() |
![]() |
Showing Address Numbers | Showing Inclines | Icons Showing Hiking Routes |
![]() |
![]() |
|
Draworders of Lines | Inner Multipolygon with Outline |
|
How to show 'arrowed lines' on one way roads and make them routable!
The following routine works on all devices and Basecamp/Mapsource. The principle is to add an invisible routing line to a one way highway.
Example for residential:
highway=residential & oneway!=* [0x06 road_class=0 road_speed=1 resolution 24]
highway=residential [0x12 road_class=0 road_speed=1 resolution 24 continue] # invisible routable line
highway=residential [0x10600 resolution 24] #extended line showing arrow
Adjust code to capture the useless 'oneway=no' , for example
oneway=no {delete oneway)
mkgmap automatically reverses nodes when oneway=-1 (minus one)
Ideally, use Garmin's 0x6 (and not 0x12) for residential routing purposes and make it transparent.
Then create two extended lines,one for 'not oneway' and another for 'oneway'
There are several ways depending on whether you want your map to route for all modes of transport , and legs as well
One of the safest - often used by Garmin - is to decide
1) on one mode of transport, ie pedestrian or bicycle
2) only use routable types (see below) for highways which allow bikes (pedestrians) - this cuts down on number of routable lines and thus speeds up the search for a route !
3) display any highway where bikes are not allowed as an extended type, ie using number 100+
4) In your typ file have copies of highways , as seen in Garmin typ files.
5) in you lines sheet filter out all access occasions where pedestrians (bikes) are NOT allowed -
highway=motorway|highway=motorway_link { add bicycle=no; add foot=no }
highway=residential & (access=private|access=no) & foot!=yes [0x11b00 resolution 24 ] # private housing estate
What are routable types?0x1 - 0x13 , 0x16 , 0x1a , 0x1b
How to outline Woods & other PolygonsPolygons can have outlines of ANY thickness or ANY pattern , striped dotted etc, or ANY Color
Notice forest with exaggerated outline and woods/residential area with striped outline.
Lines are parsed before Polygons - see pdf for more details
How to show housenumbers/postcodes.
Recently,OSM address pois can be used for address searches although in a limited way - see mapuploader6 They can , however, always be plotted on your map.
Insert the following in your POINTS file
addr:housenumber=* { set name='${addr:housenumber}' } [0x1e04 resolution 24 continue ]
addr:postcode=* { set name='${addr:postcode}' } [0x1e04 resolution 24 continue ]
Add a new poi to your TYP file with number 1e04 ; this will centralise your poi on the coordinates supplied.
Make the poi transparent with width and height set to 1.
Note : If you don't add 'continue' , some POIs may not be rendered.
How to show steep hills using a symbol
In your points file add:
mkgmap:line2poi=true & mkgmap:line2poitype=mid & (incline=up |incline=down | incline=yes | incline=steep) [0xXXXX resolution 24]
use --add-pois-to-lines option and create a poi 0xXXXX in your typ file
How to show hiking or cycling routes using matching symbolsYou can show symbols of a route by
1) creating a new poi in your typ file showing the symbol
2) Adding a condition in your Relations file This applies to a route with a reference=ABC -
check reference of route and substitute.
(route=foot | route=hiking) & ( ref ='ABC') { apply { set route_evw='$(route_abc):${ref}'|'${ref}' } }
For additional step by step help with clear illustrations see Creating OSM relations
3) Adding the following in your points file
mkgmap:line2poi=true & mkgmap:line2poitype=start & route_abc=* [0 x XXXX resolution 24] # ie XXXX = 3301
4) use --add-pois-to-lines option