diff --git a/front/src/applications/referenceMap/Map.tsx b/front/src/applications/referenceMap/Map.tsx index 7385bf32327..e15180925d6 100644 --- a/front/src/applications/referenceMap/Map.tsx +++ b/front/src/applications/referenceMap/Map.tsx @@ -6,34 +6,21 @@ import type { MapRef } from 'react-map-gl/maplibre'; import { useSelector } from 'react-redux'; import { useParams } from 'react-router-dom'; -/* Main data & layers */ -/* Settings & Buttons */ import MapButtons from 'common/Map/Buttons/MapButtons'; import { CUSTOM_ATTRIBUTION } from 'common/Map/const'; import colors from 'common/Map/Consts/colors'; import Background from 'common/Map/Layers/Background'; import { useMapBlankStyle } from 'common/Map/Layers/blankStyle'; -import BufferStops from 'common/Map/Layers/BufferStops'; -import Detectors from 'common/Map/Layers/Detectors'; -import Electrifications from 'common/Map/Layers/Electrifications'; -import NeutralSections from 'common/Map/Layers/extensions/SNCF/NeutralSections'; -import SNCF_PSL from 'common/Map/Layers/extensions/SNCF/PSL'; import Hillshade from 'common/Map/Layers/Hillshade'; import IGN_BD_ORTHO from 'common/Map/Layers/IGN_BD_ORTHO'; import IGN_CADASTRE from 'common/Map/Layers/IGN_CADASTRE'; import IGN_SCAN25 from 'common/Map/Layers/IGN_SCAN25'; +import InfraObjectLayers from 'common/Map/Layers/InfraObjectLayers'; import LineSearchLayer from 'common/Map/Layers/LineSearchLayer'; -import OperationalPoints from 'common/Map/Layers/OperationalPoints'; import OSM from 'common/Map/Layers/OSM'; -/* Objects & various */ import PlatformsLayer from 'common/Map/Layers/Platforms'; -import Routes from 'common/Map/Layers/Routes'; import SearchMarker from 'common/Map/Layers/SearchMarker'; -import Signals from 'common/Map/Layers/Signals'; -import SpeedLimits from 'common/Map/Layers/SpeedLimits'; -import Switches from 'common/Map/Layers/Switches'; import Terrain from 'common/Map/Layers/Terrain'; -import TracksGeographic from 'common/Map/Layers/TracksGeographic'; import TracksOSM from 'common/Map/Layers/TracksOSM'; import { removeSearchItemMarkersOnMap } from 'common/Map/utils'; import { useInfraID } from 'common/osrdContext'; @@ -153,6 +140,8 @@ function Map() { + {infraID && } + {!showOSM ? null : ( <> - - - - - - - - - - - - - - - - ( + <> + + + + + + + + + + + + + + + + + + + + + + +); + +export default InfraObjectLayers; diff --git a/front/src/modules/simulationResult/components/SimulationResultsMap/SimulationResultsMap.tsx b/front/src/modules/simulationResult/components/SimulationResultsMap/SimulationResultsMap.tsx index b29b35cc626..539d22e6e7b 100644 --- a/front/src/modules/simulationResult/components/SimulationResultsMap/SimulationResultsMap.tsx +++ b/front/src/modules/simulationResult/components/SimulationResultsMap/SimulationResultsMap.tsx @@ -22,26 +22,16 @@ import { CUSTOM_ATTRIBUTION } from 'common/Map/const'; import colors from 'common/Map/Consts/colors'; import Background from 'common/Map/Layers/Background'; import { useMapBlankStyle } from 'common/Map/Layers/blankStyle'; -import BufferStops from 'common/Map/Layers/BufferStops'; -import Detectors from 'common/Map/Layers/Detectors'; -import Electrifications from 'common/Map/Layers/Electrifications'; -import NeutralSections from 'common/Map/Layers/extensions/SNCF/NeutralSections'; -import SNCF_PSL from 'common/Map/Layers/extensions/SNCF/PSL'; import Hillshade from 'common/Map/Layers/Hillshade'; import IGN_BD_ORTHO from 'common/Map/Layers/IGN_BD_ORTHO'; import IGN_CADASTRE from 'common/Map/Layers/IGN_CADASTRE'; import IGN_SCAN25 from 'common/Map/Layers/IGN_SCAN25'; +import InfraObjectLayers from 'common/Map/Layers/InfraObjectLayers'; import LineSearchLayer from 'common/Map/Layers/LineSearchLayer'; -import OperationalPoints from 'common/Map/Layers/OperationalPoints'; import OSM from 'common/Map/Layers/OSM'; import PlatformsLayer from 'common/Map/Layers/Platforms'; -import Routes from 'common/Map/Layers/Routes'; import SearchMarker from 'common/Map/Layers/SearchMarker'; -import Signals from 'common/Map/Layers/Signals'; -import SpeedLimits from 'common/Map/Layers/SpeedLimits'; -import Switches from 'common/Map/Layers/Switches'; import Terrain from 'common/Map/Layers/Terrain'; -import TracksGeographic from 'common/Map/Layers/TracksGeographic'; import TracksOSM from 'common/Map/Layers/TracksOSM'; import { removeSearchItemMarkersOnMap } from 'common/Map/utils'; import { computeBBoxViewport } from 'common/Map/WarpedMap/core/helpers'; @@ -242,6 +232,8 @@ const SimulationResultMap = ({ + {infraID && } + - - - - - - - - - - - - - - - + {infraID && ( + + )} + - - - - - - - - - - - - - - - - - - + {infraID && } + - - - - - - - - - - - - - - - - - -