From 96de05b56cd1b2172358b3d29ca71bcb876c37c7 Mon Sep 17 00:00:00 2001 From: Saivann Date: Wed, 5 Mar 2014 12:45:54 -0500 Subject: [PATCH] Prevent Google Maps API to empty the events' map (Empty latitude/longitude data should be ignored) --- _templates/events.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_templates/events.html b/_templates/events.html index d49a5e1b..f55a73c3 100644 --- a/_templates/events.html +++ b/_templates/events.html @@ -22,11 +22,11 @@ L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { }).addTo(map); var markers = new L.MarkerClusterGroup({showCoverageOnHover: false, maxClusterRadius: 40}); -{% filter_for p in site.conferences sort_by:date %}{% if p.geoloc != 'false' %} +{% filter_for p in site.conferences sort_by:date %}{% if p.geoloc %} L.marker([{{ p.geoloc }}]).bindPopup('{{ p.title | htmlescape }}
{{ p.date }}
{{ p.venue | htmlescape }}
{{ p.address | htmlescape }}
{{ p.city | htmlescape }}, {{ p.country | htmlescape }}').addTo(markers); {% endif %}{% endfilter_for %} -{% filter_for p in site.meetups sort_by:date %}{% if p.geoloc != 'false' %} +{% filter_for p in site.meetups sort_by:date %}{% if p.geoloc %} L.marker([{{ p.geoloc }}]).bindPopup('{{ p.title | htmlescape }}
{{ p.date }}
{{ p.venue | htmlescape }}
{{ p.address | htmlescape }}
{{ p.city | htmlescape }}, {{ p.country | htmlescape }}').addTo(markers); {% endif %}{% endfilter_for %}