Prevent Google Maps API to empty the events' map

(Empty latitude/longitude data should be ignored)
This commit is contained in:
Saivann 2014-03-05 12:45:54 -05:00
parent 3a02772be5
commit 96de05b56c

View file

@ -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('<b><a href="{{ p.link | htmlescape }}">{{ p.title | htmlescape }}</a></b><br>{{ p.date }}<br>{{ p.venue | htmlescape }}<br>{{ p.address | htmlescape }}<br>{{ 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('<b><a href="{{ p.link | htmlescape }}">{{ p.title | htmlescape }}</a></b><br>{{ p.date }}<br>{{ p.venue | htmlescape }}<br>{{ p.address | htmlescape }}<br>{{ p.city | htmlescape }}, {{ p.country | htmlescape }}').addTo(markers);
{% endif %}{% endfilter_for %}