Skip to content

Commit

Permalink
front: reorganize infra object layers
Browse files Browse the repository at this point in the history
Signed-off-by: Clara Ni <[email protected]>
  • Loading branch information
clarani committed Jan 10, 2025
1 parent 7b06fce commit f08dfb0
Show file tree
Hide file tree
Showing 20 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion front/src/applications/editor/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ 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 LineSearchLayer from 'common/Map/Layers/LineSearchLayer';
import OperationalPoints from 'common/Map/Layers/OperationalPoints';
import OperationalPoints from 'common/Map/Layers/InfraObjectLayers/OperationalPoints';
import OSM from 'common/Map/Layers/OSM';
import { Platforms as PlatformsLayer } from 'common/Map/Layers/Platforms';
import SearchMarker from 'common/Map/Layers/SearchMarker';
Expand Down
2 changes: 1 addition & 1 deletion front/src/applications/editor/components/EntitySumUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type { TrackSectionEntity } from 'applications/editor/tools/trackEdition/
import type { EditorEntity } from 'applications/editor/typesEditorEntity';
import type { InfraError } from 'common/api/osrdEditoastApi';
import { LoaderFill } from 'common/Loaders';
import { getSpeedSectionsNameString } from 'common/Map/Layers/SpeedLimits';
import { getSpeedSectionsNameString } from 'common/Map/Layers/InfraObjectLayers/SpeedLimits';
import { useInfraID } from 'common/osrdContext';
import { type AppDispatch, useAppDispatch } from 'store';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
getRoutesLineLayerProps,
getRoutesPointLayerProps,
getRoutesTextLayerProps,
} from 'common/Map/Layers/Routes';
} from 'common/Map/Layers/InfraObjectLayers/Routes';
import { useInfraID } from 'common/osrdContext';
import { getMap } from 'reducers/map/selectors';
import { useAppDispatch } from 'store';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ import type { TrackSectionEntity } from 'applications/editor/tools/trackEdition/
import type { ExtendedEditorContextType } from 'applications/editor/types';
import colors from 'common/Map/Consts/colors';
import GeoJSONs from 'common/Map/Layers/GeoJSONs';
import { getSwitchesLayerProps, getSwitchesNameLayerProps } from 'common/Map/Layers/Switches';
import {
getSwitchesLayerProps,
getSwitchesNameLayerProps,
} from 'common/Map/Layers/InfraObjectLayers/Switches';
import { useInfraID } from 'common/osrdContext';
import { getMap } from 'reducers/map/selectors';
import { useAppDispatch } from 'store';
Expand Down
16 changes: 11 additions & 5 deletions front/src/common/Map/Layers/GeoJSONs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ import { useSelector } from 'react-redux';

import type { Layer as LayerType } from 'applications/editor/consts';
import { MAP_TRACK_SOURCE, MAP_URL } from 'common/Map/const';
import { getBufferStopsLayerProps } from 'common/Map/Layers/BufferStops';
import { getBufferStopsLayerProps } from 'common/Map/Layers/InfraObjectLayers/BufferStops';
import { lineNameLayer, lineNumberLayer, trackNameLayer } from 'common/Map/Layers/commonLayers';
import { getDetectorsLayerProps, getDetectorsNameLayerProps } from 'common/Map/Layers/Detectors';
import {
getDetectorsLayerProps,
getDetectorsNameLayerProps,
} from 'common/Map/Layers/InfraObjectLayers/Detectors';
import {
getElectrificationsProps,
getElectrificationsTextParams,
} from 'common/Map/Layers/Electrifications';
} from 'common/Map/Layers/InfraObjectLayers/Electrifications';
import {
getLineErrorsLayerProps,
getLineTextErrorsLayerProps,
Expand All @@ -39,8 +42,11 @@ import {
getSpeedSectionsLineLayerProps,
getSpeedSectionsPointLayerProps,
getSpeedSectionsTextLayerProps,
} from 'common/Map/Layers/SpeedLimits';
import { getSwitchesLayerProps, getSwitchesNameLayerProps } from 'common/Map/Layers/Switches';
} from 'common/Map/Layers/InfraObjectLayers/SpeedLimits';
import {
getSwitchesLayerProps,
getSwitchesNameLayerProps,
} from 'common/Map/Layers/InfraObjectLayers/Switches';
import type { LayerContext } from 'common/Map/Layers/types';
import { LAYER_ENTITIES_ORDERS, LAYER_GROUPS_ORDER, LAYERS } from 'config/layerOrder';
import type { RootState } from 'reducers';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import { useSelector } from 'react-redux';
import { MAP_URL } from 'common/Map/const';
import SNCF_PSL_Signs from 'common/Map/Layers/extensions/SNCF/PSLSigns';
import OrderedLayer from 'common/Map/Layers/OrderedLayer';
import { getSpeedSectionsName, getFilterBySpeedSectionsTag } from 'common/Map/Layers/SpeedLimits';
import {
getSpeedSectionsName,
getFilterBySpeedSectionsTag,
} from 'common/Map/Layers/InfraObjectLayers/SpeedLimits';
import type { RootState } from 'reducers';
import type { MapState } from 'reducers/map';
import type { Theme, OmitLayer } from 'types';
Expand Down
3 changes: 3 additions & 0 deletions front/src/common/Map/Layers/InfraObjectLayers/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import InfraObjectLayers from './InfraObjectLayers';

export default InfraObjectLayers;

0 comments on commit f08dfb0

Please sign in to comment.