summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/hafas-m11
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/hafas-m b/bin/hafas-m
index 7203dab..62ddb62 100755
--- a/bin/hafas-m
+++ b/bin/hafas-m
@@ -23,7 +23,7 @@ my $developer_mode;
my $via;
my $use_cache = 1;
my $cache;
-my ( $json_output, $raw_json_output );
+my ( $json_output, $raw_json_output, $with_polyline );
my ( $list_services, $service );
my ( @excluded_mots, @exclusive_mots );
@@ -53,6 +53,7 @@ GetOptions(
'devmode' => \$developer_mode,
'json' => \$json_output,
'raw-json' => \$raw_json_output,
+ 'with-polyline' => \$with_polyline,
'list' => \$list_services,
) or show_help(1);
@@ -125,7 +126,8 @@ elsif ( $opt{station} =~ m{ ^ [?] (?<query> .*) $ }x ) {
delete $opt{station};
}
elsif ( $opt{station} =~ m{[|]} ) {
- $opt{journey} = { id => $opt{station} };
+ $opt{journey} = { id => $opt{station} };
+ $opt{with_polyline} = $with_polyline;
delete $opt{station};
}
elsif ( $opt{station} =~ m{ ^ [!] (?<query> .*) $ }x ) {
@@ -873,6 +875,11 @@ is treated as a regular expression and matched against stop names.
Show version information and exit.
+=item B<--with-polyline> (trip details)
+
+Request polyline (geocoordinates of the trip's route) from the backend.
+Only sensible when combined with B<--json> or B<--raw-json>.
+
=back
=head1 EXIT STATUS