summaryrefslogtreecommitdiff
path: root/templates/_map.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-01-29 18:48:58 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2020-01-29 18:48:58 +0100
commit993f6be6c9524031d878f2c83dcba1fdde11d060 (patch)
treef0d76b331a5a0e8092c68dab4e9de3d67cabbdf3 /templates/_map.html.ep
parent6b1aa9cd3905ac18ef0c21bea37d638fc48ef17d (diff)
map: set bounds on stations; move polyline feature to staging1.14.1
Diffstat (limited to 'templates/_map.html.ep')
-rw-r--r--templates/_map.html.ep4
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',