googlearchive/js-marker-clusterer

Hide cluster dynamically once all markers are hidden

Closed this issue · 5 comments

Remo commented

I'm using a toggle button to hide/show certain markers. Those that are part of a cluster have a problem. If I dyncamically hide marker.setVisible(false/true) all markers of a cluster the cluster stays visible.

I tried to call redraw and repaint, but both methods don't seem to consider the visibility of the marker. Any ideas about the correct way to do that?

Remo commented

Created a PR that works so far, requires more testing, CLA and so on.. Code will only work if repaint is called after changing the markers visibility

Remo commented

this PR does the trick for me #33

Remo commented

@zelds have you seen my comment above? You are using an unsupported version, try ours at https://github.com/gmaps-marker-clusterer/gmaps-marker-clusterer