# Command Line

## Overview

&appname; being a Graphical User Interface program only has a few command line options.

&dhpackage;

program to manage GPS data

          &dhpackage;

            -d
            --debug

            -V
            --verbose

            --latitude degrees

            --longitude degrees

            -z
            --zoom ZoomLevelOSM

            -m
            --map MapId

          file

          &dhpackage;

            -h
            --help

          &dhpackage;

            -v
            --version

####

## Details

Note that the ordering of files can be important depending on their file type. Subsequent non Viking project files are loaded into the previous Viking project, with the files being processed left to right. Some examples:

- `viking file1.gpx file2.gpx file3.gpx`

  Here all GPX files are loaded into a new &appname; project in one window.

- `viking file1.vik file2.vik`

  Each &appname; project file is opened in a new window.

- `viking file1.vik file2.gpx file3.gpx`

  The GPX files are loaded into the &appname; project in one window.

- `viking file2.gpx file3.gpx file1.vik`

  The GPX files are loaded into a new &appname; project in a one window and the &appname; project is loaded seperately in a seperate window.

## Command Line Reference

Short Option | Long Option | Description
-h | --help | Show the command line options and then exit.
-V | --verbose | Run in verbose mode. Some information about what &appname; is doing is shown in stdout.
-d | --debug | Run in debug mode. Even more information about what &appname; is doing is shown in stdout. This also enables some extra information features in the GUI itself, primarily of interest to developers.
-v | --version | Show the version and then exit.
N/A | --latitude | Set the initial position to the specified latitude in decimal degrees.
N/A | --longitude | Set the initial position to the specified longitude in decimal degrees.
-z | --zoom | Set the initial zoom level. The value is the OSM zoom level (0 - 22).
-m | --map | Add a map layer by specifying the map id. The value needs to match one of the internal ids or an id from the map_source. Specifying a value of 0 will use the configured map layer default.

- Internal Map Ids:

- OSM Mapnik = 13

- OSM Cycle = 17

- Mapquest OSM = 19

An example to open at a specified location with an OSM Mapnik map layer:

    viking --latitude 51.4 --longitude -1.3 --zoom 12 --map 13

If a file is also specified on the command line, the command line location and zoom parameters will take precendence.

As a special combination when both -V and -d are both enabled at the same time, &appname; will not delete some of the temporary files created during the program run. This is especially useful to monitor results of download requests (which need to be interpreted) if they suddenly start failing, as the file will have often more detailed information about the failure mode.

&appname; being a GTK+ program means some options are processed by GTK+ itself such as --display. Use the following to find out what they are for your system:

    viking --help-gtk