I need to have different markers for different mapType
s, and I'm pushing them to a MarkerClusterer.
I "hide" the markers with:
cluster.set("map", null);
cluster.resetViewport();
cluster.redraw();
And "show" them with:
cluster.set("map", MAP);
cluster.resetViewport();
cluster.redraw();
The problem is that MarkerClusterer seems to not like set("map", null)
; it throws the error TypeError: Object #<a MarkerClusterer> has no method 'remove'
. How can I show/hide them the proper way?