# Details

File Reference

Values | Description
--- | ---
file(s) | Read the specified files in sequence left to right
- | Read input from standard in. No other files should be specified

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 . Specifying a value of 0 will use the map layer default. Specifying any negative value e.g. -2 will not show a map (overriding the GUI preference that automatically adds one at startup)
-e | --external | The files specified on the command line will be loaded in as external files as per the External reference: method. Applies to GPX, FIT, KML or TCX types, thus has no effect on .vik files.
-c | --config-dir | Use an alternate location (which will be created if it does not exist) for the configuration directory. This is useful for using/trying specific configuration values for a particular session without changing ones normal settings.
-r | --running-instance | Opens the specified files in an already running instance of &appname;. If no instance is available than the files will not be opened. Positional and map option parameters are not used or passed on to the running instance. This option is not available on Windows

Internal Map Ids

Map | Id
--- | ---
4UMaps | 801
Bing Aerial | 212
Blue Marble | 15
CalTopo | 29
CyclOSM | 65
pnvkarte Public Transport | 101
OpenSeaMap | 600
OpenTopo | 901 (current default)
OSM Cycle | 17
OSM Humanitarian | 22
OSM Mapnik | 13
OSM Transport | 20
OSM GPS Traces | 33
Waymarked Trails Cycling | 702
Waymarked Trails Hiking | 701
Waymarked Trails MTB | 703
Waymarked Trails Riding | 705
Waymarked Trails Skating | 704
Waymarked Trails Winter | 706

The current list of available Maps and their Id, including the built in ones listed above plus any additional ones added by extended configuration, can be viewed in the main program by going to Help Maps Information

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 precedence.

Viking supports RFC5870, the 'geo' URI scheme. Every 'file' on the command line is checked to see if in fact it is a geo URI. Thus the above example in geo URI format is:

    viking geo:51.4,-1.3?z=12 --map 13

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