Command line
Server Execution Parameters
Starting the MapCore™ Map Layer Server involves defining parameters in the following syntax (parameters in angled brackets <> are mandatory while parameters in square brackets [] are optional) as detailed in the table below.
Server execution parameters are applied when running the server (from the <server executable folder>; Refer to Table 2-1 Default server installation and server data repository folders per operating system for file name and location of this folder).
<local address> <port> <number of threads> <server GUI folder> [server configuration file folder] [data repository folder] [layer configuration file folder]
Where:
Table 2-2 Server execution parameters
| Parameter | Description | Reference for more details |
|---|---|---|
<local address> | The local address the server listens on. 0.0.0.0 accepts requests on every IPv4 interface of the machine; 127.0.0.1 accepts only requests from the same machine. | NA |
<port> | Server communication port. The recommended value is 6767. | NA |
<number of threads> | Number of requests that can be carried out simultaneously without overloading the server computer. The value 0 (or 1) lets the server set the number of threads automatically to twice the number of hardware thread contexts of the machine plus one. This is the recommended value and the default used by the installed Windows shortcuts, by the Linux start-maplayerserver script and by the Docker image. | NA |
<server GUI folder> | Folder containing all server GUI files. In the Linux packages, this is the WWWRoot folder under the server installation folder; on Windows, it is C:\ProgramData\Elbit\MapLayerServer\<version>\WWWRoot. | Refer to Table 2-1 Default server installation and server data repository folders per operating system for folder name and location |
| [server configuration file folder] | Optional parameter representing the folder in which the McMapLayersServerConfig.xml server configuration file is found. If not defined, the current folder. The MapCore log MapCore.log is written to this folder too. The Windows installer passes C:\ProgramData\Elbit\MapLayerServer\<version>. | Refer to Figure 2-2 Configuration files and user-specific data in MapCore™ Map Layer Server directory for configuration file name and location |
| [data repository folder] | Optional parameter representing the folder in which the data repository folder is found. It is highly recommended you change the location of the data repository folder to prevent potential data loss when upgrading server. If not defined, the default location is <server GUI folder> (see above) | Refer to Changing the Location of the Data Repository Folder for detailed instructions |
| [layer configuration file folder] | Optional parameter representing folder in which the layer configuration file McLayersDataConfig.xml is found. If not defined, the default location is [data repository folder] (see above) | Refer to Figure 2-2 Configuration files and user-specific data in MapCore™ Map Layer Server directory for configuration file name and location |
For example:
0.0.0.0 6767 0 WWWRoot/ ChosenConfigurationFileFolder ChosenRepositoryDataFolder ChosenLayersXMLFolder
Refer to System Folders and Configuration Files for detailed information on MapCore™ Map Layer Server folders and configuration file locations.
Windows Service Switches
On Windows, the executable also accepts a single switch in place of the server execution parameters. All but /fromenv need an administrator command prompt.
| Switch | Description |
|---|---|
| /register | Registers the Windows service McMapLayersService. The service runs the executable with no arguments and takes its server execution parameters from the system variable MCLAYERSERVER_ACTIVATION_STRING. |
| /unregister | Removes the McMapLayersService service. |
| /start | Starts the McMapLayersService service. |
| /stop | Stops the McMapLayersService service. |
| /fromenv | Runs the server in the console with the server execution parameters in MCLAYERSERVER_ACTIVATION_STRING. |
MCLAYERSERVER_ACTIVATION_STRING holds four to seven server execution parameters separated by spaces or tabs, so none of its folders can contain a space or a tab. The Windows installer sets it (see What the Installer Sets Up).