-
Notifications
You must be signed in to change notification settings - Fork 1k
Calltaker and Field Trip Module Setup
This page contains instructions for setting up the Calltaker and Field Trip Planner extensions to OpenTripPlanner.
First, grab the latest copy of OTP:
$ git clone git://github.com/openplans/OpenTripPlanner.git
For now, work on these modules is taking place in the branch "leaflet-ui". Switch to this branch:
$ git checkout leaflet-ui
A special reverse geocoder is included to support
The front-end is contained in the opentripplanner-leaflet-webapp module of OTP.
First, you need to set the locations of the various services you just set up. Open the configuration file at opentripplanner-leaflet-webapp/src/main/webapp/js/otp/config.js and look for these lines:
hostname : "http://localhost:8080", municoderHostname : "http://localhost:8080", datastoreUrl : 'http://localhost:9000',
Note: while "localhost" addresses can be used for local testing on the deployment machine, for deployments that will be accessed by external users you must specify addresses that can be understood by external clients (e.g. "http://yourserver.yourdomain.com:8080")
Once the configuration is updated, there are two options for making the UI public:
-
If you have an ordinary web server running on the machine and port 80 is publicly accessible, you may simply copy the contents of [OTP home]/OpenTripPlanner/opentripplanner-leaflet-webapp/src/main/webapp to a web-visible location on the server.
-
If a servlet container such as Tomcat is running (and presumably one is if you are also running OTP and/or the municoder), the UI may be deployed as a WAR file. To build the file (from the ../OpenTripPlanner directory):
mvn package -DskipTests -pl opentripplanner-api-webapp
Then deploy the WAR generated at opentripplanner-leaflet-webapp/target/opentripplanner-leaflet-webapp.war. Note that any changes to config.js will require rebuilding and redeploying the WAR.
unless you are intentionally working with legacy versions of OpenTripPlanner. Please consult the current documentation at readthedocs