Difference between revisions of "OSD"

From Navit's Wiki
Jump to: navigation, search
m
m
Line 10: Line 10:
  
 
The button type can be used to provide zoom in/zoom out functionality with [[Gui_internal|gui_internal]] (which does not itself draw any controls onto the map view).
 
The button type can be used to provide zoom in/zoom out functionality with [[Gui_internal|gui_internal]] (which does not itself draw any controls onto the map view).
Example navit.xml contents:
+
Example [[Configuring_NavIt#A_deeper_look_at_the_XML_file|navit.xml]] contents:
  
 
     <osd type="button" x="632" y="516" command="zoom_in" src="osd_plus.png" />
 
     <osd type="button" x="632" y="516" command="zoom_in" src="osd_plus.png" />

Revision as of 09:03, 17 August 2008

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.