Skip to content

Instantly share code, notes, and snippets.

@buma
Created October 19, 2015 14:55
Show Gist options
  • Save buma/0fa9ff52b45932dbc706 to your computer and use it in GitHub Desktop.
Save buma/0fa9ff52b45932dbc706 to your computer and use it in GitHub Desktop.
Changes needed in OTP to run TN
diff --git a/src/main/java/org/opentripplanner/standalone/OTPMain.java b/src/main/java/org/opentripplanner/standalone/OTPMain.java
index 81c928a..5dfd8a5 100644
--- a/src/main/java/org/opentripplanner/standalone/OTPMain.java
+++ b/src/main/java/org/opentripplanner/standalone/OTPMain.java
@@ -115,10 +115,10 @@ public class OTPMain {
/* Start graph builder if requested */
if (params.build != null) {
- GraphBuilder graphBuilder = GraphBuilder.forDirectory(params, params.build); // TODO multiple directories
+ /* GraphBuilder graphBuilder = GraphBuilder.forDirectory(params, params.build); // TODO multiple directories
if (graphBuilder != null) {
graphBuilder.run();
- /* If requested, hand off the graph to the server as the default graph using an in-memory GraphSource. */
+ /* If requested, hand off the graph to the server as the default graph using an in-memory GraphSource.
if (params.inMemory || params.preFlight) {
Graph graph = graphBuilder.getGraph();
graph.index(new DefaultStreetVertexIndexFactory());
@@ -128,7 +128,7 @@ public class OTPMain {
} else {
LOG.error("An error occurred while building the graph. Exiting.");
System.exit(-1);
- }
+ }*/
if (params.transitNetworks) {
LOG.info("Building transit networks.");
diff --git a/src/client/js/otp/config.js b/src/client/js/otp/config.js
index 5cae24e..91010a9 100644
--- a/src/client/js/otp/config.js
+++ b/src/client/js/otp/config.js
@@ -50,7 +50,7 @@ otp.config = {
// In the 0.10.x API the base path is "otp-rest-servlet/ws"
// From 0.11.x onward the routerId is a required part of the base path.
// If using a servlet container, the OTP WAR should be deployed to context path /otp
- restService: "otp/routers/default",
+ restService: "otp_networks/routers/default",
/**
* Base layers: the base map tile layers available for use by all modules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment