diff options
| author | Kumar Damani <kumar.damani@mail.utoronto.ca> | 2019-03-08 01:37:51 +0000 |
|---|---|---|
| committer | Kumar Damani <kumar.damani@mail.utoronto.ca> | 2019-03-08 01:37:51 +0000 |
| commit | 54e468b728dbdce20f98bae88caaaaa74b122d24 (patch) | |
| tree | 2cfcd1d151cea85a9b696ad7af0b1f8cc5a6bc9f /web/public/javascripts/map.js | |
| parent | 5f1fa4936a3b45139c2bc111ecd602f3d13c2e90 (diff) | |
added padding for distant points just in casefix/24
Diffstat (limited to 'web/public/javascripts/map.js')
| -rw-r--r-- | web/public/javascripts/map.js | 5 |
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)); |
