A
A
Anumik2016-07-28 10:47:40
JavaScript
Anumik, 2016-07-28 10:47:40

How to set the displacement of the Yandex.map balloon?

Good afternoon everyone I'm
not familiar with JS and the Yandex Maps API, but I could not find an answer to the question
. when the layout is added to it, the leg will be in the wrong place

BalloonContentLayout = ymaps.templateLayoutFactory.createClass(
            '<div>' +
            '<div class="width: 109px;height: 25px;margin-bottom: 10px;"><img src="<?=SITE_TEMPLATE_PATH?>/img/logo_ska.svg" style="width: 109px;height: 25px;"></div>'+
                '<p style="font-size: 0.875rem;color: #898989;padding: 0 0.5em;line-height: 1;border-top: 1px solid #898989;padding-top: 7px">{{properties.phone}}</p>' +
                '<p style="font-size: 0.875rem;color: #898989;padding: 0 0.5em;line-height: 1;margin-top: 10px;">{{properties.name}}</p><br />' +
                
            '</div>');

This is how the balloon looks like, it seems like the necessary options.offset option, but I don’t know how to attach it, I have very little work experience :C

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
forgotten, 2016-07-28
@Anumik

https://tech.yandex.ru/maps/jsbox/2.1/balloon_autopan

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question