aboutsummaryrefslogtreecommitdiff
path: root/web/public
diff options
context:
space:
mode:
authorKumar Damani <kumar.damani@mail.utoronto.ca>2019-03-08 01:37:51 +0000
committerKumar Damani <kumar.damani@mail.utoronto.ca>2019-03-08 01:37:51 +0000
commit54e468b728dbdce20f98bae88caaaaa74b122d24 (patch)
tree2cfcd1d151cea85a9b696ad7af0b1f8cc5a6bc9f /web/public
parent5f1fa4936a3b45139c2bc111ecd602f3d13c2e90 (diff)
added padding for distant points just in casefix/24
Diffstat (limited to 'web/public')
-rw-r--r--web/public/javascripts/map.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/public/javascripts/map.js b/web/public/javascripts/map.js
index bad07c8..3dbf517 100644
--- a/web/public/javascripts/map.js
+++ b/web/public/javascripts/map.js
@@ -27,5 +27,6 @@ L.geoJson(points, {
return "<p>" + JSON.stringify(layer.feature.geometry) + "</p>";
}).addTo(map)
-// rezoom the map so that all the markers fit in the view
-map.fitBounds(latlngbounds);
+// rezoom the map so that all the markers fit in the view, add 20% padding so
+// that marker dont cut off
+map.fitBounds(latlngbounds.pad(0.20));