|
FAQ
I'll fill this out as and when I get questions from people, but I've put in some starters to kick it off.
splitter
- What version of splitter should I use?
Download the current version from here.
- Why bother defining your own areas.list? Why not just let splitter automate things?
A) To avoid tiles including large areas of sea, or other countries, that you're not interested in
B) To be able to give each tile a useful description (e.g. Oxfordshire, Piemonte, Languedoc) Update Recent versions of splitter allow the use of the --geonames-file tag which can automatically name each tile after the largest city it contains. See here and here for more details.
- Splitter areas.list files use a coordinate system that I don't recognise. How do I turn lon/lat into this system?
To get from latitude and longitude in degrees to Garmin units multiply by 46603 (which is (2^24)/360). To avoid tile overlap at low zooms make sure that the number is exactly divisable by 2048. Or use my spreadsheet to do the maths for you.
mkgmap
- What version of mkgmap should I use?
Download the current stable version from here. You can use the experimental versions but sometimes you'll find that stuff (even fundamental stuff like routing) is broken.
- Is there a mkgmap mailing list?
Yes. The development mailing list currently acts as a general place to find out about changes to mkgmap, report bugs and ask questions.
- Can you explain how I can have different map layers?
A single map can contain multiple layers. Each layer is drawn on top of the previous in order of draw priority. You can specify the draw priority when compiling the map with mkgmap using the --draw-priority=X option. See here for a little more. Obviously, if you have one layer on top of another, the layer underneath will be invisible unless the layer on top is see-through. You can set this using the mkgmap --transparent option. My personal set-up is as follows:
Top layer (priority=28, transparent): contour lines
Middle layer (priority=25): OSM map
Bottom layer (priority=10): routing layer
- Why might I want separate layers?
You might choose to represent different things in different layers. For instance, you might want to have a contour layer, a cycle routes layer and a bus routes layer. This way, you can activate or deactivate each one as and when you need it. If they were all in one layer the map would be hard to use.
- When you have multiple layers, which does the GPS unit use for routing?
Make sure that only one of your layers contains routable lines (i.e. when compiling with mkgmap, only one layer should be compiled with the mkgmap --route option). If not, it appears that the GPS unit will use the uppermost routeable layer.
- You used to use multiple layers, but now you don't...why?
Some history The main reason I used to make maps with multiple layers was to overcome the fact that Garmin only has one routeable type (0x0c) for roundabouts. This limitation means that (assuming you want to route around roundabouts properly - i.e. with commands that say "take the second exit") all roundabouts have to look the same, no matter whether they are on a 5-lane trunk road or a 1-lane track. To overcome that limitation I used to create an invisible routing layer, which used 0x0c for roundabouts (for routing purposes) and a visible layer (for display purposes) which used lots of different Garmin types for roundabouts depending on what road they were located.
Since mkgmap introduced the continue command to style rules, it is now possible to create multiple Garmin objects from a single OSM object. Thus I for roundabouts I can create a routeable object using 0x0c, then a second display object overlaid on top, that looks nice. The style code looks like this:
# routable roundabouts
junction=roundabout & highway=motorway [0x0c road_class=4 road_speed=5 resolution 24 continue]
junction=roundabout & highway=trunk [0x0c road_class=3 road_speed=5 resolution 24 continue]
junction=roundabout & highway=primary [0x0c road_class=3 road_speed=4 resolution 24 continue]
junction=roundabout & highway=secondary [0x0c road_class=2 road_speed=3 resolution 24 continue]
junction=roundabout & highway=tertiary [0x0c road_class=1 road_speed=3 resolution 24 continue]
junction=roundabout & highway=unclassified [0x0c road_class=1 road_speed=2 resolution 24 continue]
|
Later on, I have simple rules that match each highway type and don't care if it's a roundabout or not, thus ensuring that the colour and size of the roundabout matches the road it is in, e.g.
highway=primary [0x1000c resolution 20]
highway=secondary [0x10014 resolution 20]
etc
|
- How do I create a contour layer?
See here
- The --list-styles option doesn't seem to work - why not?
--list-styles only lists the styles that are built in to the mkgmap.jar file when it was compiled from source. It will not list any styles you create in the resources/styles/ folder. This doesn't mean you can't use those styles (with the --style-file= switch), however.
Styles
- If I have a custom style folder, how do I stop it getting overwritten everytime I upgrade mkgmap?
Move the styles folder tree out of mkgmap and save it somewhere else. Then remember to refer to the correct new directory when you use mkgmap with the --style-file= switch.
- If I do that, then won't I miss any updates to the default style when I install a new version of mkgmap?
Yes, you will. You'll have to keep an eye on the default style if you're worried about this.
- Isn't there a way of importing the default style into my custom style and only overwriting the bits I want to be different from the default?
No, though there has been discussion on the mkgmap-dev mailing list to allow this. Keep an eye on mkgmap updates.
- What do the other files in the style folder control?
See here
- How do I change what colour motorways (say) appear?
Create a TYP file
- How do I add one-way symbols or visual cues for bridges/tunnels?
See this and if you still have questions, email me.
- How do I make roads change style depending on zoom level?
You need to create a series of rules for each road that you want to behave this way. For example:
highway=motorway [0x100001 resolution 18-22 continue]
highway=motorway [0x100002 resolution 23 continue]
highway=motorway [0x100003 resolution 24] |
The continue command at the end of the rule ensures that mkgmap continues to process any OSM object matching the rule highway=motorway until it reaches a rule that doesn't contain continue. If you didn't use continue only the first matching rule would be applied (and in the example above, you wouldn't get any motorways in zoom levels 23 and 24).
Clearly, for this to work you also need to define multiple road types in your TYP file (in the example above, this means 0x100001, 0x100002 and 0x100003).
- I downloaded your TYP file (CFMaster.TYP) but it doesn't work as I expected. Why not?
a) Your map must have a family ID of 1500. b) My TYP file is designed to work with my style. If you are not using my style, CFMaster.TYP is unlikely to have the effect you expect.
- Why do you have two different styles (CF_Mapsource and CF_GPS)?
I have an older Garmin GPS (a GPSMap 76 Csx). This has trouble displaying lines with borders (which is a common way of displaying roads to make them easier to see). In particular, it places a border right around each segment of every road, which creates perpendicular borders across all ways. To see how awful this looks, take a look at these screenshots of my GPS showing a map created using a TYP file that defines borders to roads:

But in Mapsource roads with borders look fine...
So as a result, I have two different styles. CF_Mapsource creates lines with borders for installation in Mapsource, and CF_GPS creates lines with no borders for installation on my GPS unit. In all other respects the two styles are identical. Here are a couple of shots of CF_GPS in action:

You can see lots of screenshots of CF_Mapsource on my screenshots page.
MapSource
- How do I load a map into MapSource?
- Compile your map with the --tdbfile switch
- Download and install MapSetToolkit (see here too for more info)
- Start MapSetToolkit
- Click on Install (bottom right)
- Next to TDB file, click ... and navigate to the folder containing your layer. You should only see one TDB file so select it.
- Next to overview map, click ... and in the same folder select the overview file which by default is either 6324000.img or osmmap.img, unless you have used the
--overview-mapname=foo switch.
- Enter a useful name in the Registry name box
- If you are using a TYP file, you will also need to select that in MapSettoolkit before you click Install
- Click Install
Every map you install into Mapsource must have a different family ID
- Is it possible to have maps with multiple layers in Mapsource?
Yes: see this email. I've managed to combine a routing layer with an OSM layer in Mapsource fine, though I can't seem to get the contour layer to work on top of these two. If anyone has any ideas why, please tell me!
- Why do symbols appear differently in MapSource compared to my GPS?
Sadly, this is just a "Garmin feature". In fact, different versions of MapSource show different icons and there is no obvious way of setting them to be the same as those on the GPS unit you use. It gets worse: MapSource may not show some POIs at all whereas your GPS will. The only solution is to create a custom TYP file which will ensure that the same icons or line-types or polygons are shown in MapSource and on your GPS.
- I have compiled a new version of a map that is already installed via the registry in MapSource, yet MapSource doesn't show any changes. Why not?
Recent MapSource versions use a cache to speed up map rendering. The drawback is that until the cache is refreshed, you will continue to see what is in the cache rather than what is actually in the data. One answer is to pan around, zoom in and out, for a bit until the cache is updated. In Windows, use CTRL+G twice to reset the cache. The following solution is maintained for historical interest, but not needed if you use CTRL+G .
- For Windows Vista users, empty the following folder of all files:
c:\users\YOURUSERNAME\appdata\roaming\garmin\mapsource\tilecache\ where YOURUSERNAME is...your user name.
- The path in other versions of Windows will be slightly different (I expect that it will be something like
c:\documents and settings\YOURUSERNAME\garmin\mapsource\tilecache though I don't have XP so cannot verify this).
- Even better, create a batch file that automates this for you by running the following command (for Vista):
del c:\users\YOURUSERNAME\appdata\roaming\garmin\mapsource\tilecache\*.tile |
Garmin
- What are these hexadecimal type codes?
Internal to every Garmin GPS unit (and to Mapsource) is a predefined set of POI symbols, line types and polygon types. mkgmap, through the style file, decides which POI, line type or polygon type to use for a given OSM node, way or area using the style file rules. GPS unit presets are determined by the firmware and are generally quite similar across units. Mapsource often uses completely different symbols, and to make things worse, the symbols it uses can change between updates. For this reason, you may want to use a TYP file to standardise your maps and ensure that they look the same everywhere.
Each Garmin element is referred to by a hexadecimal code (aka a type code). Obviously, in order to change anthing you need to know what each type code actually corresponds to. There are multiple ways of doing this.
- Look at my spreadsheet which has a fairly comprehensive list of POI codes and the actual default symbols that are used on my GPS (a GPSMap76Csx). There is also a listing of default polygons.
- Use my OSMgenerate programme to generate a grid of POIs or polygons, then turn it into a map with mkgmap and look at it in MapSource or on your GPS unit
- Open the file in the mkgmap directory tree resources/garmin_feature_list.xls which lists all POIs, lines and polygons, but you will have to interpret the hexadecimal code by combining the type ID and the sub-type ID. Also, no symbol images are given
- Read chapter 12.3.1 of the cGPSmapper manual
- Read this page which has the same information as the cGPSmapper manual
- Look at the (incomplete) POI listing on the Openstreetmap wiki page
Other software
- What is sendmap?
Have a read of this
- How can I edit TYP files?
I recommend you use TYPViewer if you want to work offline, or the online editor if not.
|