From 993f6be6c9524031d878f2c83dcba1fdde11d060 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 29 Jan 2020 18:48:58 +0100 Subject: map: set bounds on stations; move polyline feature to staging --- templates/_map.html.ep | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'templates/_map.html.ep') diff --git a/templates/_map.html.ep b/templates/_map.html.ep index 119e29f..3918b4a 100644 --- a/templates/_map.html.ep +++ b/templates/_map.html.ep @@ -41,6 +41,10 @@ var pl; % } % } +% if (my $b = stash('bounds')) { + map.fitBounds([[<%= $b->[0][0] %>,<%= $b->[0][1] %>],[<%= $b->[1][0] %>,<%= $b->[1][1] %>]]); +% } + for (var station_id in stations) { L.circle(stations[station_id][0], { color: '#f03', -- cgit v1.2.3