A
A
Anton89892019-06-05 21:23:56
Yandex maps
Anton8989, 2019-06-05 21:23:56

How to open a balloon on click?

I use the vue-yandex-maps component, there is a marker on the map, when clicked, a balloon opens. How to make it so that the balloon can also be opened by clicking on a third-party button, which should be in the template.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-06-06
@Anton8989

<yandex-map
  ref="map"
  ...

<button
  @click="$refs.map.myMap.balloon.open(координаты, содержимое)"
  ...

https://codesandbox.io/s/vue-template-3zfg1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question