summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2025-03-25 18:22:48 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2025-03-25 18:22:48 +0100
commit8c18421e76e567fcf7d372dd096f046ae5f370c3 (patch)
tree4e4f3159e9c6eceb4290513508f4fe9e4ba54ecf
parentd73b96e192134bb079e380092f455c3548141397 (diff)
hafas-m: Add --with-polyline option
-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