-
Notifications
You must be signed in to change notification settings - Fork 0
RunningTheWebappInEclipse
Instructions for setting up and running the opentripplanner-webapp
in Eclipse.
Before getting started, we've assume that you've already done the following:
-
Successfully downloaded and compiled the OTP source code within Eclipse. See GettingStartedEclipse for more details.
-
Successfully setup an instance of Tomcat within Eclipse. See for more details.
-
Both the
opentripplanner-api-webapp
andopentripplanner-webapp
modules have been added to your Tomcat server instance. Again, see for more details.
The opentripplanner-api-webapp
needs one additional configuration file before you can run it. Add the following in your source tree:
opentripplanner-api-webapp/src/main/resources/data-sources.xml
The contents of the file should look like:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="graphBundle" class="org.opentripplanner.model.GraphBundle">
<property name="path" value="/path/to/your/graph-bundle/goes/here" />
</bean>
The main thing to do here is change the path
setting to match the directory of your serialized graph bundle that you produced with GraphBuilder.
As described in further detail in , right click on your server instance and select "Start" to start the Tomcat server. Eventually, the server will finish its startup sequence and the server will be listed as started. Note that startup is not immediate, as it takes a while to load and initialize the serialized trip planner graph, especially for larger graphs. Be sure to check your console output for any exceptions thrown on server startup.
= Trying out the Webapp ==
If all goes well, you should be able to browse to the OpenTripPlanner webapp: http://localhost:8080/opentripplanner-webapp/
The interface should looking something like:
You can now plan your trip like you would with any trip planner, with a couple of caveats:
-
The "from" and "to" fields aren't hooked up to a geocoder yet, so you can't plan using street addresses. You can enter lat-lon locations or optionally you can specify a OpenTripPlanner graph Vertex id as the starting or ending point.
-
The various trip constraints concerning walking distance and travel mode aren't necessarily implemented yet.
If your trip is successfully planned, you should see something like:
Note that a lot of work still clearly needs to be done on the interface in terms of narrative generation and map icons.