From ee1285e8fa684c35b62dd32854f66515cd62a269 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 25 Jan 2020 14:41:33 +0100 Subject: map: support multiple polyline groups with different colors --- lib/Travelynx/Controller/Traveling.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib/Travelynx/Controller') diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 70d701b..198d66e 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -446,7 +446,7 @@ sub map_history { template => 'history_map', with_map => 1, station_coordinates => [], - station_pairs => [], + polyline_groups => [], ); return; } @@ -528,7 +528,14 @@ sub map_history { template => 'history_map', with_map => 1, station_coordinates => \@station_coordinates, - station_pairs => \@station_pairs, + polyline_groups => [ + { + polylines => \@station_pairs, + color => '#673ab7', + opacity => 0.6, + fit_bounds => 1, + } + ] ); } -- cgit v1.2.3