Answer the question
In order to leave comments, you need to log in
How to change the balloon on the Yandex map?
Good afternoon, there is such a design
function init() {
var myMap = new ymaps.Map('map', {
center: [55.555555, 37.788628],
zoom: 9,
behaviors: ['default', 'scrollZoom']
});
var massive_adres = $('.coords');
massive_adres.each(function(i){
var objects = ymaps.geoQuery(ymaps.geocode($(this).text()))
.addToMap(myMap);
});
}
ymaps.ready(init);
});
Answer the question
In order to leave comments, you need to log in
in general, no one helped me and did not explain, I spent a day and figured it out myself, if someone is interested, it is for such a construction that it is necessary to use the setOptions method of the geoQueryResult object api.yandex.ru/maps/doc/jsapi/2.1-dev/ ref/reference...
and here's what needs to be added exactly to this construction to make it work
.setOptions({
iconLayout: 'default#image',
iconImageHref: 'main/red_marker.png',
iconImageSize: [20, 35],
iconImageOffset: [-3, -42],
balloonContentHeader: 'Test title',
balloonContentBody: 'Test Content '
})
How to asynchronously change the picture of a marker on Yandex maps?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question