diff --git a/been.njk b/been.njk index 5ab4e80..73ece27 100644 --- a/been.njk +++ b/been.njk @@ -19,7 +19,7 @@ leafletMap: true {% set mapPoints = [] %} {% for c in checkins %} {% if c.latitude and c.longitude %} - {% set mapPoints = (mapPoints.push({name: c.name, lat: c.latitude, lng: c.longitude, url: c.venueUrl}), mapPoints) %} + {% set mapPoints = (mapPoints.push({name: c.name, lat: c.latitude, lng: c.longitude, url: c.venueWebsiteUrl}), mapPoints) %} {% endif %} {% endfor %} @@ -52,106 +52,33 @@ leafletMap: true return L.marker([p.lat, p.lng]).bindPopup(popup); }); markers.forEach(function(m) { m.addTo(map); }); - if (markers.length === 1) { - map.setView([checkinPoints[0].lat, checkinPoints[0].lng], 15); - } else { - var group = L.featureGroup(markers); - map.fitBounds(group.getBounds().pad(0.1)); - } + var group = L.featureGroup(markers); + map.fitBounds(group.getBounds().pad(0.2), { maxZoom: 13 }); })(); {% endif %} {% if checkins.length %} -
+
+ {% else %}

No past check-ins found.

{% endif %}