Difference between revisions of "Dbus"

From Navit's Wiki
Jump to: navigation, search
m (Zoom)
(Updated and added functions)
Line 7: Line 7:
  
 
=Navit Dbus Methods:=
 
=Navit Dbus Methods:=
==Center map==
+
==Center map (coordinates)==
 +
Centers the view to a absolute position on the map. Useful when looking up for some coordinates (e.g. for bookmarks). pro contains the [[Projections | map projection]] while x and y define the position.
  
 
Name: set_center<br>
 
Name: set_center<br>
Args: (pro, x, y)<br>
+
Args: (int pro, int x, int y)<br>
 +
Returns: (none) <br>
 +
 
 +
==Center map (pixel)==
 +
Centers the map to a specific position on the screen. x and y contain the pixel coordinates on the current map section starting from the upper left.
 +
 
 +
Name: set_center<br>
 +
Args: (int x, int y)<br>
 
Returns: (none) <br>
 
Returns: (none) <br>
  
 
==Set layout==
 
==Set layout==
 +
Sets the map layout
  
 
Name: set_layout<br>
 
Name: set_layout<br>
Args: String: layout name<br>
+
Args: string layout_name<br>
 
Returns: (none)<br>
 
Returns: (none)<br>
  
 
==Zoom==
 
==Zoom==
 +
Zooms into the map if f is positive, otherwise it zooms out. f is the zoom factor and has to be bigger than 1 or smaller than -1. Values between 1 and -1 have no effect. In addition, x and y can be set to zoom into a special point on the screen.
  
 
Name: zoom<br>
 
Name: zoom<br>
Line 25: Line 35:
 
Returns: (none)
 
Returns: (none)
  
Zooms into the map if f is positive, otherwise it zooms out. f is the zoom factor and has to be bigger than 1 or smaller than -1. Values between 1 and -1 have no effect. In addition, x and y can be set to zoom into a special point on the screen.
+
==Set destination==
 +
Sets the destination. pro contains the map projection while x and y define the position. descr is a description for the target
  
==Setting route destinations==
+
Name: set_destination<br>
 +
Args: (int pro, int x, int y), string descr<br>
 +
Returns: (none) <br>
  
Not Implemented
+
==Set position==
 +
Sets the current position. pro contains the map projection while x and y define the position.
  
Name: setRoute<br>
+
Name: set_destination<br>
Args: <br>
+
Args: (int pro, int x, int y)<br>
Returns: none<br>
+
Returns: (none) <br>
  
 
==Getting current position (in coordinates)==
 
==Getting current position (in coordinates)==
 
 
Not Implemented
 
Not Implemented
  
Line 44: Line 57:
  
 
==Getting current speed (in kph/mph/fps)==
 
==Getting current speed (in kph/mph/fps)==
 
 
Not Implemented
 
Not Implemented
  
Line 50: Line 62:
 
Args: (none)<br>
 
Args: (none)<br>
 
Returns: speed in kph/mph<br>
 
Returns: speed in kph/mph<br>
 
  
 
[[category: navit dbus]]
 
[[category: navit dbus]]

Revision as of 07:10, 6 October 2008

This Document displays the requirements and implementation details of the navit dbus interface.

Navit Dbus details:

DBUS Service: "org.navit_project.navit"
DBUS Object Path: "/org/navit_project/navit"
DBUS Interface: "org.navit_project.navit"

Navit Dbus Methods:

Center map (coordinates)

Centers the view to a absolute position on the map. Useful when looking up for some coordinates (e.g. for bookmarks). pro contains the map projection while x and y define the position.

Name: set_center
Args: (int pro, int x, int y)
Returns: (none)

Center map (pixel)

Centers the map to a specific position on the screen. x and y contain the pixel coordinates on the current map section starting from the upper left.

Name: set_center
Args: (int x, int y)
Returns: (none)

Set layout

Sets the map layout

Name: set_layout
Args: string layout_name
Returns: (none)

Zoom

Zooms into the map if f is positive, otherwise it zooms out. f is the zoom factor and has to be bigger than 1 or smaller than -1. Values between 1 and -1 have no effect. In addition, x and y can be set to zoom into a special point on the screen.

Name: zoom
Args: int f[, (int x, int y)]
Returns: (none)

Set destination

Sets the destination. pro contains the map projection while x and y define the position. descr is a description for the target

Name: set_destination
Args: (int pro, int x, int y), string descr
Returns: (none)

Set position

Sets the current position. pro contains the map projection while x and y define the position.

Name: set_destination
Args: (int pro, int x, int y)
Returns: (none)

Getting current position (in coordinates)

Not Implemented

Name: getCurrentPosition
Args: (none)
Returns: coordinate (string)

Getting current speed (in kph/mph/fps)

Not Implemented

Name: getCurrentSpeed
Args: (none)
Returns: speed in kph/mph