-
Notifications
You must be signed in to change notification settings - Fork 2
Default configuration file (defaultConfig.ts)
AnttiRumpunen edited this page May 15, 2023
·
9 revisions
This page describes default configuration file's content
Default configuration is included in the app, but each setting can be overrided by dynamic configuration file somewhere in internet.
Parameter | Value type | Description |
---|---|---|
dynamicConfig | Object (see below) | Dynamic config settings. |
location | Object (see below) | Default location settings. |
map | Object (see below) | Map -view settings. |
weather | Object (see below) | Weather -view settings. |
observation | Object (see below) | Observations -view settings. |
warnings | Object (see below) | Warnings -view settings. |
settings | Object (see below) | Settings -view settings. |
announcements | Object (see below) | Application announcements -settings. |
socialMediaLinks | Object (see below) | Social media -settings. |
Parameter | Value type | Description |
---|---|---|
enabled | Boolean | Is dynamic configuration in use? It will override every defined setting in default config. |
apiUrl | String (url) | Location of the dynamic configuration |
interval | Integer | How often (in minutes) dynamic config url is being checked. |
Parameter | Value type | Description |
---|---|---|
default | Object (see below) | Settings for the default location where user is located to when opening application. |
apiUrl | String (url) | Location where search queries are made to. Autocomplete or similar. |
keyword | String | Keyword which is used in FMI's Smartmet Server queries. |
maxRecent | Integer | How many recent locations are shown in app's search history. |
maxFavorite | Integer | How many favorite locations user can save. |
Parameter | Value type | Description |
---|---|---|
name | String | Location name. For example in "Stockholm, Sweden" Stockholm is location name. |
area | String | Area name. For example in "Stockholm, Sweden" Sweden is area name. |
lat | Double | Latitude of the location. Used in centering of the map. |
lon | Double | Longitude of the location. Used in centering of the map. |
id | Integer | ID of the location. Used in TODO: |
country | String | Country code for the location. Used in TODO: |
timezone | String | Timezone for the location. Used in TODO: |
These settings are used in Map -view.
Parameter | Value type | Description |
---|---|---|
updateInterval | Integer | How often (in minutes) map data is being refetched. |
sources | Object (see below) | Data layer data source settings. |
layers | Array (see below) | Settings for each data layer. |
Parameter | Value type | Description |
---|---|---|
XXX | String | XXX is name of the data source and value is url to this datasource. |
Layers is an array which contain Objects for each layer. This layer-object is described below.
Parameter | Value type | Description |
---|---|---|
id | Integer (unique) | ID of the layer. For example 1. |
type | String | Type of layer. Possible values: WMS or Timeseries. Used in how datalayer is handled. |
name | Object | Name of the layer for each language. Language as key and localized value as value. For example "en: 'Observed and forecasted precipitation, Finland'". |
sources | Array (see below) | Datasource settings for observations and forecasts. |
times | Object (see below) | Layer's time settings. |
tileSize | Integer | Tilesize in pixels. Prefer 1024. |
Parameter | Value type | Description |
---|---|---|
source | String | Which datasource setting is used. Defined in map.datasources.XXX. Use XXX as value. |
type | String | Either 'observation' or 'forecast'. |
layer | String | Layer's id in dataquery to datasource. Only for WMS-type. |
customParameters | Object | Possible custom parameters to Geoserver etc. Only for WMS-type. |
parameters | Array | Array of parameters as Strings. Only for Timeseries-type. |
keyword | Array of keywords as Strings. Only for Timeseries-type. |
Parameter | Value type | Description |
---|---|---|
timeStep | Integer | Timestep of the layer in minutes. |
observation | Integer | Number of timesteps for observations. |
forecast | Integer | Number of timesteps for forecasts. |
These settings are used in Weather -view. Todo: