Skip to content

Calltaker and Field Trip Module Setup

David Emory edited this page May 8, 2013 · 11 revisions

This page contains instructions for setting up the Calltaker and Field Trip Planner extensions to OpenTripPlanner.

Download OTP and Switch to the Development Branch

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

Setting up the Data Store / Play! Backend

Setting up the Municipal Boundary Reverse-Geocoder

A special reverse geocoder is included to support

Setting up the Front-End

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:

  1. 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.

  2. 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.

The documentation on this wiki is outdated and should not be used

unless you are intentionally working with legacy versions of OpenTripPlanner. Please consult the current documentation at readthedocs

Clone this wiki locally