diff --git a/front/src/modules/simulationResult/components/SimulationResultsMap/TrainHoverPosition.tsx b/front/src/modules/simulationResult/components/SimulationResultsMap/TrainHoverPosition.tsx
index 4965195c2e5..062641d6a04 100644
--- a/front/src/modules/simulationResult/components/SimulationResultsMap/TrainHoverPosition.tsx
+++ b/front/src/modules/simulationResult/components/SimulationResultsMap/TrainHoverPosition.tsx
@@ -15,6 +15,7 @@ import { AllowancesSetting, AllowancesSettings, Train } from 'reducers/osrdsimul
import { boundedValue } from 'utils/numbers';
import { getCurrentBearing } from 'utils/geometry';
import OrderedLayer from 'common/Map/Layers/OrderedLayer';
+import { datetime2time } from 'utils/timeManipulation';
import { TrainPosition } from './types';
function getFill(isSelectedTrain: boolean, ecoBlocks: boolean) {
@@ -24,24 +25,33 @@ function getFill(isSelectedTrain: boolean, ecoBlocks: boolean) {
return '#333';
}
-function getSpeedAndTimeLabel(isSelectedTrain: boolean, ecoBlocks: boolean, point: TrainPosition) {
+function getSpeedTimeLabel(isSelectedTrain: boolean, ecoBlocks: boolean, point: TrainPosition) {
if (isSelectedTrain) {
return (
<>
{Math.round(point?.speedTime?.speed ?? 0)}
km/h
- {point.speedTime && {`${point.speedTime.time}`}}
+ {point.speedTime?.time && (
+ {`${datetime2time(
+ point.speedTime.time
+ )}`}
+ )}
>
);
}
return (
<>
{/* {point.properties.name} */}
-
+
{Math.round(point?.speedTime?.speed)}
km/h
@@ -205,7 +215,7 @@ function TrainHoverPosition(props: TrainHoverPositionProps) {
) {
const { ecoBlocks } = get(allowancesSettings, train.id, {} as AllowancesSetting);
const fill = getFill(isSelectedTrain as boolean, ecoBlocks);
- const label = getSpeedAndTimeLabel(isSelectedTrain, ecoBlocks, point);
+ const label = getSpeedTimeLabel(isSelectedTrain, ecoBlocks, point);
const zoomLengthFactor = getzoomPowerOf2LengthFactor(viewport);
const [trainGeoJsonPath, headTriangle, rearTriangle] = getTrainPieces(
diff --git a/front/src/styles/scss/applications/operationalStudies/_simulationresults.scss b/front/src/styles/scss/applications/operationalStudies/_simulationresults.scss
index 4c002ef48af..72dec02ef49 100644
--- a/front/src/styles/scss/applications/operationalStudies/_simulationresults.scss
+++ b/front/src/styles/scss/applications/operationalStudies/_simulationresults.scss
@@ -43,4 +43,11 @@
padding: 1rem;
border-radius: 4px;
}
+
+ /* MAP */
+ .train-speed-label {
+ text-shadow : 0 0 3px #FFFFFF;
+ padding-bottom: 1.5rem
+ }
+
}