summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-01-25 14:41:33 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-01-25 14:41:33 +0100
commitee1285e8fa684c35b62dd32854f66515cd62a269 (patch)
tree36ea252e1b6719848556a31766ec01f635e9a6c3 /lib/Travelynx
parent8157f3885496ed6949152f17b19ad4090217cc37 (diff)
map: support multiple polyline groups with different colors
Diffstat (limited to 'lib/Travelynx')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm11
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,
+ }
+ ]
);
}