Answer the question
In order to leave comments, you need to log in
How on the Yandex map, when you click on the button, open the balloon at the point?
How on the Yandex map, when you click on the button, open the balloon at the point?
obj.balloon.open() // Правильно?
myMap.setCenter(schools[glCity].filials[glFilial].coord, 16).balloon.open();
Answer the question
In order to leave comments, you need to log in
<button id="show">Показать на карте</button>
<div id="map" style="width: 300px; height: 300px"></div>
ymaps.ready(init);
var myMap;
function init(){
myMap = new ymaps.Map ("map", {
center: [55.76, 37.64],
zoom: 7
})}
var el = document.getElementById("show");
el.addEventListener("click", showBal, false);
function showBal(){
myMap.balloon.open(myMap.getCenter(), { content: 'Hello Yandex!' }, { closeButton: true });
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question