Answer the question
In order to leave comments, you need to log in
How not to hide the label when clicking on the Yandex map?
hideIconOnBalloonOpen is an option that allows you to customize the hide of the label on click.
But she doesn't work. I put marks on the map through the ObjectManager, registered this option and nothing ... The balloon moved far from the mark to make sure that it does not close it.
ymaps.ready(function () {
const myMap = new ymaps.Map('map', {
// Задаем центр карты
center: [59.928861, 30.355700],
controls: [],
// И масштаб
zoom: 11
}, {
// searchControlProvider: 'yandex#search'
hideIconOnBalloonOpen:false
}),
// Создаём макет содержимого.
MyIconContentLayout = ymaps.templateLayoutFactory.createClass(
'<div style="color: #FFFFFF; font-weight: bold;">$[properties.iconContent]</div>'
);
objectManager = new ymaps.ObjectManager({
balloonCloseButton: false,
hideIconOnBalloonOpen: false,
gridSize: 32,
clusterDisableClickZoom: true,
balloonOffset: [ -50, -50 ]
});
objectManager.objects.options.set('preset', 'islands#greenDotIcon');
objectManager.clusters.options.set('preset', 'islands#greenClusterIcons');
myMap.geoObjects.add(objectManager);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question