From Navit's Wiki
Revision as of 21:26, 22 August 2008 by SlowRider (talk | contribs)
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="48" y="336" command="zoom_in" src="zoom_in.xpm" />
   <osd type="button" x="48" y="96" command="zoom_out" src="zoom_out.xpm" />

The x and y coordinates depend on your screen resolution and the size of your bitmaps. The origin is at the upper lefthand corner of the screen. Use negative values to position the buttons relative to the right resp. bottom edge of the screen.

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.