-
Notifications
You must be signed in to change notification settings - Fork 2
Default configuration file (defaultConfig.ts)
AnttiRumpunen edited this page Sep 22, 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. |
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. |
onboardingWizard | Object (see below) | Onboarding wizard -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.sources.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. Possible parameters depend on used service. Only for WMS-type of source. |
times | Object (see below) | Timestep settings for the time selector. |
tileSize | Integer | Tilesize for WMS-layers. Prefer 1024. |
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.
Parameter | Value type | Description |
---|---|---|
apiUrl | String (url) | URL where timeseries queries are made to. |
useCardinalsForWindDirection | boolean | Are wind directions rounded to cardinals (NW, N, NE...) or is 1 degree accuracy used. |
forecast | Object (see below) | Settings for forecasts. |
observation | Object (see below) | Settings for observations. |
Parameter | Value type | Description |
---|---|---|
updateInterval | Integer | How often forecast data is refreshed. |
timePeriod | String or number | TODO: needs more information... |
data | Object (see below) | Define which parameters are fetched from which producer |
defaultParameters | Array | Which parameters are visible by default. Array values are same as data-object's parameter names. |
excludeDayDuration | Boolean | Exclude length of day section. |
excludePolarNightAndMidnightSun | Boolean | Exclude polar night and midnight sun -section. |
Parameter | Value type | Description |
---|---|---|
producer | String | Name of the Timeseries producer |
parameters | Array | Array of parameter names |
Parameter | Value type | Description |
---|---|---|
enabled | Boolean | Is observations -section enabled? |
updateInterval | Integer | How often observation data is refreshed |
numberOfStations | Integer | How many stations are shown in station selector at max |
producer | Object (see below) | Producer settings |
timePeriod | How far into history we'll show observations | |
parameters | Array | Array of parameter names |
Parameter | Value type | Description |
---|---|---|
FI | String | Producer name for locations on Parameter -country code |
default | String | Producer name for other locations which are not defined. |
Parameter | Value type | Description |
---|---|---|
enabled | Boolean | Is Warnings-page enabled |
useCapView | Boolean | Use CAP -warnings UI or not |
updateInterval | Integer | How often warnings are refreshed |
webViewUrl | String | URL to the SmartAlert Client |
apiUrl | Object | URL to Warnings backend for each language. Use lang code as key and url as value. |
Parameter | Value type | Description |
---|---|---|
languages | Array | Array of language code Strings |
units | Object | Object which units (String "m/s" for example) are used for temperature, precipitation, wind and pressure. |
clockType | Integer | 24 or 12 hour clock |
themes | Object | Object for enabling light and dark -themes. Key light/dark and value Boolean. |
Parameter | Value type | Description |
---|---|---|
enabled | Boolean | Are announcements enabled |
updateInterval | Integer | How often announcements are refreshed |
api | Object | Object for setting announcement API URL for each supported language. Object key is language code and value is API URL. |
Value type | Description |
---|---|
Array (see below) | Array of Objects defining social media links |
Parameter | Value type | Description |
---|---|---|
name | String | Name of the social media platform |
icon | String | Icon name |
appUrl | String | App url for the account. For example: instagram://user?username=ilmatieteenlaitos |
url | String | URL to the account at the social media platform |