ymaps-pie-chart-clusterer
ymaps-pie-chart-clusterer copied to clipboard
How to dynamicly update cluster canvas?
Hello! Thank You for the extention ! In my case, i set clusterer placemarks options programmatically (myClustererPlacemark.options.set('preset','anotherColor'), for example), but if i look on the map, i cant see any changes on cluster canvas (pie-chart colors).
Then, i zoom into cluster and zoom out, and i see correct colors on the cluster pie chart. How to dynamically refresh cluster pie chart colors without user inputs on screen?
Help :(
@de-soul I solved this like
$scope.updateClusters = function () {
$scope.map.setZoom($scope.map.getZoom() + 1);
$scope.map.setZoom($scope.map.getZoom() - 1);
};
+1 for this issue. Having the same problem.
this.objectManager.clusters.overlays.getAll().forEach(l => {
l.getIconLayout().then(s => s.rebuild());
});