forked from opentripplanner/otp-react-redux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-config.yml
238 lines (216 loc) · 8.26 KB
/
example-config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
api:
host: http://localhost
path: /otp/routers/default
port: 8001
# Add suggested locations to be shown as options in the form view.
# locations:
# - id: 'airport'
# icon: 'plane'
# name: 'Portland International Airport (PDX)'
# lat: 45.587579
# lon: -122.593084
# - id: 'zoo'
# icon: building
# lat: 45.51010444232195
# lon: -122.71607145667079
# name: Oregon Zoo, Portland, OR
### Define the strategies for how to handle auto-planning of a new trip when
### different query parameters are changes in the form. The default config is
### shown below, but if autoPlan is set to false, auto-plan will never occur.
### Other strategies besides those shown below are: ANY (any changed param will
### cause a re-plan).
# autoPlan:
# mobile: BOTH_LOCATIONS_CHANGED
# default: ONE_LOCATION_CHANGED
### The default query parameters can be overridden be uncommenting this object.
### Note: the override values must be valid values within otp-ui's query-params.js
# defaultQueryParams:
# maxWalkDistance: 3219 # 2 miles in meters
### The persistence setting is used to enable the storage of places (home, work),
### recent searches/places, user overrides, and favorite stops.
### Pick the strategy that best suits your needs.
###
### If you do not require remote storage of preferences,
### then use the localStorage strategy outlined below (which is used by default).
### The localStorage strategy will use the browser application storage.
### It must be enabled to show the stored locations (see above).
persistence:
enabled: true
strategy: localStorage
### If using the OTP Middleware to store user profiles
### with Auth0 as the authentication mechanism,
### then use the otp_middleware strategy below instead:
# persistence:
# enabled: true
# strategy: otp_middleware
# auth0:
# domain: your-auth0-domain
# clientId: your-auth0-client-id
# otp_middleware:
# apiBaseUrl: https://otp-middleware.example.com
# apiKey: your-middleware-api-key
map:
initLat: 45.52
initLon: -122.682
baseLayers:
- name: Streets
url: //cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}@2x.png
subdomains: 'abcd'
attribution: 'Map tiles: © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, © <a href="https://carto.com/attributions">CARTO</a>'
maxZoom: 20
hasRetinaSupport: true
- name: Stamen Toner Lite
url: http://tile.stamen.com/toner-lite/{z}/{x}/{y}.png
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.'
# it is possible to leave out a geocoder config entirely. In that case only
# GPS coordinates will be used when finding the origin/destination.
# example config for a Pelias geocoder (https://pelias.io/)
geocoder:
apiKey: MAPZEN_KEY
boundary:
rect:
minLon: -123.2034
maxLon: -122.135
minLat: 45.273
maxLat: 45.7445
focusPoint:
lat: 45.5223452
lon: -122.6821804
# Custom fetch options to pass to geocoder resource.
# options:
# headers:
# x-custom-header: abc123
# required geocoder type.
type: PELIAS
# This base URL is required as the libraries will default to using now-defunct
# mapzen urls
baseUrl: https://geocoder.example.com/pelias/v1
# example config for an ArcGIS geocoder
# (https://developers.arcgis.com/rest/geocode/api-reference/overview-world-geocoding-service.htm)
# WARNING: using the ArcGIS geocoder with a persistence strategy of
# `localStorage` will result in an error being thrown because ArcGIS
# requires the use of a paid account to store geocode results.
# See https://developers.arcgis.com/rest/geocode/api-reference/geocoding-free-vs-paid.htm
# geocoder:
# boundary:
# rect:
# minLon: -123.2034
# maxLon: -122.135
# minLat: 45.273
# maxLat: 45.7445
# focusPoint:
# lat: 45.5223452
# lon: -122.6821804
# # required geocoder type.
# type: ARCGIS
# Use this mode config for the enhanced Transit+ config
modes:
transitModes:
- mode: BUS
label: Bus
- mode: TRAM
label: MAX & Streetcar
- mode: RAIL
label: WES
- mode: GONDOLA
label: Aerial Tram
accessModes:
- mode: BICYCLE
label: Transit + Bike
bicycleModes:
- mode: BICYCLE
label: Own Bike
iconWidth: 18
routingTypes:
- key: ITINERARY
text: Exact Time
# Itinerary options
itinerary:
# Show fares for each transit leg (false if omitted).
# (Requires using LineItinerary.)
showRouteFares: false
# The transitOperators key is a list of transit operators that can be used to
# order transit agencies when sorting by route. Also, this can optionally
# provide operator logos that appear in the the route viewer and itineraries).
# Note: these logos will override the values found in
# agency.txt#agency_branding_url.
#
# When sorting routes, otp-react-redux uses otp-ui's route-comparator which uses
# multiple criteria to sort routes. (See https://git.io/Jk2Ia). The routes are
# first sorted according to a comparator value based off of the agency. After
# sorting routes by the agency, additional sorting criteria is used for routes
# that yield the same agency comparator value.
#
# If the transitOperators key is not defined, route sorting will fall back to
# using the agency name. If the transitOperators key is defined, the order field
# defined for each agency is used as a comparator value. Agencies are matched
# according to both the feedId and agencyId. If no match is found or the order
# field is not undefined, the associated routes will be placed after all other
# agencies which did have a match with a defined order value.
#
# This works best with the IBI fork of OTP which returns the necessary
# information in the route index API. Check the build logs of OTP to see what
# feedIds and agencyIds were found as these IDs can sometimes be auto-generated.
#
# Shown below is an example transitOperators config setting for the Portland, OR
# area which uses 2 GTFS files (from TriMet and C-TRAN).
#
# transitOperators:
# - feedId: TriMet
# agencyId: PSC
# logo: https://d2tyb7byn1fef9.cloudfront.net/psc.png
# order: 1
# - feedId: TriMet
# agencyId: TRIMET
# name: TriMet
# logo: http://news.trimet.org/wordpress/wp-content/uploads/2019/04/TriMet-logo-300x300.png
# order: 1
# - feedId: TriMet
# agencyId: TRAM
# logo: https://d2tyb7byn1fef9.cloudfront.net/tram.png
# order: 1
# # The C-TRAN GTFS feed does not come with feed_id or agency_id filled. The
# # value of '1' is a feed_id and agency_id that OTP auto-generated.
# - feedId: '1'
# agencyId: '1'
# name: C-TRAN
# logo: https://d2tyb7byn1fef9.cloudfront.net/ctran.png
# defaultRouteColor: ffffff
# defaultRouteTextColor: '000000'
# longNameSplitter: ' - '
# order: 2
### Use this config for the standard mode selector
# modeGroups:
# - name: Transit
# modes:
# - TRAM
# - BUS
# - name: Walk/Bike
# modes:
# - WALK
# - BICYCLE
### If using OTP Middleware, you can define the optional phone number options below.
# phoneFormatOptions:
# # ISO 2-letter country code for phone number formats (defaults to 'US')
# countryCode: US
# set this value to change the absolute number of seconds of deviation from the
# schedule for a transit stop time to be considered early, on-time or late. The
# default is 60 seconds.
# onTimeThresholdSeconds: 60
# Format the date time format for display.
dateTime:
longDateFormat: DD-MM-YYYY
# stopViewer:
# # The max. number of departures to show for each trip pattern
# # in the stop viewer Next Arrivals mode
# # (defaults to 3 if unspecified).
# numberOfDepartures: 3
# # Whether to display block IDs with each departure in the schedule mode.
# # (defaults to false if unspecified).
# showBlockIds: false
# # Specifies the time window, in seconds, in which to search for next arrivals,
# # so that, for example, if it is Friday and a route does
# # not begin service again until Monday, we are showing its next
# # departure and it is not entirely excluded from display
# # (defaults to 4 days/345600s if unspecified).
# timeRange: 345600