+ <section>
+ <title>Routing engine</title>
+ <para>It is possible to declare new routing engines. The file is <filename>~/.viking/routing.xml</filename>.</para>
+ <para>An example of the file in the distribution <filename>doc/examples/routing.xml</filename>.</para>
+ <para>The <classname>VikRoutingWebEngine</classname> allows to declare a routing engine available via HTTP.</para>
+ <para>The related properties are:
+ <variablelist>
+ <varlistentry>
+ <term>id</term>
+ <listitem><para>a string, should be unique as it used to identify the routing engine</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>label</term>
+ <listitem><para>the text displayed in the menu entry</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>url-base</term>
+ <listitem><para>the base URL of the web service (eg. "http://hostname/service?")</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>url-start-ll</term>
+ <listitem><para>the part of the URL setting the starting point location, parametrized in the spirit of C printf format, with 2 "%s" for coordinates (eg. "&start=%s,%s")</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>url-stop-ll</term>
+ <listitem><para>the part of the URL setting the end point location, parametrized in the spirit of C printf format, with 2 "%s" for coordinates (eg. "&stop=%s,%s")</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>url-via-ll</term>
+ <listitem><para>the part of the URL setting via point location, parametrized in the spirit of C printf format, with 2 "%s" for coordinates (eg. "&via=%s,%s")</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>url-start-dir</term>
+ <listitem><para>the part of the URL setting the starting point location for direction based routing, parametrized in the spirit of C printf format, with one "%s" for direction (eg. "&start=%s")</para>
+ <para>(Optional)</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>url-stop-dir</term>
+ <listitem><para>the part of the URL setting the end point location for direction based routing, parametrized in the spirit of C printf format, with one "%s" for direction (eg. "&start=%s")</para>
+ <para>(Optional)</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>referer</term>
+ <listitem><para>an URL to serve as referer for the HTTP request (eg. "http://hostname/")</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>follow-location</term>
+ <listitem><para>the max depth of recursive redirections</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </section>
+
+ <section>
+ <title>Remote File Datasources</title>
+ <para>It is possible to add web references expected to return a file which can then be opened directly or converted via GPSBabel.</para>
+ <para>The file is <filename>~/.viking/datasources.xml</filename>.</para>
+ <para>An example of the file is in the source distribution <filename>doc/examples/datasources.xml</filename>.</para>
+ <para>The <classname>VikWebtoolDatasource</classname> allows to declare any URL using logic based on coordinates.</para>
+ <para>The related properties are:
+ <variablelist>
+ <varlistentry>
+ <term>label</term>
+ <listitem><para>the text displayed in the menu entry</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>url</term>
+ <listitem>
+ <para>the parametrized URL to open in the spirit of C printf format, with up to 9 "%s" values. e.g. <literal>http://hostname/getfile?lat=%s&lon=%s</literal></para>
+ <para>The order and meaning of these parameters is given by the url_format_code below</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>url_format_code</term>
+ <listitem>
+ <para>A string describing the parametrized URL substitution parameters, each character represents how to translate each term.</para>
+ <para>B = Bottom of the current view i.e. minimum latitude</para>
+ <para>L = Left of the current view i.e. minimum longitude</para>
+ <para>T = Top of the current view i.e. maximum latitude</para>
+ <para>R = Right of the current view i.e. maximum longitude</para>
+ <para>A = center lAtitude of the current view</para>
+ <para>O = center lOngitude of the current view</para>
+ <para>Z = OSM Zoom value of the current view. See <ulink url="http://wiki.openstreetmap.org/wiki/Zoom_levels">Zoom Levels</ulink></para>
+ <para>P = selected Point's latitude</para>
+ <para>N = selected poiNt's longitude</para>
+ <para>S = A user specified input string requested from the user via a dialog box</para>
+ <para>Thus for the url example above then the format code should be <emphasis>AO</emphasis></para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>file_type</term>
+ <listitem>
+ <para>This value is passed on for the -i parameter in interfacing with GPSBabel.</para>
+ <para>If it is not defined then the returned file is interpreted internally as a GPX file.</para>
+ <para>Possible values such as 'kml', 'mapsource' etc.. can be used. See <ulink url="http://www.gpsbabel.org/capabilities.html">GPSBabel File Formats</ulink> for the full list.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>babel_filter_args</term>
+ <listitem>
+ <para>This value is passed on for the filter arguments interfacing with GPSBabel.</para>
+ <para>E.g. "-x nuketypes,routes" can be used to filter all routes from the results.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>input_label</term>
+ <listitem>
+ <para>This value is used when requesting input from the user.</para>
+ <para>It is the label of the text input box.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </section>
+