Answer the question
In order to leave comments, you need to log in
Yandex.map, several types of clusters?
Help out how you can make several clusters (grouping) by type:
There are 2 types of objects "T1", "T2", I naively created 2 clusters
var c1 = new ymaps.Clusterer();
var c2 = new ymaps.Clusterer();
then stuffed objects into them
c1.add(o1);
c2.add(o2);
and hoped that after
Map.geoObjects.add(c1);
Map.geoObjects.add(c2);
I thought I would have 2 independent clusters - which will be grouped within their group.
But, something went wrong. only one cluster is visible.
The Internet did not help, they only offer a single cluster with differentiation by the color of the pants (10% -c1, 90% -c2)
It has already become interesting if there is a method for grouping to occur in clusters.
Answer the question
In order to leave comments, you need to log in
Create 2 objectManager objects with clustering enabled.
var objectManager = new ymaps.ObjectManager({
// Включаем кластеризацию.
clusterize: true,
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question