Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

markercluster not changing after setvisible

Currently I have a set of markers and I cluster them like this:

var markerCluster = new MarkerClusterer(map, cm_mapMarkers);

But I also have a set of filters which i use to set markers visible false or true. Unfortunatly when I set the marker setvisible(false) the cluster count is not changing.

So I looked for methods to do this:

I tried the following:

MarkerClusterer.redraw();
MarkerClusterer.repaint();

Both resulting in : has no method 'repaint' has no method 'redraw'

Here is a JSfiddle:

http://jsfiddle.net/tDYcX/30/

Anybody knows what I am doing wrong?

Thanks in advance

like image 347
Emrulez Avatar asked Jan 26 '12 16:01

Emrulez


1 Answers

I managed to do it using markerclustererplus and using markerCluster.setIgnoreHidden(true); and markerCluster.repaint();

like image 183
Emrulez Avatar answered Sep 17 '22 15:09

Emrulez