C
C
cyrilbondarenko2020-12-21 01:57:35
JavaScript
cyrilbondarenko, 2020-12-21 01:57:35

How can I disable the display of hidden labels in a cluster, or the clusters themselves based on their coordinates?

Good evening.

I hide labels outside the polygon with the following code:

geoObjects.forEach(element => {
        if (myPolygon.geometry.contains(element.geometry._coordinates)) {
            element.options.set('visible', true);
        } else {
            element.options.set('visible', false);
        }


But as I understand it, clusters still take into account hidden labels. How to make sure that they are not accounted for? Or how to hide the clusters themselves?

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