diff options
Diffstat (limited to 'templates/_map.html.ep')
-rw-r--r-- | templates/_map.html.ep | 4 |
1 files changed, 4 insertions, 0 deletions
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', |