I
I
Ilya Belsky2017-11-02 23:56:35
Yandex maps
Ilya Belsky, 2017-11-02 23:56:35

How to access an instance of the Yandex Maps component?

Someone who used the Yandex map view component ( https://github.com/PNKBizz/vue-yandex-map) - share how you got a map instance in order to apply this or that method. For example panTo.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fl3nkey, 2017-11-03
@theartkod

<yandex-map ref="map"></yandex-map>

//...
var mapComponent = this.$refs.map; //экземпляр компонента
var map = mapComponent.myMap; //экземпляр карты
console.log(mapComponent, map);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question