OSD

From Navit's Wiki
Revision as of 05:47, 22 June 2008 by Rphlx (talk | contribs) (On Screen Display)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The On Screen Display (OSD) provides status information and controls blended directly onto the map.

Current (2008-06-21 svn) OSD types:

  • compass
  • eta
  • navigation
  • street_name
  • button

The button type can be used to provide zoom in/zoom out functionality with gui_internal (which does not itself draw any controls onto the map view). Example navit.xml contents:

   <osd type="button" x="632" y="516" command="zoom_in" src="osd_plus.png" />
   <osd type="button" x="716" y="516" command="zoom_out" src="osd_minus.png" />

You will need to provide your own osd_plus.png and osd_minus.png to use this example (they are not in navit svn yet).

You can determine the supported xml options for each OSD type by reading navit/osd/core/osd_core.c, searching for "attr_xxx" inside the osd_xxx_new() functions. Most types have at least an "x" and "y" option that determine the location of their OSD.

The OSD layer is still under development.