diff options
| -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 5b196d9..cb72756 100644 --- a/web/public/javascripts/map.js +++ b/web/public/javascripts/map.js @@ -15,8 +15,9 @@ function plotPointsOnMap(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)); } // different basemap |
