D
D
danilr2019-10-15 07:12:58
Yandex maps
danilr, 2019-10-15 07:12:58

How to catch the event of opening a balloon on Yandex maps and clicking on a list item inside?

All geo objects are located in the this.objectManager.objects object, you need to attach the this.open method to open the balloon and select (click) on the list element inside the balloon - if there are several elements at the same address.
5da54744b0396456884568.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
danilr, 2019-10-18
@danilr

Like this:

// узнаем текущий активный объект (сразу выбран в меню табов)
const currentActiveObject = this.objectManager.clusters.state.get('activeObject');
// создаем монитор и следим за полем 'activeObject' 
this.activeObjectMonitor = new ymaps.Monitor(this.objectManager.clusters.state);
this.activeObjectMonitor.add('activeObject', (newActiveObject) => {
    console.log(newActiveObject);
}

answer hint here https://yandex.ru/blog/mapsapi/55496

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question