Skip to content

Commit 29133cf

Browse files
emersionflomonster
authored andcommitted
front: show map markers/itinerary when OSM map is unavailable
When the OSM map background is unavailable, we can still display the map markers and itinerary. Reverts part of b038d3e ("front: display itinerary markers name when editing a train"). Signed-off-by: Simon Ser <[email protected]>
1 parent 94d3a84 commit 29133cf

File tree

1 file changed

+13
-17
lines changed
  • front/src/modules/trainschedule/components/ManageTrainSchedule

1 file changed

+13
-17
lines changed

front/src/modules/trainschedule/components/ManageTrainSchedule/Map.tsx

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -388,23 +388,19 @@ const Map = ({
388388
<RenderPopup pathProperties={pathProperties} />
389389
</>
390390
)}
391-
{mapIsLoaded && (
392-
<>
393-
<ItineraryLayer
394-
layerOrder={LAYER_GROUPS_ORDER[LAYERS.ITINERARY.GROUP]}
395-
geometry={pathGeometry}
396-
hideItineraryLine={hideItinerary}
397-
showStdcmAssets={showStdcmAssets}
398-
isFeasible={isFeasible}
399-
/>
400-
{mapRef.current && (
401-
<ItineraryMarkers
402-
simulationPathSteps={simulationPathSteps}
403-
map={mapRef.current.getMap()}
404-
showStdcmAssets={showStdcmAssets}
405-
/>
406-
)}
407-
</>
391+
<ItineraryLayer
392+
layerOrder={LAYER_GROUPS_ORDER[LAYERS.ITINERARY.GROUP]}
393+
geometry={pathGeometry}
394+
hideItineraryLine={hideItinerary}
395+
showStdcmAssets={showStdcmAssets}
396+
isFeasible={isFeasible}
397+
/>
398+
{mapRef.current && (
399+
<ItineraryMarkers
400+
simulationPathSteps={simulationPathSteps}
401+
map={mapRef.current.getMap()}
402+
showStdcmAssets={showStdcmAssets}
403+
/>
408404
)}
409405
{mapSearchMarker && <SearchMarker data={mapSearchMarker} colors={colors[mapStyle]} />}
410406
{snappedPoint !== undefined && <SnappedMarker geojson={snappedPoint} />}

0 commit comments

Comments
 (0)