@@ -22,6 +22,7 @@ import {
2222 DefaultItinerary ,
2323 DefaultMainPanel ,
2424 FieldTripWindows ,
25+ // GtfsRtVehicleOverlay,
2526 MailablesWindow ,
2627 MobileResultsScreen ,
2728 MobileSearchScreen ,
@@ -70,6 +71,26 @@ const TermsOfStorage = () => (
7071 </ >
7172)
7273
74+ // Define custom map overlays.
75+ // customMapOverlays can be a single overlay element or an array of such elements.
76+ // Each overlay must include a name prop (and a key prop if wrapping in an array).
77+ // (Wrapping the overlays inside a React Fragment <> or other component will not work.)
78+ const customMapOverlays = [
79+ // Uncomment the code below and change props to add GTFS-rt overlays.
80+ // <GtfsRtVehicleOverlay
81+ // key='custom1'
82+ // liveFeedUrl='https://gtfs-rt.example.com/feed1.pb'
83+ // name='GTFS-rt Example Vehicles 1'
84+ // />,
85+ // <GtfsRtVehicleOverlay
86+ // key='custom2'
87+ // liveFeedUrl='https://gtfs-rt.example.com/feed2.pb'
88+ // name='GTFS-rt Example Vehicles 2'
89+ // routeDefinitionUrl='https://gtfs-rt.example.com/routes.json'
90+ // visible
91+ // />
92+ ]
93+
7394// define some application-wide components that should be used in
7495// various places. The following components can be provided here:
7596// - defaultMobileTitle (required)
@@ -86,8 +107,8 @@ const TermsOfStorage = () => (
86107// - TermsOfService (required if otpConfig.persistence.strategy === 'otp_middleware')
87108// - TermsOfStorage (required if otpConfig.persistence.strategy === 'otp_middleware')
88109const components = {
89-
90110 defaultMobileTitle : ( ) => < div className = 'navbar-title' > OpenTripPlanner</ div > ,
111+ getCustomMapOverlays : ( ) => customMapOverlays ,
91112 /**
92113 * Example of a custom route label provider to pass to @opentripplanner/core-utils/map#itineraryToTransitive.
93114 * @param {* } itineraryLeg The OTP itinerary leg for which to obtain a custom route label.
@@ -140,8 +161,8 @@ const store = createStore(
140161 combineReducers ( {
141162 callTaker : createCallTakerReducer ( otpConfig ) ,
142163 otp : createOtpReducer ( otpConfig ) ,
143- user : createUserReducer ( ) ,
144- router : connectRouter ( history )
164+ router : connectRouter ( history ) ,
165+ user : createUserReducer ( )
145166 } ) ,
146167 compose ( applyMiddleware ( ...middleware ) )
147168)
0 commit comments