Difference between revisions of "Configuration"

From Navit's Wiki
Jump to: navigation, search
(General Options: now a bit lightweight)
 
(59 intermediate revisions by 14 users not shown)
Line 1: Line 1:
Navit is highly modular and customizable. This page aims to point out the most common options which a first-time user may want to change - power users may want to consult [[Configuring_Navit/Full_list_of_options | the full list of options]].
+
Navit is highly modular and customizable. This page aims to point out the most common options which a first-time user may want to change - power users may want to consult [[Configuration/Full_list_of_options | the full list of options]].
 +
It is also possible to edit the navit.xml file for your Android device under Windows and Linux (Debian/Ubuntu derivates) with a third party application called [[NavitConfigurator]].
  
Setting up Navit is done by editing a configuration file called "'''navit.xml'''".Editing this file in a text editor is simple, it's just a plain text XML file, that can be edited with any editor. Just remember to ''turn off 'save UTF8 byte mark' in Preferences'' or navit may complain very much on the first byte of the file.<br>
+
Setting up Navit is done by editing a configuration file called "'''navit.xml'''".
The file is splitted into sections within a hierachie:
+
Editing XML configurations files in a text editor is simple, they are just plain text XML files, that can be edited with any editor. Just remember to ''turn off 'save UTF8 byte mark' in Preferences'' or navit may complain very much on the first byte of the file.<br>
<pre>
+
The XML configuration file is splitted into sections within a hierarchy:
 +
<source lang="xml">
 
<config>
 
<config>
 
   <plugins></plugins>
 
   <plugins></plugins>
Line 14: Line 16:
 
   </navit>
 
   </navit>
 
</config>
 
</config>
</pre>
+
</source>
  
Navit comes '''preshipped''' with an default navit.xml that is stored at various locations (depending on your system):
+
Navit comes '''preshipped''' with a default navit.xml together with navit_layout_*.xml files that are stored at various locations (depending on your system). For Linux-like OSes:
* in ~/.navit/navit.xml : e.g : /home/myusername/.navit/navit.xml (This is probably to best place to customize your settings!)
+
* in ~/.navit/ : e.g : /home/myusername/.navit/navit.xml (This is probably to best place to customize your settings!)
 
* in /usr/share/navit or /etc/navit
 
* in /usr/share/navit or /etc/navit
  
 
Navit will apply settings in the following order:
 
Navit will apply settings in the following order:
 
* in the current directory (used on Windows)
 
* in the current directory (used on Windows)
* location supplied as first argument on the command line, e.g.: navit /home/myusername/navittestconfig.xml (Used mainly for development)
+
* location supplied as first argument on the command line, e.g.: navit /home/myusername/navittestconfig.xml (Used mainly for development)
 
* in the current directory as navit.xml.local (Used mainly for development)
 
* in the current directory as navit.xml.local (Used mainly for development)
  
 
{{note
 
{{note
|In any case, you have to '''adapt settings''' to your system!<br> This includes especially GPS, map provider and vehicle!
+
|In any case, you have to '''adapt settings''' to your system!<br> This includes especially GPS, map provider and vehicle: [[Basic configuration]]
 
}}
 
}}
  
Line 42: Line 44:
 
Common options such as units, position, zoom and map orientation, ... be configured in this section.
 
Common options such as units, position, zoom and map orientation, ... be configured in this section.
  
[[#General Options| General options.]]
+
[[Configuration/General_Options| General options.]]
  
 
|}
 
|}
Line 58: Line 60:
 
A large number of display properties can be configured, including desktop or touchscreen-optimised GUIs, on-screen display items and complete control over menu items.
 
A large number of display properties can be configured, including desktop or touchscreen-optimised GUIs, on-screen display items and complete control over menu items.
  
[[#Display Options| Display options.]]
+
[[Configuration/Display_Options| Display options.]]
  
 
|}
 
|}
Line 74: Line 76:
 
A number of vehicles can be defined within Navit, depending upon the device and/or operating system in use. Vehicle profiles for routing (eg: car, pedestrian, bicycle...) are also completely configurable.
 
A number of vehicles can be defined within Navit, depending upon the device and/or operating system in use. Vehicle profiles for routing (eg: car, pedestrian, bicycle...) are also completely configurable.
  
[[#Vehicle Options| Vehicle options.]]
+
[[Configuration/Vehicle_Options| Vehicle options.]]
  
 
|}
 
|}
Line 92: Line 94:
 
You can use maps from a variety of sources, any number of maps can be configured and enabled at any one time.
 
You can use maps from a variety of sources, any number of maps can be configured and enabled at any one time.
  
[[#Maps Options| Maps options.]]
+
[[Configuration/Maps_Options| Maps options.]]
  
 
|}
 
|}
Line 105: Line 107:
 
| style="margin:2px; padding:10px;" |
 
| style="margin:2px; padding:10px;" |
  
Maps are displayedaccording to the rules defined in the layout. All aspects of the layout are configurable, from POI icons to colours for a particular type of highway.
+
Maps are displayed according to the rules defined in the layout. All aspects of the layout are configurable, from POI icons to colours for a particular type of highway.
  
[[#Layout Options| Layout options.]]
+
For all versions shipped after nov 2018, layout XML configuration is stored in dedicated XML files called with the prefix '''navit_layout_''' (one file per layout definition).
 +
 
 +
[[Configuration/Layout_Options| Layout options.]]
  
 
|}
 
|}
Line 122: Line 126:
 
There are many more options, including debugging, specific plugins, speech announcements,  trip logging, ...
 
There are many more options, including debugging, specific plugins, speech announcements,  trip logging, ...
  
[[#Advanced Options| Advanced options.]]
+
[[Configuration/Advanced_Options| Advanced options.]]
  
 
|}
 
|}
Line 129: Line 133:
 
|}
 
|}
 
</div>
 
</div>
 
==General Options==
 
Settings which affect Navit's general behaviour are located within the <tt><navit .. ></tt> tag. In a default installation, this is found on line 31 of <tt>navit.xml</tt>. By default, the <tt>navit</tt> tag is set as follows:
 
 
<navit center="4808 N 1134 E" zoom="256" tracking="1" orientation="-1" recent_dest="10">
 
 
Some common attributes are discussed below. For more advanced features, see [[Configuring_Navit/Full_list_of_options | the full list of options]].
 
 
===Initial map position===
 
On Navit's very first startup, it needs a '''center''' to look at on the map. By default this is set to Munich in Germany, which is conveniently covered by the sample map created on installation.
 
 
center="4808 N 1134 E"
 
 
Latitude and longitude are multiplied by 100 (here Munich is at 48.08N 11.34E in decimal degrees). Coordinates must use the WGS-84 projection. You can use decimal degrees
 
 
center="[-][D]D.x[x]... [-][D][D]D.x[x]" <!--what is that???? Give the reader an example please!-->
 
 
where D = degrees and x = fractions of a degree. You can also use decimal minutes
 
 
center="[D]DMM.xxx N/S [D][D]DMM.yyy E/W"
 
 
where D = degrees, M = minutes and x/y = fractions of a minute. You can use N or S to denote North or South, and E or W to denote East or West. Lastly, you can use [[FAQ#Weird_coordinates_in_bookmarks.txt_and_centre.txt | hexadecimal coordinates]]
 
 
center="[-]0xX [-]0xX"
 
 
To determine a specific latitude and longitude for your location you can use http://itouchmap.com/latlong.html.
 
 
After Navit has started for the first time, it will write its current location to [[center.txt]] (located in the Navit home directory) and ignore the current center value.
 
 
When Navit starts, it will display the map at a pre-defined '''zoom'''. The default zoom level is 256. The lower the value, the closer you will be zoomed in. <!---what does the zoom number express? How can I estimate it?-->
 
 
zoom="256"
 
 
For those using the [[SDL GUI]], a level of 128 is recommended.
 
 
zoom="128"
 
 
Note that once Navit has started, the zoom level can be altered using [[OSD]] or menu items.
 
 
 
Use the '''orientation''' attribute to orient the map in either the direction of travel, or oriented North. .To orient the map in the direction of travel:
 
 
orientation="-1"
 
 
or to orient North:
 
 
orientation="0"
 
 
Orienting the map North whilst in [[3D]] mode will provide visually confusing results, and is not recommended. When in 3D mode, it's best to have the map oriented in the direction of travel.
 
 
===Autozoom===
 
Navit has the ability to '''autozoom''' the map in or out dependent upon your speed.
 
 
autozoom_active="1"
 
 
To de-activate autozoom:
 
 
autozoom_active="0"
 
 
===3D pitch===
 
Navit has the capability to display either a 2D map (bird's eye perspective) or a [[3D]] map (some amount of tilt looking to the horizon). Navit's default configuration is to startup in the 2D perspective but it is possible to specify that Navit start with a 3D perspective. The amount of tilt is specified by setting the value of <tt>pitch</tt>.
 
 
The '''pitch''' value defines default camera tilting, with a value from 0 to 359. Note that usable values lie between 0 and 90 where 0 is bird's eye perspective looking down and 90 is human perspective looking forward. Also note that values closer to 90 will slow down map drawing, because the line of sight gets longer and longer and more objects are seen.
 
 
For example, the following added to the <tt>navit</tt> tag will force Navit to start with a pitch of 30 degrees:
 
 
pitch="30"
 
 
===Imperial units===
 
By default, Navit use the metric system of measurements when displaying or announcing distances, speeds etc. However, you can configure Navit to display and announce these values in imperial units. Simply add an <tt>imperial</tt> attribute to the Navit tag, and set its value to 1, as shown below:
 
 
imperial="1"
 
 
Speeds should now be displayed in units of miles-per-hour, whilst distances are converted to miles (large distances) and feet (small distances).
 
 
==Display Options==
 
The Navit display is highly customisable, from choosing the type of graphics driver most appropriate for your system, to displaying on-screen widgets (known as On-Screen Display items, or OSDs) to show the next turn or current speed, to configuring the menu of certain user interfaces.
 
 
===Graphics Driver===
 
The first thing to do is choose the graphics driver appropriate for your system. Note that you may not have to change this setting at all, as during the build (or in the provided packages) the <tt>navit.xml</tt> may well have been modified for your system.
 
 
The graphics driver tag is found on line 34 of the default <tt>navit.xml</tt>, and may look like the following example:
 
 
<graphics type="gtk_drawing_area"/>
 
 
The current list of available graphics drivers are as follows:
 
 
* '''gtk_drawing_area''' - useable with the <tt>gtk</tt> or <tt>internal</tt> GUIs (see next section). This graphics driver is usually most appropriate on Linux systems.
 
* '''opengl''' - useable only with the <tt>cegui</tt> GUI.
 
* '''qt_qpainter''' - useable with the <tt>internal</tt> or <tt>qml</tt> GUIs. This driver can render inside an X window or on top of Qt Palmtop Environment.
 
* '''sdl''' - useable with the <tt>internal</tt> GUI. Can render inside an X window, or direct to the Linux framebuffer, without very many dependencies on external libraries.
 
* '''win32''' - useable with <tt>gtk</tt> or <tt>internal</tt> GUIs for Windows systems only.
 
 
As mentioned, it's usually best to leave this as whatever the default is within your <tt>navit.xml</tt>, and only mess around with it if you know what you are doing, or have been told to by one of the developers.
 
===General User Interface (GUI) Type===
 
You can now choose which type of GUI you would like to use with Navit. There are currently two mature options, and a few alpha-stage GUIs which will only be of interest to developers.
 
 
====Internal GUI====
 
[[Image:OSDSimple.png|200px|thumb|Example of Internal GUI with OSD]]
 
The first GUI is called '''<tt>internal</tt>''' and is primarily aimed at touchscreen devices, or those devices with small screens (such as netbooks). However, this GUI also works very well on desktops and laptops.
 
 
This GUI is enabled by default in <tt>navit.xml</tt>, on line 44
 
 
<gui type="internal" enabled="yes">
 
 
More detail on the <tt>internal</tt> GUI - including configuration settings and a run-through of the default menu - [[Internal_Gui|can be found on the <tt>internal</tt> GUI page]].
 
 
=====Menu=====
 
The menu presented in the <tt>internal</tt> GUI (after clicking the map) is also defined within <tt>navit.xml</tt>. As a result, you can customise the menu to change the home page, re-arrange the order of options, alter the icons shown or any number of other things. To give you an idea of what can be achieved, have a look at some alternative menu configurations at [[Internal_GUI/Menu_configurations]].
 
 
=====Options=====
 
A number of options specific to the <tt>internal</tt> GUI are available. These include:
 
 
* <tt>font_size</tt> - Base text size to use within the <tt>internal</tt> menu.
 
* <tt>icon_xs</tt> - The size that extra-small style icons should be scaled to (e.g. country flag on town search).
 
* <tt>icon_s</tt> - The size that small style icons should be scaled to (e.g. icons of <tt>internal</tt> GUI toolbar).
 
* <tt>icon_l</tt> - The size that large style icons should be scaled to (e.g. icons of internal GUI menu).
 
* <tt>menu_on_map_click</tt> - Toggles the ability to bring up the menu screen when clicking on the map. See the [[Internal_Gui#Menu_Configuration|<tt>internal</tt> GUI page]] for more information.
 
 
An example <tt>gui</tt> tag using the previous options is shown below:
 
 
<gui type="internal" enabled="yes" font_size="250" icon_xs="48" icon_s="48" icon_l="64">
 
 
More options are discussed on the [[Internal_Gui|<tt>internal</tt> GUI page]] and [[Configuring_Navit/Full_list_of_options | the full list of options]].
 
 
====GTK GUI====
 
[[Image:Navit-liberation.png|200px|thumb|Example of GTK GUI]]
 
The second GUI is called '''<tt>gtk</tt>''', and is most useful for those users who wish to use a traditional windowed GUI. Whilst it used to be the default Navit GUI, it may still be useful to desktop use.
 
 
To enable this GUI type, first disable the <tt>internal</tt> GUI on line 44:
 
 
<gui type="internal" enabled="no">
 
 
...and enable the <tt>gtk</tt> GUI on line 38:
 
 
<gui type="gtk" enabled="yes" ... />
 
 
=====Menu=====
 
All menu options are found on the toolbar and menubars. Some status messages can be found on the statusbar.
 
 
=====Options=====
 
A number of options specific to the <tt>gtk</tt> GUI are available. These include:
 
 
* <tt>menubar</tt> - enable/disable the menubar
 
* <tt>toolbar</tt> - enable/disable the toolbar
 
* <tt>statusbar</tt> - enable/disable the statusbar
 
 
The following example (from the default <tt>navit.xml</tt>) shows the <tt>gui</tt> tag with the previous options, with all bars enabled (set the value to "0" to disable a specific bar).
 
 
<gui type="gtk" enabled="yes" menubar="1" toolbar="1" statusbar="1"/>
 
 
====Other GUI types====
 
Other GUI types which may be available to you include:
 
 
* '''<tt>cegui</tt>''' - This GUI type has now been superseded by the <tt>internal</tt> GUI type.
 
* '''<tt>qml</tt>''' - This GUI, currently under stalled development, is designed to be a replacement for the <tt>internal</tt> GUI. More information can be found on the [[Gui_QML| QML GUI page]]. This GUI type only works with the <tt>qt_qpainter</tt> graphics driver.
 
 
====Generic GUI Option====
 
There are some options available for the <tt>gui</tt> tag which are used by all the GUI types. These include:
 
 
* <tt>fullscreen</tt> - Enables Navit to start in fullscreen mode.
 
* <tt>pitch</tt> - The pitch value to pitch the map to when selecting 3D mode from the menus.
 
 
The following example uses the <tt>internal</tt> GUI, and starts Navit up in fullscreen mode, and will pitch the map to 35 degrees when 3D mode is selected from the menu. Note that to start Navit in 3D mode by default, [[#Initial 3D pitch|change the <tt>pitch</tt> value in the <tt>navit</tt> tag]]:
 
 
<gui type="internal" enabled="yes" fullscreen="1" pitch="35">
 
 
==Vehicle Options==
 
It's important to understand the separate but linked Navit concepts of a <tt>vehicle</tt> and <tt>vehicleprofile</tt>.
 
 
A <tt>vehicle</tt> defines the source of positional data (such as a USB GPS device), and how to present that data to the user on the map.
 
 
==Maps Options==
 
 
==Layout Options==
 
 
==Advanced Options==
 
The rest of this webpage is meant for advanced/power users who'd like to fiddle a little more under-the-hood. The average user can safely ignore this section!
 
 
===Debugging===
 
 
===Bookmarks===
 
 
 
 
 
 
 
 
  
 
<!-- Following line disables table of contents -->
 
<!-- Following line disables table of contents -->
 
__NOTOC__
 
__NOTOC__
 +
 +
[[Category:Customizing]]
 +
[[Category:Configuration]]

Latest revision as of 22:39, 1 January 2019

Navit is highly modular and customizable. This page aims to point out the most common options which a first-time user may want to change - power users may want to consult the full list of options. It is also possible to edit the navit.xml file for your Android device under Windows and Linux (Debian/Ubuntu derivates) with a third party application called NavitConfigurator.

Setting up Navit is done by editing a configuration file called "navit.xml". Editing XML configurations files in a text editor is simple, they are just plain text XML files, that can be edited with any editor. Just remember to turn off 'save UTF8 byte mark' in Preferences or navit may complain very much on the first byte of the file.
The XML configuration file is splitted into sections within a hierarchy:

<config>
  <plugins></plugins>
  <navit>
    <osd></osd>
    <vehicle></vehicle>
    <vehicleprofile></vehicleprofile>
    <mapset></mapset>
    <layout></layout>
  </navit>
</config>

Navit comes preshipped with a default navit.xml together with navit_layout_*.xml files that are stored at various locations (depending on your system). For Linux-like OSes:

  • in ~/.navit/ : e.g : /home/myusername/.navit/navit.xml (This is probably to best place to customize your settings!)
  • in /usr/share/navit or /etc/navit

Navit will apply settings in the following order:

  • in the current directory (used on Windows)
  • location supplied as first argument on the command line, e.g.: navit /home/myusername/navittestconfig.xml (Used mainly for development)
  • in the current directory as navit.xml.local (Used mainly for development)

Configurable Sections[edit]

General

Common options such as units, position, zoom and map orientation, ... be configured in this section.

General options.

Display

A large number of display properties can be configured, including desktop or touchscreen-optimised GUIs, on-screen display items and complete control over menu items.

Display options.


Vehicle

A number of vehicles can be defined within Navit, depending upon the device and/or operating system in use. Vehicle profiles for routing (eg: car, pedestrian, bicycle...) are also completely configurable.

Vehicle options.

Maps

You can use maps from a variety of sources, any number of maps can be configured and enabled at any one time.

Maps options.

Layout

Maps are displayed according to the rules defined in the layout. All aspects of the layout are configurable, from POI icons to colours for a particular type of highway.

For all versions shipped after nov 2018, layout XML configuration is stored in dedicated XML files called with the prefix navit_layout_ (one file per layout definition).

Layout options.

Advanced

There are many more options, including debugging, specific plugins, speech announcements, trip logging, ...

Advanced options.