Answer the question
In order to leave comments, you need to log in
How to open an existing balloon in Yandex maps?
Hello everyone
, I create a map with balloons in this way:
<script type="text/javascript">
var myMap;
ymaps.ready(init);
function init () {
myMap = new ymaps.Map('map', {
center:[68.963254,33.077918],
zoom:10
});
myMap.controls.add('zoomControl');
var myPlacemark = new ymaps.Placemark([{catalog_map}{latitude},{longitude}{/catalog_map}], {
balloonContent: 'some content'
});
myMap.geoObjects.add(myPlacemark);
var myPlacemark = new ymaps.Placemark([{catalog_map}{latitude},{longitude}{/catalog_map}], {
balloonContent: 'some content'
});
myMap.geoObjects.add(myPlacemark);
var myPlacemark = new ymaps.Placemark([{catalog_map}{latitude},{longitude}{/catalog_map}], {
balloonContent: 'some content'
});
myMap.geoObjects.add(myPlacemark);
}
</script>
<div id="map" style="width:100%;height:1095px"></div>
Answer the question
In order to leave comments, you need to log in
In fact, the balloon can be opened like this:
myPlacemark.balloon.open();
function init () {
var placemarks = [];
..
placemarks[id] = myPlacemark;
window.open_balloon(id) {
placemarks[id].balloon.open();
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question