Close popup when filtereing incidents

This commit is contained in:
Arne Schlüter 2015-02-10 17:48:08 +01:00
commit 47691c80ac

View file

@ -36,11 +36,8 @@ class Visualization {
autoPanPadding: [96, 96],
closeButton: true,
maxHeight: 250
});
})
this.oms.addListener('click', function (marker) {
if (map.getZoom() < 10)
map.setZoom(9)
popup.setContent(template(marker.incident))
popup.setLatLng(marker.getLatLng())
map.openPopup(popup)
@ -80,6 +77,7 @@ class Visualization {
$(e.target).parent().toggleClass('active')
var incidents = this.filterAll()
this.map.closePopup()
this.displayMarkers(incidents)
e.preventDefault()
@ -131,6 +129,7 @@ class Visualization {
$target.parent().addClass('active')
var incidents = this.filterAll()
this.map.closePopup()
this.displayMarkers(incidents)
e.preventDefault()