Enterprise Webapp Configuration - camsys/onebusaway-application-modules GitHub Wiki
onebusaway-enterprise-*webapp configuration can be accomplished via central configuration service or via a configuration file located in /var/lib/oba/config.json
The webapp is designed to have reasonable defaults and will launch should config.json not be located.
Included below is an annotated config.json with an example configuration:
{
// this is boilerplate required to tell the configuration service to prefer
// this local configuration file over a central configuration service
"oba": {
"env": "local",
"config": "local"
},
// this is the array of component configurations. A component is a logical
// grouping of properties, here we are mainly concerned with
// "display" properties
"config":
[
// where the RESTFul siri api resides relative to the current host
{"component": "display", "key": "display.siriBaseUrl", "value": "/onebusaway-api-webapp/siri"},
// when realtime data is considered stale and hence hidden
{"component": "display", "key": "display.staleTimeout", "value": "120"},
// for multi-agency deployments prefix routes with agency names
{"component": "display", "key": "display.showAgencyNames", "value": "true"},
// for multi-agency deployments prefix identifiers with agency id
{"component": "display", "key": "display.useAgencyId", "value": "true"}
// google maps site, if in use
{"component": "display", "key": "display.googleAnalyticsSiteId, "value": ""},
// google maps client id if in use
{"component": "display", "key": "display.googleMapsClientId, "value": ""},
// google maps secret key if in use
{"component": "display", "key": "display.googleMapsSecretKey", "value": ""},
// google maps ad client id if in use
{"component": "display", "key": "display.googleAdsClientId", "value": ""},
// bing maps key, if in use
{"component": "display", "key": "display.bingMapsKey", "value": ""},
// OneBusAway Key to use internally for onebusaway-api-webapp
{"component": "display", "key": "display.obaApiKey", "value": "TEST"},
// override default map positioning and instead center at lat
{"component": "display", "key": "display.mapCenterLat", "value": "27.950535"},
// override default map positioning and instead center at lon
{"component": "display", "key": "display.mapCenterLon", "value": "-82.457190"},
// default zoom level, used in conjunction with mapCenterLat/mapCenterLon
{"component": "display", "key": "display.mapZoom", "value": "11"},
// optionally add vehicle id to stop popups
{"component": "display", "key": "display.showVehicleIdInStopPopup", "value": "true"},
// end of configuration array
]
// end of configuration file
}