AbstractEfaProvider: Include mot 14, 15 and 16 if high-speed train is requested in appendTripRequestParameters().

This commit is contained in:
Andreas Schildbach 2020-10-26 11:32:37 +01:00
parent 44832a6efe
commit a1c8b1caa1
6 changed files with 4 additions and 19 deletions

View file

@ -2023,6 +2023,10 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
hasI = true;
}
if (p == Product.HIGH_SPEED_TRAIN)
url.addEncodedQueryParameter("inclMOT_14", "on").addEncodedQueryParameter("inclMOT_15", "on")
.addEncodedQueryParameter("inclMOT_16", "on");
if (p == Product.REGIONAL_TRAIN)
url.addEncodedQueryParameter("inclMOT_13", "on");

View file

@ -52,9 +52,6 @@ public class AvvProvider extends AbstractEfaProvider {
final @Nullable TripOptions options) {
super.appendTripRequestParameters(url, from, via, to, time, dep, options);
url.addEncodedQueryParameter("inclMOT_11", "on"); // night bus
url.addEncodedQueryParameter("inclMOT_14", "on");
url.addEncodedQueryParameter("inclMOT_15", "on");
url.addEncodedQueryParameter("inclMOT_16", "on");
url.addEncodedQueryParameter("inclMOT_17", "on");
}

View file

@ -145,14 +145,7 @@ public class BayernProvider extends AbstractEfaProvider {
final @Nullable Location via, final Location to, final Date time, final boolean dep,
final @Nullable TripOptions options) {
super.appendTripRequestParameters(url, from, via, to, time, dep, options);
if (options != null && options.products != null) {
for (final Product p : options.products) {
if (p == Product.HIGH_SPEED_TRAIN)
url.addEncodedQueryParameter("inclMOT_15", "on").addEncodedQueryParameter("inclMOT_16", "on");
}
}
url.addEncodedQueryParameter("inclMOT_11", "on");
url.addEncodedQueryParameter("inclMOT_14", "on");
url.addEncodedQueryParameter("calcOneDirection", "1");
}

View file

@ -58,9 +58,6 @@ public class SydneyProvider extends AbstractEfaProvider {
url.addEncodedQueryParameter("inclMOT_11", "on"); // school bus
}
}
url.addEncodedQueryParameter("inclMOT_14", "on");
url.addEncodedQueryParameter("inclMOT_15", "on");
url.addEncodedQueryParameter("inclMOT_16", "on");
url.addEncodedQueryParameter("inclMOT_17", "on");
}

View file

@ -52,9 +52,6 @@ public class VmsProvider extends AbstractEfaProvider {
final @Nullable TripOptions options) {
super.appendTripRequestParameters(url, from, via, to, time, dep, options);
url.addEncodedQueryParameter("inclMOT_11", "on");
url.addEncodedQueryParameter("inclMOT_14", "on");
url.addEncodedQueryParameter("inclMOT_15", "on");
url.addEncodedQueryParameter("inclMOT_16", "on");
url.addEncodedQueryParameter("inclMOT_17", "on");
}

View file

@ -65,9 +65,6 @@ public class VrrProvider extends AbstractEfaProvider {
for (final Product p : options.products) {
if (p == Product.CABLECAR)
url.addEncodedQueryParameter("inclMOT_11", "on"); // Schwebebahn
if (p == Product.HIGH_SPEED_TRAIN)
url.addEncodedQueryParameter("inclMOT_14", "on")
.addEncodedQueryParameter("inclMOT_16", "on");
}
}
}