Skip to content

Commit

Permalink
feat: Add information about meteorological model and elements (closes…
Browse files Browse the repository at this point in the history
… #794)
  • Loading branch information
claustres committed Aug 28, 2024
1 parent 1adfc2a commit ad9e2c5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
28 changes: 14 additions & 14 deletions api/config/layers/weather/forecast-layers.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ module.exports = function ({ wmtsUrl, tmsUrl, wmsUrl, wcsUrl, k2Url, s3Url }) {
i18n: {
fr: {
Layers: {
WIND_TILED: 'Vent',
WIND_TILED: 'Vent à 10m',
WIND_DESCRIPTION: 'Vitesse et direction'
},
Variables: {
WIND_SPEED: 'Vitesse',
WIND_DIRECTION: 'Direction'
WIND_SPEED: 'Vitesse à 10m',
WIND_DIRECTION: 'Direction à 10m'
},
Levels: {
PRESSURE: 'Pression'
}
},
en: {
Layers: {
WIND_TILED: 'Wind',
WIND_TILED: 'Wind at 10m',
WIND_DESCRIPTION: 'Speed and direction'
},
Variables: {
WIND_SPEED: 'Speed',
WIND_DIRECTION: 'Direction'
WIND_SPEED: 'Speed at 10m',
WIND_DIRECTION: 'Direction at 10m'
},
Levels: {
PRESSURE: 'Pressure'
Expand Down Expand Up @@ -131,20 +131,20 @@ module.exports = function ({ wmtsUrl, tmsUrl, wmsUrl, wcsUrl, k2Url, s3Url }) {
i18n: {
fr: {
Layers: {
GUST_TILED: 'Rafales',
GUST_TILED: 'Rafales à 10m',
GUST_DESCRIPTION: 'Vitesse maximale du vent'
},
Variables: {
GUST: 'Rafales'
GUST: 'Rafales à 10m'
}
},
en: {
Layers: {
GUST_TILED: 'Gust',
GUST_TILED: 'Gust at 10m',
GUST_DESCRIPTION: 'Maximum wind speed'
},
Variables: {
GUST: 'Gust'
GUST: 'Gust at 10m'
}
}
},
Expand Down Expand Up @@ -321,20 +321,20 @@ module.exports = function ({ wmtsUrl, tmsUrl, wmsUrl, wcsUrl, k2Url, s3Url }) {
i18n: {
fr: {
Layers: {
TEMPERATURE_TILED: 'Température',
TEMPERATURE_TILED: 'Température à 2m',
TEMPERATURE_DESCRIPTION: 'Température moyenne'
},
Variables: {
TEMPERATURE: 'Température'
TEMPERATURE: 'Température à 2m'
}
},
en: {
Layers: {
TEMPERATURE_TILED: 'Temperature',
TEMPERATURE_TILED: 'Temperature at 2m',
TEMPERATURE_DESCRIPTION: 'Mean temperature'
},
Variables: {
TEMPERATURE: 'Temperature'
TEMPERATURE: 'Temperature at 2m'
}
}
},
Expand Down
5 changes: 3 additions & 2 deletions src/utils/utils.time-series.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ export async function updateTimeSeries (previousTimeSeries) {
let timeSeries = []
if (hasProbedLocation()) {
const featureLevel = activity.selectableLevelsLayer ? ` - ${activity.selectedLevel} ${activity.selectableLevels.unit}` : ''
const layers = _.values(activity.layers).filter(sift({ tags: ['weather', 'forecast'] }))
timeSeries.push({
id: 'probe',
label: `(${getProbedLocation().lng.toFixed(2)}°, ${getProbedLocation().lat.toFixed(2)}°)` + featureLevel,
label: `${activity.forecastModel.label} (${getProbedLocation().lng.toFixed(2)}°, ${getProbedLocation().lat.toFixed(2)}°)` + featureLevel,
series: kMapUtils.getTimeSeries({
location: getProbedLocation(),
layers: _.values(activity.layers).filter(sift({ tags: ['weather', 'forecast'] })),
layers,
level: activity.selectedLevel,
forecastModel: activity.forecastModel,
forecastLevel: activity.forecastLevel,
Expand Down

0 comments on commit ad9e2c5

Please sign in to comment.