From 076f8f3f0f0103153d905caef97092891b25e864 Mon Sep 17 00:00:00 2001 From: Andrew Byrd Date: Wed, 21 Nov 2018 15:41:56 +0800 Subject: [PATCH] fix(add-trips): set route type #465 The mode of travel for added trips (routes) still can't be set in the UI, but this change at least copies over the default value (bus) from the AddTrips modification class. This has been confirmed to work - when bus is deselected in the UI, added routes are not considered. It should suffice to include a mode property in the modification JSON. --- src/main/java/com/conveyal/r5/analyst/scenario/AddTrips.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/conveyal/r5/analyst/scenario/AddTrips.java b/src/main/java/com/conveyal/r5/analyst/scenario/AddTrips.java index 761c4a48d..2842f8f7e 100644 --- a/src/main/java/com/conveyal/r5/analyst/scenario/AddTrips.java +++ b/src/main/java/com/conveyal/r5/analyst/scenario/AddTrips.java @@ -89,6 +89,7 @@ public boolean apply (TransportNetwork network) { info.route_short_name = ""; info.route_long_name = this.comment; info.route_id = this.routeId; + info.route_type = this.mode; info.color = "4444FF"; this.routeIndex = transitLayer.routes.size(); transitLayer.routes.add(info);