Quantcast
Channel: Клуб API Карт
Viewing all articles
Browse latest Browse all 7380

Выравнивание кастомного балуна кластера

$
0
0

Не могу разобраться как выполнить перемещение кастомного балуна кластера при его открытии для выравнивания по центру карты.

Карта создается для работы на мобильниках.

Версия я-карт 2.1

 

var customBalloonLayout = ymaps.templateLayoutFactory.createClass([
                "<div class='ballon inguruballonWrapper'>",
                "<img class='mapArrow2' alt='' src='"+burl+"phone_tpl/img/mapArrow2.png'>",
                "<div class='choicecontrol' style=''>",
                 "<h1>В этом месте расположены несколько компаний:</h1>",
                "</div>",
                "<ul class=complist>",
                // Выводим в цикле список всех геообъектов.
                '{% for geoObject in properties.geoObjects %}',
                    '<li><a href=# data-placemarkid="{{ geoObject.properties.placemarkId }}" class="list_item">{{ geoObject.properties.balloonContentMyHeader|raw }}</a></li>',
                '{% endfor %}',
                "</ul>",
                "<img class='close' src='"+burl+"phone_tpl/img/mapClose.png' onclick=\"clrBan);clrBan.close();\">",
                "</div>"
            ].join(''));
 var clusterer = new ymaps.Clusterer({
     clusterDisableClickZoom: false,
     clusterBalloonPanelMaxMapArea: 0,
     clusterballoonMaxWidth: 280,
     // Устанавливаем собственный макет балуна.
     clusterBalloonLayout: customBalloonLayout
 });

 

.

Viewing all articles
Browse latest Browse all 7380

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>