I have WMTS layer with the TIME dimension indicating "base time" from which a forecast is computed and a custom DIM_FORECAST parameter indicating forecast horizons (times for which forecasts are generated) in hours (0-72) from the "base" TIME value.
I add the layer like this
const UM1_CLOUD_WMTSLayer = new WMTSLayer({
url: "https://mapy.meteo.pl/geoserver/gwc/service/wmts?",
activeLayer: {
id: "um:UM1_CLOUD",
},
customLayerParameters: {
VERSION: '1.1.1',
FORMAT: 'image/png',
TIME: '2024-03-19T00:00:00Z',
DIM_FORECAST: 7,
TRANSPARENT: true,
SRS: 'EPSG:3857'
}
});
I need to translate the date and time set in TimeSlider widget to the correct value of the DIM_FORECAST and call the WMTS with that value of the parameter.
How can I just get the set date from the TimeSlider (as UTC timestamp for example) and work with that value later on to translate it to DIM_FORECAST and call the WMTS.