mirror of
https://github.com/heyarne/berliner-winter.git
synced 2026-05-06 19:23:39 +02:00
Close popups when spiderifying marker groups
This commit is contained in:
parent
7b907883bf
commit
f367103d0f
1 changed files with 5 additions and 0 deletions
|
|
@ -37,12 +37,17 @@ class Visualization {
|
||||||
closeButton: true,
|
closeButton: true,
|
||||||
maxHeight: 250
|
maxHeight: 250
|
||||||
})
|
})
|
||||||
|
|
||||||
this.oms.addListener('click', function (marker) {
|
this.oms.addListener('click', function (marker) {
|
||||||
popup.setContent(template(marker.incident))
|
popup.setContent(template(marker.incident))
|
||||||
popup.setLatLng(marker.getLatLng())
|
popup.setLatLng(marker.getLatLng())
|
||||||
map.openPopup(popup)
|
map.openPopup(popup)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.oms.addListener('spiderfy', function () {
|
||||||
|
map.closePopup()
|
||||||
|
})
|
||||||
|
|
||||||
// set up markers
|
// set up markers
|
||||||
this._markers = new Map()
|
this._markers = new Map()
|
||||||
this.setupMarkers()
|
this.setupMarkers()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue