We have a map, and at a certain level of scaling, we begin to clustering markers.
Now I want to be able to delete certain markers. I can remove tokens that are not involved in the cluster, but tokens in the cluster are not deleted because the code does not iterate over them.
I would post the code, but it's everywhere and pretty specific.
I can do the following:
$.each(MAP._layers, function (i, layer) {
if (layer.feature) {
var marker = LIGHTWEIGHT_BUILDING_MAPPING[layer.feature.id];
MAP.removeLayer(marker);
}
});
And all visible tokens are deleted, but not those that are inside the cluster. Any thoughts?
source
share