Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Yes, it's possible. To do this, you need to set options.numbers and options.icons for icons.
Options.icons specifies the sizes of icons (you can also set custom icons there) Options.numbers specifies
the boundaries, when passing through which the size of the cluster changes. This array must contain one more value than the options.icons array .
Example:
clusterer = new ymaps.Clusterer({
// Зададим массив, описывающий иконки кластеров разного размера.
clusterIcons: [{
href: 'images/cat.png',
size: [40, 40],
offset: [-20, -20]
},
{
href: 'images/cat.png',
size: [80, 80],
offset: [-40, -40]
}],
// Эта опция отвечает за размеры кластеров.
// В данном случае для кластеров, содержащих до 100 элементов,
// будет показываться маленькая иконка. Для остальных - большая.
clusterNumbers: [10],
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question