Skip to content

Instantly share code, notes, and snippets.

@sdjacobs
Created February 5, 2018 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sdjacobs/48b36dfce04e94881902f1bae2d1a236 to your computer and use it in GitHub Desktop.
Save sdjacobs/48b36dfce04e94881902f1bae2d1a236 to your computer and use it in GitHub Desktop.
config.js for otp-vtrans-ui
window.OTP_config = {
initLatLng: [44.42, -72.01],
osmMapKey: 'your-mapbox-key',
aerialMapKey: 'your-mapbox-aerial-key',
// geocoderSearchRadius : 25, // search radius in km for mapzen geocoder from initLatLng (defaults to 50 if not specified)
// change to server where you are running OTP
otpApi: '/otp/routers/',
flagStopBufferSizeDefault: 50,
flagStopLineColor: '#0276FD',
// default query parameters to pass to otp router
routerDefaults: {maxPreTransitTime: 1800},
// default no transit trips found within 5 miles of your search message
noTripsFoundMessage: "We're sorry, but no services were found that match your trip parameters. You may be searching outside the range of transit services in Vermont, or at a time when no transit services are available.",
//Default Flag Stop Dropoff text
flagStopDropOffText: 'Please communicate with the driver about your desired drop off. Ensure road is safe when debarking the bus.',
//Default Flag Stop Pickup text
flagStopPickupText: 'Wait in a safe area along the route. Wave to the driver as bus approaches and wait for the vehicle to stop before boarding.',
//Default Deviate Route text
deviatedRouteText: 'We are unable to provide instructions to secure this route. Please call 800-685-RIDE for more details.',
// geocoders to use:
geocoders: [ 'google' ], // possible choices: esri, otp, nominatim, mapzen, mapbox
reverseGeocoder: 'google', // possible choices: esri, nominatim, mapzen, mapbox
reverseGeocode: true,
// geocoder api endpoints
nominatimApi: 'https://nominatim.openstreetmap.org/',
esriApi: 'https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/',
mapzenApi: 'https://search.mapzen.com/v1/',
// specify modes to be enabled in 'travel by' dropdown as list of OTP modes
// defaults to: 'TRANSIT,WALK', 'TRAINISH,WALK', 'BUS,WALK', 'WALK', 'BICYCLE', 'TRANSIT,BICYCLE'
//
// e.g. uncomment following line to add drive-to-transit to the default list
modes: [ 'TRANSIT,WALK', 'TRAINISH,WALK', 'BUS,WALK', 'WALK', 'BICYCLE', 'TRANSIT,BICYCLE', 'TRANSIT,CAR_PARK' ],
useGoogleMaps: true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment