I've created a plunker for showing this behavior, basically what I've done is to take the demo example from angular maps, and change it just a bit to hide 5 markers every time a marker on the map is clicked. The markers are indeed hidden, but the clusterer never changes. Now here is the strange part, if you drag the map a bit, it will update the clusterer correctly, but it does not refresh automatically.
The onclick event
$scope.clickHandler = function(e) {
var count = $scope.randomMarkers.length;
var hidden = 0;
for (var i = 0; i < count; i++) {
var oneModel = $scope.randomMarkers[i];
if (oneModel.options.visible) {
console.log("hiding: " + oneModel.latitude);
oneModel.options.visible = false;
hidden++;
if (hidden == 5) break;
}
}
}
and the marker definition
var ret = {
latitude: latitude,
longitude: longitude,
title: 'm' + i,
events: {
click: $scope.clickHandler
},
options: {
visible: true
}
};
are the only real differences from the example (aside for telling the markers directive to actually use the marker model options property.