How to make, after clicking on a clustered label on the map - the new labels are displayed closer to the center of the map. There is:

map = new ymaps.Map(...); ... objectManager = new ymaps.ObjectManager(...); //Делаю так, но это не по фен-шую objectManager.clusters.events.add('click', function (e) { setTimeout(function () { $('ymaps.ymaps-2-1-60-zoom__minus.ymaps-2-1-60-zoom__button.ymaps-2-1-60-float-button.ymaps-2-1-60-user-selection-none').trigger('click'); },500); }); 

How to write the construction below to solve this problem? map.setBounds (objectManager.getBounds (), {zoomMargin: 30}); What event of the object manager will bind this construction?

    1 answer 1

    Good day. You can use the zoomMargin option https://tech.yandex.ru/maps/doc/jsapi/2.1/ref/reference/Clusterer-docpage/#param-options.zoomMargin , it looks like this:

     objectManager = new ymaps.ObjectManager({ clusterize: true zoomMargin: 100 }); 

    Example: https://jsfiddle.net/roqf4ea9/

    • se0ga, thank you very much. It works. - m.sverdlov