diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-01-25 14:41:33 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-01-25 14:41:33 +0100 |
commit | ee1285e8fa684c35b62dd32854f66515cd62a269 (patch) | |
tree | 36ea252e1b6719848556a31766ec01f635e9a6c3 /lib/Travelynx | |
parent | 8157f3885496ed6949152f17b19ad4090217cc37 (diff) |
map: support multiple polyline groups with different colors
Diffstat (limited to 'lib/Travelynx')
-rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 11 |
1 files changed, 9 insertions, 2 deletions
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, + } + ] ); } |