Unverified Commit 8c18421e authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

hafas-m: Add --with-polyline option

parent d73b96e1
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -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);
@@ -126,6 +127,7 @@ elsif ( $opt{station} =~ m{ ^ [?] (?<query> .*) $ }x ) {
}
elsif ( $opt{station} =~ m{[|]} ) {
	$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