2019-02-05 18:33:10 +03:00
|
|
|
|
|
|
|
# Configuration
|
|
|
|
|
2019-02-08 09:40:40 +03:00
|
|
|
## Colors
|
|
|
|
|
|
|
|
There are builtin default colors, if you want new ones or override them
|
|
|
|
just put your `colors.txt` in the same directory the mapserver runs.
|
|
|
|
|
|
|
|
Example `colors.txt`:
|
|
|
|
```
|
|
|
|
# scifi nodes
|
|
|
|
scifi_nodes:slope_white 240 240 240
|
|
|
|
scifi_nodes:slope_vent 120 120 120
|
|
|
|
scifi_nodes:white2 240 240 240
|
|
|
|
```
|
|
|
|
|
|
|
|
Default colors, see: [colors.txt](../server/static/colors.txt)
|
|
|
|
|
|
|
|
## Configuration json
|
|
|
|
|
2019-02-05 18:33:10 +03:00
|
|
|
All config options reside in the `mapserver.json` file with the default values
|
|
|
|
The mapserver will generate a fresh `mapserver.json` if there is none at startup.
|
|
|
|
|
2019-02-08 12:39:18 +03:00
|
|
|
### Example mapserver.json
|
2019-02-05 18:33:10 +03:00
|
|
|
```json
|
|
|
|
{
|
|
|
|
"port": 8080,
|
2019-02-15 12:33:34 +03:00
|
|
|
"enableprometheus": true,
|
2019-02-05 18:33:10 +03:00
|
|
|
"enablerendering": true,
|
|
|
|
"webdev": false,
|
|
|
|
"webapi": {
|
|
|
|
"enablemapblock": false,
|
2019-02-15 12:33:34 +03:00
|
|
|
"secretkey": "OYHuTRbhSQXkHcwu"
|
2019-02-05 18:33:10 +03:00
|
|
|
},
|
|
|
|
"layers": [
|
|
|
|
{
|
|
|
|
"id": 0,
|
|
|
|
"name": "Base",
|
|
|
|
"to": 160,
|
|
|
|
"from": -16
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"renderingfetchlimit": 1000,
|
|
|
|
"renderingjobs": 2,
|
2019-02-15 12:33:34 +03:00
|
|
|
"renderingqueue": 100,
|
|
|
|
"mapobjects": {
|
|
|
|
"bones": true,
|
|
|
|
"protector": true,
|
|
|
|
"technic": true,
|
|
|
|
"luacontroller": true,
|
|
|
|
"digiterms": true,
|
|
|
|
"digilines": true,
|
|
|
|
"travelnet": true,
|
|
|
|
"mapserver": true,
|
|
|
|
"mission": true,
|
|
|
|
"jumpdrive": true,
|
|
|
|
"smartshop": true,
|
|
|
|
"fancyvend": true,
|
|
|
|
"atm": true
|
|
|
|
}
|
2019-02-05 18:33:10 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2019-02-08 09:40:40 +03:00
|
|
|
### Settings
|
2019-02-05 18:33:10 +03:00
|
|
|
|
2019-02-08 09:40:40 +03:00
|
|
|
#### port
|
2019-02-05 18:33:10 +03:00
|
|
|
The port on which the server listens to
|
|
|
|
|
2019-02-08 09:40:40 +03:00
|
|
|
#### webapi.secretkey
|
2019-02-08 23:38:08 +03:00
|
|
|
The generated secret for the [mod bridge](./mod.md)
|
2019-02-05 18:33:10 +03:00
|
|
|
|
2019-02-08 09:40:40 +03:00
|
|
|
#### layers
|
2019-02-05 18:33:10 +03:00
|
|
|
The layers as a list
|
|
|
|
More layers can be added here:
|
|
|
|
```json
|
|
|
|
"layers": [
|
|
|
|
{
|
|
|
|
"id": 0,
|
|
|
|
"name": "Base",
|
|
|
|
"to": 160,
|
|
|
|
"from": -16
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 1,
|
|
|
|
"name": "Space",
|
|
|
|
"to": 1600,
|
|
|
|
"from": 1000
|
|
|
|
}
|
|
|
|
],
|
|
|
|
```
|
|
|
|
*from* and *to* are in blocks (not mapblocks)
|
|
|
|
Don't reuse the `id` after the tiles are generated.
|
|
|
|
If you make more substantial changes here you may have to remove all
|
|
|
|
existing tiles and start rendering from scratch.
|
|
|
|
|
2019-02-08 09:40:40 +03:00
|
|
|
#### renderingjobs
|
2019-02-22 17:17:19 +03:00
|
|
|
Number of cores to use for rendering, defaults to all available cores.
|
|
|
|
If CPU-limiting is desired, this is a good spot to begin with (Set to 1 for single-thread)
|
|
|
|
|
|
|
|
#### renderingfetchlimit
|
|
|
|
Number of mapblocks to collect at once while rendering:
|
|
|
|
* More means faster but also more RAM usage
|
|
|
|
* Less means slower but less RAM usage
|
|
|
|
|
|
|
|
For a small system (Raspberry PI) a setting of 1000 is ok.
|
|
|
|
Faster system can use the default (10'000)
|
2019-02-15 12:33:34 +03:00
|
|
|
|
|
|
|
#### enableprometheus
|
|
|
|
Enables the [Prometheus](./prometheus.md) metrics endpoint
|