M
M
Mikhail82015-05-02 16:42:06
Yandex maps
Mikhail8, 2015-05-02 16:42:06

How to zoom in on a cluster in Yandex Maps?

Hello!
Please tell me how, with clusterDisableClickZoom=true, to programmatically zoom in on a cluster on Yandex maps in the same way as it is done by clicking on it?
I try like this:

objectManager.clusters.events.add('click', function onObjectEvent (e) {
               var objectId = e.get('objectId');

               var obj = ObjectManager.clusters.getById(objectId);
     
                if (myMap.getZoom()<16)
                {
                    //приближаем кластер
                    map.setBounds( obj.getBounds() );
                }else{
                    //Показываем балун
                }

}

doesn't want to... obj.getBounds() - gives error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail8, 2015-05-03
@Mikhail8

The answer is here...
clubs.ya.ru/mapsapi/replies.xml?item_no=56914

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question