D
D
devAston2019-09-24 11:45:54
JavaScript
devAston, 2019-09-24 11:45:54

How to save cluster styles when changing Yandex map scale?

Good afternoon.
There is a piece of code that, when you click on a cluster, changes the style from green to red:

JS
geoObject = objectManager.clusters.getById(cluster.id);
objectManager.clusters.setClusterOptions(geoObject.id, {
    preset: 'islands#redClusterIcons'
});

Everything works fine, but when the scale changes, the cluster IDs change and all the styles fall off.
Can you tell me how to save the cluster styles when changing the scale of the map?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question